Skip to content

Commit

Permalink
md: allow a resync that is waiting for other resync to complete, to b…
Browse files Browse the repository at this point in the history
…e 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>
  • Loading branch information
NeilBrown committed Dec 30, 2009
1 parent 7fb9dad commit 404e4b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -6473,10 +6473,11 @@ void md_do_sync(mddev_t *mddev)
mddev->curr_resync = 2;

try_again:
if (kthread_should_stop()) {
if (kthread_should_stop())
set_bit(MD_RECOVERY_INTR, &mddev->recovery);

if (test_bit(MD_RECOVERY_INTR, &mddev->recovery))
goto skip;
}
for_each_mddev(mddev2, tmp) {
if (mddev2 == mddev)
continue;
Expand Down

0 comments on commit 404e4b4

Please sign in to comment.