diff mbox series

[1/2] mdadm: set swapuuid in all handlers

Message ID 20240318151930.8218-2-mariusz.tkaczyk@linux.intel.com (mailing list archive)
State Accepted
Headers show
Series mdadm: Fix --detail --export issue | expand

Commit Message

Mariusz Tkaczyk March 18, 2024, 3:19 p.m. UTC
It is not set, so it should be 0 but it may vary on compilation
settings. Set it always to 0.

metadata should care to set UUID and read in proper endianness so it
doesn't follow super1 concept of swapuuid to depend on endianness.

It is not an attempt to fix endianness issues.

Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
---
 super-ddf.c   | 1 +
 super-intel.c | 1 +
 super0.c      | 2 ++
 3 files changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/super-ddf.c b/super-ddf.c
index 7571e3b740c6..94ac5ff3965a 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -5162,6 +5162,7 @@  struct superswitch super_ddf = {
 	.default_geometry = default_geometry_ddf,
 
 	.external	= 1,
+	.swapuuid	= 0,
 
 /* for mdmon */
 	.open_new       = ddf_open_new,
diff --git a/super-intel.c b/super-intel.c
index 7714045575b2..e1754f29246c 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -13116,6 +13116,7 @@  struct superswitch super_imsm = {
 	.validate_ppl	= validate_ppl_imsm,
 
 	.external	= 1,
+	.swapuuid	= 0,
 	.name = "imsm",
 
 /* for mdmon */
diff --git a/super0.c b/super0.c
index a7c5f813d926..9b8a1bd63bb7 100644
--- a/super0.c
+++ b/super0.c
@@ -1369,5 +1369,7 @@  struct superswitch super0 = {
 	.locate_bitmap = locate_bitmap0,
 	.write_bitmap = write_bitmap0,
 	.free_super = free_super0,
+
+	.swapuuid = 0,
 	.name = "0.90",
 };