summaryrefslogtreecommitdiffstats
path: root/Grow.c
diff options
context:
space:
mode:
authorAdam Kwolek <adam.kwolek@intel.com>2011-04-19 09:25:43 +0200
committerNeilBrown <neilb@suse.de>2011-04-19 09:25:43 +0200
commit384e9be1330c29b40559f85dd0e6124bd0dfa535 (patch)
tree6d106bdb7df7a3d1f5b8aee286544b65b291ffc9 /Grow.c
parentFIX: Count correctly added devices (diff)
downloadmdadm-384e9be1330c29b40559f85dd0e6124bd0dfa535.tar.xz
mdadm-384e9be1330c29b40559f85dd0e6124bd0dfa535.zip
FIX: Check correctly raid disks during reshape restart
During reshape restart info->array.raid_disks contains new raid_disks number It cannot be compared against old disks number. Such check will always fail. Check raid disks array field against final disks number for restart. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to '')
-rw-r--r--Grow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Grow.c b/Grow.c
index 9c1f096a..9c630369 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1692,7 +1692,8 @@ static int reshape_array(char *container, int fd, char *devname,
if (restart &&
(reshape.level != info->array.level ||
reshape.before.layout != info->array.layout ||
- reshape.before.data_disks + reshape.parity != info->array.raid_disks)) {
+ reshape.before.data_disks + reshape.parity
+ != info->array.raid_disks - info->delta_disks)) {
fprintf(stderr, Name ": reshape info is not in native format -"
" cannot continue.\n");
goto release;