[PATCH] FIX: delta_disk can have UnSet value
From: Adam Kwolek <hidden>
Date: 2011-01-27 09:28:28
Delta_disk can be set to UnSet value. This can a cause to pass wrong parameter to reshape_super(). Signed-off-by: Adam Kwolek <redacted> --- Grow.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Grow.c b/Grow.c
index daf310b..bc015c6 100644
--- a/Grow.c
+++ b/Grow.c@@ -1575,7 +1575,9 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file, if (reshape_super(st, info.component_size, info.new_level, info.new_layout, info.new_chunk, - info.array.raid_disks + info.delta_disks, + info.delta_disks == UnSet ? + info.array.raid_disks : + info.array.raid_disks + info.delta_disks, backup_file, devname, quiet)) { rv = 1; goto release;