linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: linux-raid@vger.kernel.org
Cc: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>,
	Xiao Ni <xni@redhat.com>, Jes Sorensen <jes@trained-monkey.org>
Subject: [PATCH 1/2] mdadm: set swapuuid in all handlers
Date: Mon, 18 Mar 2024 16:19:29 +0100	[thread overview]
Message-ID: <20240318151930.8218-2-mariusz.tkaczyk@linux.intel.com> (raw)
In-Reply-To: <20240318151930.8218-1-mariusz.tkaczyk@linux.intel.com>

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 --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",
 };
-- 
2.35.3


  reply	other threads:[~2024-03-18 15:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 15:19 [PATCH 0/2] mdadm: Fix --detail --export issue Mariusz Tkaczyk
2024-03-18 15:19 ` Mariusz Tkaczyk [this message]
2024-03-18 15:19 ` [PATCH 2/2] mdadm: Fix native --detail --export Mariusz Tkaczyk
2024-03-22 11:18 ` [PATCH 0/2] mdadm: Fix --detail --export issue 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=20240318151930.8218-2-mariusz.tkaczyk@linux.intel.com \
    --to=mariusz.tkaczyk@linux.intel.com \
    --cc=jes@trained-monkey.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=xni@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).