aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-12-29 23:25:23 -0500
committerNeilBrown <neilb@suse.de>2009-12-29 23:25:23 -0500
commit404e4b43fdd6daa7b4a9f81bc7e4358281d763fa (patch)
tree7a013e233db56b7c90cf0857d6c3bc74c19cf07f /drivers/md
parent7fb9dadc91948ddd16d1d32e414b5e71ec63b97b (diff)
md: allow a resync that is waiting for other resync to complete, to be aborted.
If two arrays share a device, then they will not both resync at the same time. One will wait for the other to complete. While waiting, the MD_RECOVERY_INTR flag is not checked so a device failure, which would make the resync pointless, does not cause the resync to abort, so the failed device cannot be removed (as it cannot be remove while a resync is happening). So add a test for MD_RECOVERY_INTR. Reported-by: Brett Russ <bruss@netezza.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index c4bdf0601757..dd3dfe42d5a9 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6473,10 +6473,11 @@ void md_do_sync(mddev_t *mddev)
6473 mddev->curr_resync = 2; 6473 mddev->curr_resync = 2;
6474 6474
6475 try_again: 6475 try_again:
6476 if (kthread_should_stop()) { 6476 if (kthread_should_stop())
6477 set_bit(MD_RECOVERY_INTR, &mddev->recovery); 6477 set_bit(MD_RECOVERY_INTR, &mddev->recovery);
6478
6479 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery))
6478 goto skip; 6480 goto skip;
6479 }
6480 for_each_mddev(mddev2, tmp) { 6481 for_each_mddev(mddev2, tmp) {
6481 if (mddev2 == mddev) 6482 if (mddev2 == mddev)
6482 continue; 6483 continue;