From 6ef421be178128544bfd488fba39503b7384a387 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 31 Jan 2011 15:30:15 +1100 Subject: [PATCH] Grow:make sure 'array' is up-to-date before SET_ARRAY_INFO The value of 'array' might not be current, so SET_ARRAY_INFO and fail. Just refresh it before setting raid_disks. Signed-off-by: NeilBrown --- Grow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Grow.c b/Grow.c index e12b5271..da39af76 100644 --- a/Grow.c +++ b/Grow.c @@ -1914,6 +1914,7 @@ started: reshape.before.layout == reshape.after.layout && st->ss->external == 0) { /* use SET_ARRAY_INFO but only if reshape hasn't started */ + ioctl(fd, GET_ARRAY_INFO, &array); array.raid_disks = reshape.after.data_disks + reshape.parity; if (!info->reshape_active && ioctl(fd, SET_ARRAY_INFO, &array) != 0) { -- 2.47.3