Hi,
在 2023/07/11 8:39, Xiao Ni 写道:
在 2023/5/27 上午8:56, Xiao Ni 写道:
Hi all
The attachment is the scripts.
1. It needs to modify the member disks and raid name in
prepare_rebuild_env.sh
2. It needs to modify the member disks and raid name in 01-test.sh
3. Then run 01-test.sh directly
Hi all
I have tried with a work around patch and can confirm this problem can't
be reproduced again with this patch.
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 4cdb35e54251..96d7f8048876 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -6190,7 +6190,8 @@ static bool raid5_make_request(struct mddev
*mddev, struct bio * bi)
md_write_end(mddev);
return true;
}
- md_account_bio(mddev, &bi);
+ if (rw == WRITE)
+ md_account_bio(mddev, &bi);
After spending sometime review related code, I still can't figure out
what is wrong and how can this solves anything. ☹️
I assume your testcase doesn't involved io error, and
'rdev->recovery_offset' in only updated after sync io is done
from md_do_sync(), and 'rdev->recovery_offset' is checked while choosing
the rdev to read from analyse_stripe(). (There is a problem from
raid5_read_one_chunk() about checking 'recovery_offset', but as you
said chunk_aligned_read() is not involed here.) Hence I think it's not
possible to read data from the disk that is not recovered.
And again, I don't think there is a difference for what will be with or
without this md_account_bio().
Thanks,
Kuai
/*
* Lets start with the stripe with the lowest chunk offset in
the first
This patch only disables the accounting for non-align read requests. I
know it's not a good one. But the data corruption is more
serious than io accouting.
Regards
Xiao
.