Thread (5 messages) 5 messages, 2 authors, 2024-02-05
STALE902d

[PATCH 1/2] Revert "Fix assembling RAID volume by using incremental"

From: Mariusz Tkaczyk <hidden>
Date: 2024-02-02 16:39:13
Subsystem: the rest · Maintainer: Linus Torvalds

This reverts commit d8d09c1633b2f06f88633ab960aa02b41a6bdfb6.

Signed-off-by: Mariusz Tkaczyk <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help