Thread (5 messages) 5 messages, 1 author, 2011-02-23

[PATCH 2/4] FIX: Prevent reshape auto start during assembly for external metadata

flat view
STALE5710d

From: Adam Kwolek <hidden>
Date: 2011-02-23 13:51:48
Subsystem: the rest · Maintainer: Linus Torvalds

When md starts array and reshape position is set, md continues reshape
automatically. To prevent doing this for external metadata to allow
for later reshape configuration, clear temporary reshape_active flag
this causes that reshape parameters will not be set to array and md
will not start reshape.

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

 Assemble.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Assemble.c b/Assemble.c
index 4d41081..bffbbf0 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1506,15 +1506,18 @@ int assemble_container_content(struct supertype *st, int mdfd,
 	int working = 0, preexist = 0;
 	int expansion = 0;
 	struct map_ent *map = NULL;
+	int reshape_active;
 
 	sysfs_init(content, mdfd, 0);
-
+	reshape_active = content->reshape_active;
+	content->reshape_active = 0;
 	sra = sysfs_read(mdfd, 0, GET_VERSION);
 	if (sra == NULL || strcmp(sra->text_version, content->text_version) != 0)
 		if (sysfs_set_array(content, md_get_version(mdfd)) != 0) {
 			close(mdfd);
 			return 1;
 		}
+	content->reshape_active = reshape_active;
 	if (sra)
 		sysfs_free(sra);
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help