Thread (36 messages) flat view 36 messages, 2 authors, 2011-01-06
STALE5710d

[PATCH 13/34] FIX: Get array information in reshape_array()

From: Adam Kwolek <hidden>
Date: 2011-01-04 14:37:20
Subsystem: the rest · Maintainer: Linus Torvalds

Uninitialized array structure is used.

Signed-off-by: Adam Kwolek <redacted>
---

 Grow.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Grow.c b/Grow.c
index c568a55..6dbc3b7 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1637,6 +1637,10 @@ static int reshape_array(char *container, int fd, char *devname,
 		fprintf(stderr, Name ": %s\n", msg);
 		return 1;
 	}
+	if (ioctl(fd, GET_ARRAY_INFO, &array) != 0) {
+		dprintf("Canot get array information.\n");
+		return 1;
+	}
 	spares_needed =  max(reshape.before.raid_disks,
 			     reshape.after.raid_disks) - array.raid_disks;
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help