diff options
author | Adam Kwolek <adam.kwolek@intel.com> | 2011-04-18 10:31:06 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-04-18 10:31:06 +1000 |
commit | 178b8f353c4b4ffdf3bd4cd8c9dde37f64097da8 (patch) | |
tree | 52b21f2f7ec53c387733200f5a484febd0d70c95 | |
parent | cd0430a17cddf5a05483f42a45cb791aab285ed0 (diff) |
FIX: Fiddle raid_disks number when restarting reshape
When restarting a reshape, the value of 'raid_disks' is the *new*
value. The old value is found by subtracting delta_disks.
So before calling analyse_change we must set raid_disks to be the
old value, and then reset it afterwards.
All other fields are cleanly separated with the main field being
the 'old' value and a new_* field available.
Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | Grow.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1676,8 +1676,10 @@ static int reshape_array(char *container, int fd, char *devname, if (info->reshape_active) { int new_level = info->new_level; info->new_level = UnSet; + info->array.raid_disks -= info->delta_disks; msg = analyse_change(info, &reshape); info->new_level = new_level; + info->array.raid_disks += info->delta_disks; if (!restart) /* Make sure the array isn't read-only */ ioctl(fd, RESTART_ARRAY_RW, 0); |