diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-09 12:57:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-09 12:57:02 -0500 |
commit | 6bee58259fce0baad7b02c7a48146d50fa7f6c3c (patch) | |
tree | 16373d37cf5143993a930350338e830e681359a6 /drivers | |
parent | d178f27fc5150d680d9df865ea9dfe3269cf00a6 (diff) | |
parent | 8dee7211467a56b7eb4e4359efb0aa4a72e1b6f3 (diff) |
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md:
md/raid5: make sure curr_sync_completes is uptodate when reshape starts
md: don't clear endpoint for resync when resync is interrupted.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/md.c | 5 | ||||
-rw-r--r-- | drivers/md/raid5.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 10eb1fce975e..e64c971038d1 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -6504,8 +6504,9 @@ void md_do_sync(mddev_t *mddev) | |||
6504 | skip: | 6504 | skip: |
6505 | mddev->curr_resync = 0; | 6505 | mddev->curr_resync = 0; |
6506 | mddev->curr_resync_completed = 0; | 6506 | mddev->curr_resync_completed = 0; |
6507 | mddev->resync_min = 0; | 6507 | if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) |
6508 | mddev->resync_max = MaxSector; | 6508 | /* We completed so max setting can be forgotten. */ |
6509 | mddev->resync_max = MaxSector; | ||
6509 | sysfs_notify(&mddev->kobj, NULL, "sync_completed"); | 6510 | sysfs_notify(&mddev->kobj, NULL, "sync_completed"); |
6510 | wake_up(&resync_wait); | 6511 | wake_up(&resync_wait); |
6511 | set_bit(MD_RECOVERY_DONE, &mddev->recovery); | 6512 | set_bit(MD_RECOVERY_DONE, &mddev->recovery); |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 81abefc172d9..dcce204b6c73 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -4049,6 +4049,8 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped | |||
4049 | sector_nr = conf->reshape_progress; | 4049 | sector_nr = conf->reshape_progress; |
4050 | sector_div(sector_nr, new_data_disks); | 4050 | sector_div(sector_nr, new_data_disks); |
4051 | if (sector_nr) { | 4051 | if (sector_nr) { |
4052 | mddev->curr_resync_completed = sector_nr; | ||
4053 | sysfs_notify(&mddev->kobj, NULL, "sync_completed"); | ||
4052 | *skipped = 1; | 4054 | *skipped = 1; |
4053 | return sector_nr; | 4055 | return sector_nr; |
4054 | } | 4056 | } |