linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mdadm: super0: do not override uuid with homehost
@ 2012-10-20 15:40 Michael Tokarev
  2012-10-20 16:09 ` Michael Tokarev
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Tokarev @ 2012-10-20 15:40 UTC (permalink / raw)
  To: NeilBrown; +Cc: Michael Tokarev, linux RAID, 686703

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@tls.msk.ru>

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),

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-21 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-20 15:40 mdadm: super0: do not override uuid with homehost Michael Tokarev
2012-10-20 16:09 ` Michael Tokarev
2012-10-21 21:50   ` NeilBrown

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).