Whamcloud - gitweb
LU-354 test: Change dev_set_rdonly() check to warning
[fs/lustre-release.git] / lustre / kernel_patches / patches / raid5-rebuild-corrupt-bug.patch
1 While the stripe in-memory must be in-sync, the stripe on disk might not be
2 because if we computed a block rather than reading it from an in-sync disk,
3 the in-memory stripe can be different from the on-disk stripe.
4
5 If this bug were still in mainline I would probably want a bigger patch which
6 would leave this code but also set R5_LOCKED on all blocks that have been
7 computed.  But as it is a stablisation patch, the above is simple and more
8 clearly correct.
9
10 Thanks for you patience - I look forward to your success/failure report.
11
12 NeilBrown
13
14 diff -up /drivers/md/raid5.c
15 ===========================================
16 --- a/drivers/md/raid5.c
17 +++ b/drivers/md/raid5.c
18 @@ -2466,8 +2466,6 @@
19                                         locked++;
20                                         set_bit(R5_Wantwrite, &sh->dev[i].flags);
21                                 }
22 -                       /* after a RECONSTRUCT_WRITE, the stripe MUST be in-sync */
23 -                       set_bit(STRIPE_INSYNC, &sh->state);
24
25                         if (test_and_clear_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) {
26                                 atomic_dec(&conf->preread_active_stripes);