diff mbox series

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

Message ID 20240202163835.9652-2-mariusz.tkaczyk@linux.intel.com (mailing list archive)
State Superseded
Headers show
Series Revert bug prone commits | expand

Commit Message

Mariusz Tkaczyk Feb. 2, 2024, 4:38 p.m. UTC
This reverts commit d8d09c1633b2f06f88633ab960aa02b41a6bdfb6.

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

Comments

Paul Menzel Feb. 2, 2024, 5:27 p.m. UTC | #1
Dear Mariusz,


Thank you for the patch.

Am 02.02.24 um 17:38 schrieb Mariusz Tkaczyk:
> This reverts commit d8d09c1633b2f06f88633ab960aa02b41a6bdfb6.

It’d be great if you elaborated. What regressed, and how can it be 
reproduced?

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

[…]


Kind regards,

Paul
Mariusz Tkaczyk Feb. 5, 2024, 9:45 a.m. UTC | #2
On Fri, 2 Feb 2024 18:27:04 +0100
Paul Menzel <pmenzel@molgen.mpg.de> wrote:

> Dear Mariusz,
> 
> 
> Thank you for the patch.
> 
> Am 02.02.24 um 17:38 schrieb Mariusz Tkaczyk:
> > This reverts commit d8d09c1633b2f06f88633ab960aa02b41a6bdfb6.  
> 
> It’d be great if you elaborated. What regressed, and how can it be 
> reproduced?
> 

Thanks, for comment.
After analysis I see that only second one needs to be reverted.
I will submit v2 with explanation and reproduction steps.

Thanks,
Mariusz
diff mbox series

Patch

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;