[PATCH 2/6] Set reshape.after.data_disks for raid0<->raid10 takeover

[PATCH 2/6] Set reshape.after.data_disks for raid0<->raid10 takeover

am 13.01.2011 16:32:35 von krzysztof.wojcik

reshape.after.data_disks field must be initiated
for raid0<->rai10 transition.
Instead calculated spares_needed variable in reshape_array
function has random value.

Signed-off-by: Krzysztof Wojcik
---
Grow.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Grow.c b/Grow.c
index 763287b..47a8fb8 100644
--- a/Grow.c
+++ b/Grow.c
@@ -966,6 +966,7 @@ char *analyse_change(struct mdinfo *info, struct reshape *re)
re->level = 0;
re->parity = 0;
re->before.data_disks = new_disks;
+ re->after.data_disks = re->before.data_disks;
re->before.layout = 0;
re->backup_blocks = 0;
return NULL;
@@ -1003,6 +1004,7 @@ char *analyse_change(struct mdinfo *info, struct reshape *re)
re->parity = 0;
re->before.data_disks = (info->array.raid_disks +
info->delta_disks);
+ re->after.data_disks = re->before.data_disks;
re->before.layout = info->new_layout;
re->backup_blocks = 0;
return NULL;

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html