Hi,
在 2025/8/30 8:48, Damien Le Moal 写道:
On 8/28/25 15:57, Yu Kuai wrote:
From: Yu Kuai <yukuai3@xxxxxxxxxx>
On the one hand unify bio split code, prepare to fix disordered split
IO; On the other hand fix missing blkcg_bio_issue_init() and
trace_block_split() for split IO.
Noted discard is not handled, because discard is only splited for
s/splited/split
unaligned head and tail, and this can be considered slow path, the
disorder here does not matter much.
Signed-off-by: Yu Kuai <yukuai3@xxxxxxxxxx>
---
drivers/md/raid10.c | 51 +++++++++++++++++++--------------------------
drivers/md/raid10.h | 2 ++
2 files changed, 23 insertions(+), 30 deletions(-)
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index b60c30bfb6c7..0e7d2a67fca6 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -322,10 +322,12 @@ static void raid_end_bio_io(struct r10bio *r10_bio)
struct bio *bio = r10_bio->master_bio;
struct r10conf *conf = r10_bio->mddev->private;
- if (!test_bit(R10BIO_Uptodate, &r10_bio->state))
- bio->bi_status = BLK_STS_IOERR;
+ if (!test_and_set_bit(R10BIO_Returned, &r10_bio->state)) {
+ if (!test_bit(R10BIO_Uptodate, &r10_bio->state))
+ bio->bi_status = BLK_STS_IOERR;
+ bio_endio(bio);
+ }
This change / the R10BIO_Returned flag is not mentioned in the commit message.
Please explain why it is needed to add for switching to using
bio_submit_split_bioset(), which in itself should not introduce functional
changes. Looks like this needs to be split into different patches...
Ok, this is actually refered from raid1 flag, I can make this flag a seperate
patch :)
Thanks,
Kuai