]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid5: Avoid BUG caused by multiple failures.
authorNeilBrown <neilb@suse.de>
Wed, 27 Jul 2011 01:00:36 +0000 (11:00 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 27 Jul 2011 01:00:36 +0000 (11:00 +1000)
commit0a758ddc701cb8061f2ba243d9657ad82956858b
treedf1002e5eccbf4b241dc9e948bb894de2106d6e2
parent994befc0799a1b51e5de383f43ebaaf39cac2256
md/raid5: Avoid BUG caused by multiple failures.

While preparing to write a stripe we keep the parity block or blocks
locked (R5_LOCKED) - towards the end of schedule_reconstruction.

If the array is discovered to have failed before this write completes
we can leave those blocks LOCKED, and init_stripe will notice that a
free stripe still has a locked block and will complain.

So clear the R5_LOCKED flag in handle_failed_stripe, and demote the
'BUG' to a 'WARN_ON'.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c