Thread (6 messages) 6 messages, 3 authors, 2022-08-24
STALE1400d
Revisions (4)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v3 current

[PATCH v3 1/2] Assemble: check if device is container before scheduling force-clean update

From: Kinga Tanska <hidden>
Date: 2022-08-19 08:01:51
Subsystem: the rest · Maintainer: Linus Torvalds

Up to now using assemble with force flag making each array as clean.
Force-clean should not be done for the container. This commit add
check if device is different than container before cleaning.

Signed-off-by: Kinga Tanska <redacted>
---
 Assemble.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Assemble.c b/Assemble.c
index 704b8293..f31372db 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1813,10 +1813,9 @@ try_again:
 		}
 #endif
 	}
-	if (c->force && !clean &&
+	if (c->force && !clean && content->array.level != LEVEL_CONTAINER &&
 	    !enough(content->array.level, content->array.raid_disks,
-		    content->array.layout, clean,
-		    avail)) {
+		    content->array.layout, clean, avail)) {
 		change += st->ss->update_super(st, content, "force-array",
 					       devices[chosen_drive].devname, c->verbose,
 					       0, NULL);
-- 
2.26.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help