Thread (76 messages) 76 messages, 2 authors, 2010-11-30
STALE5710d

[PATCH 15/53] FIX: Unfreeze not only container for external metadata

From: Adam Kwolek <hidden>
Date: 2010-11-26 08:05:45
Subsystem: the rest · Maintainer: Linus Torvalds

Unfreeze for external metadata case should unfreeze arrays and container,
not only container as so far. Unfreeze() function doesn't know
what the changes to configuration was made so far, and if arrays
are pulled from frozen state in md.
Unfreeze() has to make sure by performing array unfreeze that all arrays
are not frozen and then unblock monitor.

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

 Grow.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/Grow.c b/Grow.c
index 4060129..8ca1812 100644
--- a/Grow.c
+++ b/Grow.c
@@ -495,16 +495,14 @@ static void unfreeze(struct supertype *st, int frozen)
 		return;
 
 	if (st->ss->external)
-		return unfreeze_container(st);
-	else {
-		struct mdinfo *sra = sysfs_read(-1, st->devnum, GET_VERSION);
-
-		if (sra)
-			sysfs_set_str(sra, NULL, "sync_action", "idle");
-		else
-			fprintf(stderr, Name ": failed to unfreeze array\n");
-		sysfs_free(sra);
-	}
+		unfreeze_container(st);
+
+	struct mdinfo *sra = sysfs_read(-1, st->devnum, GET_VERSION);
+	if (sra)
+		sysfs_set_str(sra, NULL, "sync_action", "idle");
+	else
+		fprintf(stderr, Name ": failed to unfreeze array\n");
+	sysfs_free(sra);
 }
 
 static void wait_reshape(struct mdinfo *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