Michael Tokarev: super0: do not override uuid with homehost (#686703)

Michael Tokarev mjt at alioth.debian.org
Sun Oct 28 20:40:21 UTC 2012


Module: mdadm
Branch: master
Commit: 2cf19e2722d872d88e5c5afd5b672b849734c912
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=2cf19e2722d872d88e5c5afd5b672b849734c912

Author: Michael Tokarev <mjt at tls.msk.ru>
Date:   Sun Oct 28 20:56:41 2012 +0400

super0: do not override uuid with homehost (#686703)

---

 debian/changelog                                   |    3 ++
 debian/patches/series                              |    1 +
 ...super0-do-not-override-uuid-with-homehost.patch |   34 ++++++++++++++++++++
 3 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 49615af..2a98218 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,9 @@ mdadm (3.2.5-4) UNRELEASED; urgency=low
     (Closes: #691668).
   * fix segfaults in Detail() - mdadm --detail may segfault if a drive
     has been removed from the array (Closes: #691670)
+  * super0: do not override uuid with homehost.  The bug prevented
+    re-creating an array with v0.90 superblock with the specified uuid
+    when homehost is also specified.  (Closes: #686703)
 
  -- Michael Tokarev <mjt at tls.msk.ru>  Sat, 20 Oct 2012 19:20:12 +0400
 
diff --git a/debian/patches/series b/debian/patches/series
index 19382de..3b3e86d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ sha1-includes.diff
 spelling-and-manpages.patch
 fix-enough-function-for-RAID10.patch
 fix-segfaults-in-detail.patch
+super0-do-not-override-uuid-with-homehost.patch
diff --git a/debian/patches/super0-do-not-override-uuid-with-homehost.patch b/debian/patches/super0-do-not-override-uuid-with-homehost.patch
new file mode 100644
index 0000000..70f0f28
--- /dev/null
+++ b/debian/patches/super0-do-not-override-uuid-with-homehost.patch
@@ -0,0 +1,34 @@
+From 3713633a30349773a83bd8257cdd64b86ce32dbd Mon Sep 17 00:00:00 2001
+From: Michael Tokarev <mjt at tls.msk.ru>
+Date: Sat, 20 Oct 2012 15:40:02 +0400
+Subject: super0: do not override uuid with homehost
+Bug-Debian: http://bugs.debian.org/686703
+Comment: from stable/bugfix upstream 3.2.6 version
+
+When --uuid is specified in the command line, even for v0.90
+superblock we override last portion of uuid with data from
+--homehost, which is wrong (and disagrees with the manpage).
+Only use homehost in super0 if no uuid is specified.
+
+Signed-off-By: Michael Tokarev <mjt at tls.msk.ru>
+Signed-off-by: NeilBrown <neilb at suse.de>
+---
+ super0.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/super0.c b/super0.c
+index 1375799..ca4c082 100644
+--- a/super0.c
++++ b/super0.c
+@@ -657,7 +657,7 @@ static int init_super0(struct supertype *st, mdu_array_info_t *info,
+ 		if (rfd >= 0)
+ 			close(rfd);
+ 	}
+-	if (homehost) {
++	if (homehost && !uuid) {
+ 		char buf[20];
+ 		char *hash = sha1_buffer(homehost,
+ 					 strlen(homehost),
+-- 
+1.7.10.4
+




More information about the pkg-mdadm-commits mailing list