]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
md/raid1,raid10: don't handle IO error for REQ_RAHEAD and REQ_NOWAIT
authorYu Kuai <yukuai3@huawei.com>
Tue, 27 May 2025 08:14:07 +0000 (16:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Sep 2025 16:58:20 +0000 (18:58 +0200)
commited6aac13dd9d6d5169bd1f6edb50f5f8318d69c7
treed8bfebd464bf3786bb3e8eb5f536ad9639b02504
parent73506e581c0b1814cdfd2229d589f30751d7de26
md/raid1,raid10: don't handle IO error for REQ_RAHEAD and REQ_NOWAIT

commit 9f346f7d4ea73692b82f5102ca8698e4040469ea upstream.

IO with REQ_RAHEAD or REQ_NOWAIT can fail early, even if the storage medium
is fine, hence record badblocks or remove the disk from array does not
make sense.

This problem if found by lvm2 test lvcreate-large-raid, where dm-zero
will fail read ahead IO directly.

Fixes: e879a0d9cb08 ("md/raid1,raid10: don't ignore IO flags")
Reported-and-tested-by: Mikulas Patocka <mpatocka@redhat.com>
Closes: https://lore.kernel.org/all/34fa755d-62c8-4588-8ee1-33cb1249bdf2@redhat.com/
Link: https://lore.kernel.org/linux-raid/20250527081407.3004055-1-yukuai1@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/raid1-10.c
drivers/md/raid1.c
drivers/md/raid10.c