All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kinga Tanska <kinga.tanska@intel.com>
To: linux-raid@vger.kernel.org
Cc: jes@trained-monkey.org
Subject: [PATCH] Assemble: apply sysfs rules
Date: Tue, 12 Oct 2021 12:16:16 +0200	[thread overview]
Message-ID: <20211012101616.14794-1-kinga.tanska@intel.com> (raw)

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

Signed-off-by: Kinga Tanska <kinga.tanska@intel.com>
---
 Assemble.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Assemble.c b/Assemble.c
index 0df46244..20fd97b5 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -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) {
-- 
2.26.2


             reply	other threads:[~2021-10-12 10:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12 10:16 Kinga Tanska [this message]
2021-10-19  6:50 ` [PATCH] Assemble: apply sysfs rules Jes Sorensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211012101616.14794-1-kinga.tanska@intel.com \
    --to=kinga.tanska@intel.com \
    --cc=jes@trained-monkey.org \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.