Re: [PATCH v4 4/9] md/raid1,raid10: Don't set MD_BROKEN on failfast bio failure
From: Yu Kuai
Date: Thu Sep 18 2025 - 21:37:24 EST
Hi,
在 2025/9/18 23:22, Kenta Akagi 写道:
In the case where raid1_end_write_request is called for a non-failfast IO,@@ -470,7 +470,7 @@ static void raid1_end_write_request(struct bio *bio)Can following check of faulty replaced with return value?
(bio->bi_opf & MD_FAILFAST) &&
/* We never try FailFast to WriteMostly devices */
!test_bit(WriteMostly, &rdev->flags)) {
- md_error(r1_bio->mddev, rdev);
+ md_bio_failure_error(r1_bio->mddev, rdev, bio);
}
and the rdev has already been marked Faulty by another bio, it must not retry too.
I think it would be simpler not to use a return value here.
You can just add Faulty check inside md_bio_failure_error() as well, and both
failfast and writemostly check.
Thanks,
Kuai