linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: mwilck@arcor.de
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH 1/2] select_devices: fix scanning of container members with dev list
Date: Mon, 24 Jun 2013 16:55:47 +1000	[thread overview]
Message-ID: <20130624165547.0c0bd93b@notabene.brown> (raw)
In-Reply-To: <1371759665-5625-1-git-send-email-mwilck@arcor.de>

[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]

On Thu, 20 Jun 2013 22:21:04 +0200 mwilck@arcor.de wrote:

> commit b3908491 "Detail: fix --brief --verbose" introduced a
> problem when a mdadm.conf file generated with
> "mdadm --Detail --brief --verbose" is later scanned with
> "mdadm --Assemble --scan --config=mdadm.conf"
> 
> mdadm -Dbv will print a "devices" list now, but because the
> container device is not in that list, it won't be considered
> for assembly.
> 
> This patch fixes that by moving the test for member devices
> further down, after the check for a container.
> 
> Signed-off-by: Martin Wilck <mwilck@arcor.de>

Hi Martin,
 I really don't like this.  If there is a "device=" entry then it should not
 even open anything not listed.

 Can you give me more details about the problem you are experiencing?  Maybe
 the problem is in "mdadm -Dbv".

Thanks,
NeilBrown

> ---
>  Assemble.c |   15 ++++++++-------
>  1 files changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/Assemble.c b/Assemble.c
> index c927c20..1f023e8 100644
> --- a/Assemble.c
> +++ b/Assemble.c
> @@ -170,13 +170,6 @@ static int select_devices(struct mddev_dev *devlist,
>  		if (tmpdev->used > 1)
>  			continue;
>  
> -		if (ident->devices &&
> -		    !match_oneof(ident->devices, devname)) {
> -			if (report_mismatch)
> -				pr_err("%s is not one of %s\n", devname, ident->devices);
> -			continue;
> -		}
> -
>  		tst = dup_super(st);
>  
>  		dfd = dev_open(devname, O_RDONLY);
> @@ -365,6 +358,14 @@ static int select_devices(struct mddev_dev *devlist,
>  			int rv = 0;
>  			struct mddev_ident *match;
>  
> +			if (ident->devices &&
> +			    !match_oneof(ident->devices, devname)) {
> +				if (report_mismatch)
> +					pr_err("%s is not one of %s\n", devname,
> +					       ident->devices);
> +				goto loop;
> +			}
> +
>  			content = *contentp;
>  			tst->ss->getinfo_super(tst, content, NULL);
>  


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  parent reply	other threads:[~2013-06-24  6:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 20:21 [PATCH 1/2] select_devices: fix scanning of container members with dev list mwilck
2013-06-20 20:21 ` [PATCH 2/2] Detail: deterministic ordering in --brief --verbose mwilck
2013-06-20 20:26   ` Martin Wilck
2013-06-24  6:57   ` NeilBrown
2013-06-24  6:55 ` NeilBrown [this message]
2013-06-27 18:15   ` [PATCH 1/2] select_devices: fix scanning of container members with dev list Martin Wilck
2013-06-27 19:38     ` Martin Wilck
2013-07-02  1:20       ` 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=20130624165547.0c0bd93b@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=mwilck@arcor.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 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).