diff options
author | NeilBrown <neilb@suse.de> | 2012-02-06 20:01:51 -0500 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-02-06 20:01:51 -0500 |
commit | db91ff55bdf06736b849afc1b1fce5763bbb8d5d (patch) | |
tree | ade2010773b721e3d699e75a9348f200e7ad31c4 | |
parent | 34f8ac6d79e5446c6242e4bcb474f152c857c5c6 (diff) |
md: two small fixes to handling interrupt resync.
1/ If a resync is aborted we should record how far we got
(recovery_cp) the last request that we know has completed
(->curr_resync_completed) rather than the last request that was
submitted (->curr_resync).
2/ When a resync aborts we still want to update the metadata with
any changes, so set MD_CHANGE_DEVS even if we 'skip'.
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | drivers/md/md.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 33aa06f12b87..81d1c43dd97f 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -7333,7 +7333,8 @@ void md_do_sync(struct mddev *mddev) | |||
7333 | printk(KERN_INFO | 7333 | printk(KERN_INFO |
7334 | "md: checkpointing %s of %s.\n", | 7334 | "md: checkpointing %s of %s.\n", |
7335 | desc, mdname(mddev)); | 7335 | desc, mdname(mddev)); |
7336 | mddev->recovery_cp = mddev->curr_resync; | 7336 | mddev->recovery_cp = |
7337 | mddev->curr_resync_completed; | ||
7337 | } | 7338 | } |
7338 | } else | 7339 | } else |
7339 | mddev->recovery_cp = MaxSector; | 7340 | mddev->recovery_cp = MaxSector; |
@@ -7351,9 +7352,9 @@ void md_do_sync(struct mddev *mddev) | |||
7351 | rcu_read_unlock(); | 7352 | rcu_read_unlock(); |
7352 | } | 7353 | } |
7353 | } | 7354 | } |
7355 | skip: | ||
7354 | set_bit(MD_CHANGE_DEVS, &mddev->flags); | 7356 | set_bit(MD_CHANGE_DEVS, &mddev->flags); |
7355 | 7357 | ||
7356 | skip: | ||
7357 | if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { | 7358 | if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { |
7358 | /* We completed so min/max setting can be forgotten if used. */ | 7359 | /* We completed so min/max setting can be forgotten if used. */ |
7359 | if (test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) | 7360 | if (test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) |