All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: NeilBrown <neilb@suse.de>
Cc: linux RAID <linux-raid@vger.kernel.org>
Subject: Re: mdadm: super0: do not override uuid with homehost
Date: Sat, 20 Oct 2012 20:09:27 +0400	[thread overview]
Message-ID: <5082CCB7.3010402@msgid.tls.msk.ru> (raw)
In-Reply-To: <20121020154002.F24612C12@gandalf.tls.msk.ru>

On 20.10.2012 19:40, Michael Tokarev wrote:
> 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) {

Besides, do we need to check *homehost here too,
in order to be able to unset homehost given in
config file or whatnot, by setting it to an empty
string?

/mjt


>  		char buf[20];
>  		char *hash = sha1_buffer(homehost,
>  					 strlen(homehost),


  reply	other threads:[~2012-10-20 16:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-20 15:40 mdadm: super0: do not override uuid with homehost Michael Tokarev
2012-10-20 16:09 ` Michael Tokarev [this message]
2012-10-21 21:50   ` NeilBrown

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=5082CCB7.3010402@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.