Thread (19 messages) 19 messages, 2 authors, 2011-03-10

[PATCH 5/9] FIX: Unfreeze array on success only during reshape continuation

flat view
STALE5693d

From: Adam Kwolek <hidden>
Date: 2011-03-09 13:46:10
Subsystem: the rest · Maintainer: Linus Torvalds

When reshape continuation fails, reshaped array should remain frozen
to allow user for repair action (mdmon will not change array state).
Setting restart to 0 was moved down to allow failure detection.

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

 Grow.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Grow.c b/Grow.c
index e37fc57..67bbb26 100644
--- a/Grow.c
+++ b/Grow.c
@@ -2255,11 +2255,12 @@ int reshape_container(char *container, char *devname,
 				   content, force,
 				   backup_file, quiet, 1, restart);
 		close(fd);
-		restart = 0;
 		if (rv)
 			break;
+		restart = 0;
 	}
-	unfreeze(st);
+	if (restart == 0)
+		unfreeze(st);
 	sysfs_free(cc);
 	exit(0);
 }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help