aboutsummaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-11-06 14:59:29 +1100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-08 10:20:57 -0800
commit8a7963564a8288a2c98d1c924d09ac0697b8f92c (patch)
treecdbc5db4f99e51188d5d66fda36d31a6eb385611 /drivers/md
parent98bc571940095198eec1e4b9af70bf9024b5f539 (diff)
md/raid5: make sure curr_sync_completes is uptodate when reshape starts
commit 8dee7211467a56b7eb4e4359efb0aa4a72e1b6f3 upstream. This value is visible through sysfs and is used by mdadm when it manages a reshape (backing up data that is about to be rearranged). So it is important that it is always correct. Current it does not get updated properly when a reshape starts which can cause problems when assembling an array that is in the middle of being reshaped. This is suitable for 2.6.31.y stable kernels. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid5.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index b8a2c5dc67b..c339c8fdcbd 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3790,6 +3790,8 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
sector_nr = conf->reshape_progress;
sector_div(sector_nr, new_data_disks);
if (sector_nr) {
+ mddev->curr_resync_completed = sector_nr;
+ sysfs_notify(&mddev->kobj, NULL, "sync_completed");
*skipped = 1;
return sector_nr;
}