Re: [PATCH v3 1/3] md/raid1,raid10: Do not set MD_BROKEN on failfast io failure

From: Yu Kuai

Date: Sun Sep 07 2025 - 21:21:05 EST




在 2025/09/02 0:48, Kenta Akagi 写道:
In the current raid1_end_write_request implementation,
- md_error is called only in the Failfast case.
- Afterwards, if the rdev is not Faulty (that is, not Failfast,
or Failfast but the last rdev — which originally was not expected
MD_BROKEN in RAID1), R1BIO_WriteError is set.
In the suggested implementation, it seems that a non-Failfast write
failure will immediately mark the rdev as Faulty, without retries.

I still prefer a common helper to unify the code, not sure if I still
missing something ...

In general, if bio failed, for read/write/metadata/resync should be the
same:

1) failfast is set, and not last rdev, md_error();
2) otherwise, we should always retry;

And I do believe it's the best to unify this by a common helper.

Thanks,
Kuai