Fix BUG in raid5 resync code.
A message that is not in the archive (sent off-list or not yet received): 20040604163651.7946.patches@notabene
PATCH 1/1 Fix BUG in raid5 resync code.
Today I lucked upon a bug in raid5 that appears to have been there
since 2.4.0 and earlier. I guess it doesn't trigger very often.
2.4 will need a similar fix.
### Comments for Changeset
This condtion on this loop is primarily to avoid the loop if it doesn't appear to be needed. However it optimises a little too much and there is a case where it skips the loop when it is really needed. This patch fixes it.
### Diffstat output
./drivers/md/raid5.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/md/raid5.c renamed from drivers/md/raid5.c~current~ +1 -1
@@ -1037,7 +1037,7 @@ static void handle_stripe(struct stripe_* parity, or to satisfy requests * or to load a block that is being partially written. */ -if (to_read || non_overwrite || (syncing && (uptodate+failed < disks))) { +if (to_read || non_overwrite || (syncing && (uptodate < disks))) {for (i=disks; i--;) { dev = &sh->dev[i]; if (!test_bit(R5_LOCKED, &dev->flags) && !test_bit(R5_UPTODATE, &dev->flags) &&
Hi Neil,
Quoted 4 lines
Today I lucked upon a bug in raid5 that appears to have been there
since 2.4.0 and earlier. I guess it doesn't trigger very often.2.4 will need a similar fix.
<snip>
Do you have any idea when we can expect this fix ported to 2.4? Also, when the 2.6 kernel series will include it?
Thanks,
--
Nick Maynard
[email protected]
Quoted 9 lines · On Monday June 7, [email protected] wrote:
Hi Neil,
Quoted 4 lines
Today I lucked upon a bug in raid5 that appears to have been there
since 2.4.0 and earlier. I guess it doesn't trigger very often.2.4 will need a similar fix.
<snip>
Do you have any idea when we can expect this fix ported to 2.4?
It is in the linux-2.4 bk repository:
http://linux.bkbits.com:8080/linux-2.4/cset@40c31f28n8OMv8RVMIjLPDkq3APFWA?nav=index.html|ChangeSet@-2d
so it will be in the next (pre)release.
Quoted 1 line
Also, when the 2.6 kernel series will include it?
It is in Linux 2.6.7-rc3
http://linux.bkbits.com:8080/linux-2.5/cset@40c209c4CQWb5gFyz-f96tQ8QaBv-A?nav=index.html|ChangeSet@-3d
NeilBrown