Skip to contentSkip to conversation

mdadm: fix update=resync regression

PATCH In review Mariusz Tkaczyk 1 participant 2 messages Feb 9, 2024 – Feb 13, 2024 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mdadm: fix update=resync regression

mdadm --assemble --update=resync started failing with the error "mdadm: --update=resync not understood for 1.x metadata".

It is a regression. Add omitted branch to fix error.

Resubmitted, original author is not responding.
https://lore.kernel.org/linux-raid/[email protected]/

Fixes 7e8daba8b793 ("super1: refactor the code for enum")
---
 super1.c | 4 ++++
 1 file changed, 4 insertions(+)
super1.c +4 -0
index 5fd2228efbd6..871d19f0398c 100644
@@ -1348,6 +1348,10 @@ static int update_super1(struct supertype *st, struct mdinfo *info,
 			__cpu_to_le16(info->disk.raid_disk);
 		break;
 	}
+	case UOPT_RESYNC:
+		/* make sure resync happens */
+		sb->resync_offset = 0;
+		break;
 	case UOPT_UUID:
 		copy_uuid(sb->set_uuid, info->uuid, super1.swapuuid);
 
Signature · 1 line
2.35.3
#1 lore raw
Quoted 11 lines · On Fri, 9 Feb 2024 14:02:16 +0100 Mariusz Tkaczyk…

mdadm --assemble --update=resync started failing with the error "mdadm: --update=resync not understood for 1.x metadata".

It is a regression. Add omitted branch to fix error.

Resubmitted, original author is not responding.
https://lore.kernel.org/linux-raid/[email protected]/

Fixes 7e8daba8b793 ("super1: refactor the code for enum")

---

No comments, Applied!

Thanks,
Mariusz