diff options
author | NeilBrown <neilb@suse.de> | 2009-12-14 12:49:49 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-12-14 12:49:49 +1100 |
commit | efa593390e70b0e3c39f6b2dca8876b6b1461e41 (patch) | |
tree | 99c6071381f14f5ff59130779d988672aa78ee67 /drivers | |
parent | c07b70ad32ed0a5ec9735cafb1aa10b3a2298b7d (diff) | |
download | linux-3.10-efa593390e70b0e3c39f6b2dca8876b6b1461e41.tar.gz linux-3.10-efa593390e70b0e3c39f6b2dca8876b6b1461e41.tar.bz2 linux-3.10-efa593390e70b0e3c39f6b2dca8876b6b1461e41.zip |
md: don't reset curr_resync_completed after an interrupted resync
If a resync/recovery/check/repair is interrupted for some reason, it
can be useful to know exactly where it got up to.
So in that case, do not clear curr_resync_completed.
Initialise it when starting a resync/recovery/... instead.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/md.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index a08aa582925..d79a4064979 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -6381,6 +6381,7 @@ void md_do_sync(mddev_t *mddev) desc, mdname(mddev)); mddev->curr_resync = j; } + mddev->curr_resync_completed = mddev->curr_resync; while (j < max_sectors) { sector_t sectors; @@ -6532,7 +6533,8 @@ void md_do_sync(mddev_t *mddev) } else if (test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) mddev->resync_min = mddev->curr_resync_completed; mddev->curr_resync = 0; - mddev->curr_resync_completed = 0; + if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) + mddev->curr_resync_completed = 0; sysfs_notify(&mddev->kobj, NULL, "sync_completed"); wake_up(&resync_wait); set_bit(MD_RECOVERY_DONE, &mddev->recovery); |