Skip to contentSkip to conversation

Assemble: apply sysfs rules

PATCH Applied Kinga Tanska 2 participants 2 messages Oct 12, 2021 – Oct 19, 2021 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Assemble: apply sysfs rules

During assemblation container with quiet flag, sysfs rules are not applied. This commit makes sysfs_rules_apply() independent from verbose condition.

---
 Assemble.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Assemble.c +2 -3
index 0df46244..20fd97b5 100644
@@ -1125,6 +1125,7 @@ static int start_array(int mdfd,
 	}
 
 	if (content->array.level == LEVEL_CONTAINER) {
+		sysfs_rules_apply(mddev, content);
 		if (c->verbose >= 0) {
 			pr_err("Container %s has been assembled with %d drive%s",
 			       mddev, okcnt + sparecnt + journalcnt,
@@ -1132,10 +1133,8 @@ static int start_array(int mdfd,
 			if (okcnt < (unsigned)content->array.raid_disks)
 				fprintf(stderr, " (out of %d)\n",
 					content->array.raid_disks);
-			else {
+			else
 				fprintf(stderr, "\n");
-				sysfs_rules_apply(mddev, content);
-			}
 		}
 
 		if (st->ss->validate_container) {
Signature · 1 line
2.26.2
Applied
#1 lore raw
Quoted 7 lines · Kinga Tanska

During assemblation container with quiet flag, sysfs rules are not applied. This commit makes sysfs_rules_apply() independent from verbose condition.

---
 Assemble.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Applied!

Thanks,
Jes