All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: jes@trained-monkey.org
Cc: linux-raid@vger.kernel.org,
	Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Subject: [PATCH 1/2] Revert "Fix assembling RAID volume by using incremental"
Date: Fri,  2 Feb 2024 17:38:34 +0100	[thread overview]
Message-ID: <20240202163835.9652-2-mariusz.tkaczyk@linux.intel.com> (raw)
In-Reply-To: <20240202163835.9652-1-mariusz.tkaczyk@linux.intel.com>

This reverts commit d8d09c1633b2f06f88633ab960aa02b41a6bdfb6.

Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
---
 Assemble.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Assemble.c b/Assemble.c
index 9d042055ad4e..550369ae8403 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1984,10 +1984,12 @@ int assemble_container_content(struct supertype *st, int mdfd,
 		return 1;
 	}
 
-	/* Fill sysfs properties only if they are not set. Determine it by checking text_version
-	 * and ignoring special character on the first place.
-	 */
-	if (strcmp(sra->text_version + 1, content->text_version + 1) != 0) {
+	if (strcmp(sra->text_version, content->text_version) != 0) {
+		if (content->array.major_version == -1 &&
+		    content->array.minor_version == -2 &&
+		    c->readonly &&
+		    content->text_version[0] == '/')
+			content->text_version[0] = '-';
 		if (sysfs_set_array(content, 9003) != 0) {
 			sysfs_free(sra);
 			return 1;
-- 
2.35.3


  reply	other threads:[~2024-02-02 16:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-02 16:38 [PATCH 0/2] Revert bug prone commits Mariusz Tkaczyk
2024-02-02 16:38 ` Mariusz Tkaczyk [this message]
2024-02-02 17:27   ` [PATCH 1/2] Revert "Fix assembling RAID volume by using incremental" Paul Menzel
2024-02-05  9:45     ` Mariusz Tkaczyk
2024-02-02 16:38 ` [PATCH 2/2] Revert "mdadm: remove container_enough logic" Mariusz Tkaczyk

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=20240202163835.9652-2-mariusz.tkaczyk@linux.intel.com \
    --to=mariusz.tkaczyk@linux.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.