linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: "Czarnowska, Anna" <anna.czarnowska@intel.com>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"Ciechanowski, Ed" <ed.ciechanowski@intel.com>,
	"Hawrylewicz Czarnowski,
	Przemyslaw" <przemyslaw.hawrylewicz.czarnowski@intel.com>,
	"Labun, Marcin" <Marcin.Labun@intel.com>,
	"Neubauer, Wojciech" <Wojciech.Neubauer@intel.com>
Subject: Re: [PATCH 1/2] Assemble: we need to read policy to know array domains
Date: Wed, 5 Jan 2011 13:43:39 +1100	[thread overview]
Message-ID: <20110105134339.773ec38d@notabene.brown> (raw)
In-Reply-To: <A9DE54D0CD747C4CB06DCE5B6FA2246F010E759F49@irsmsx504.ger.corp.intel.com>

On Tue, 4 Jan 2011 14:05:09 +0000 "Czarnowska, Anna"
<anna.czarnowska@intel.com> wrote:

> >From ae360c641fc5c266bb419612e6542b6f9f3e38ca Mon Sep 17 00:00:00 2001
> From: Anna Czarnowska <anna.czarnowska@intel.com>
> Date: Tue, 4 Jan 2011 11:47:34 +0100
> Subject: [PATCH 1/2] Assemble: we need to read policy to know array domains
> Cc: linux-raid@vger.kernel.org, Williams, Dan J <dan.j.williams@intel.com>, Ciechanowski, Ed <ed.ciechanowski@intel.com>
> 
> Policy must be read on all disks identified as array members
> to get array's domains list.
> Currently it is only read on first array member in auto assembly mode.
> 
> Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
> ---
>  Assemble.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/Assemble.c b/Assemble.c
> index 5725b23..ed59e8b 100644
> --- a/Assemble.c
> +++ b/Assemble.c
> @@ -547,7 +547,8 @@ int Assemble(struct supertype *st, char *mddev,
>  	loop:
>  		/* Collect domain information from members only */
>  		if (tmpdev && tmpdev->used == 1)
> -			domain_merge(&domains, pol, tst?tst->ss->name:NULL);
> +			domain_merge(&domains, pol?pol:devnum_policy(stb.st_rdev),
> +				     tst?tst->ss->name:NULL);
>  		dev_policy_free(pol);
>  		pol = NULL;
>  		if (tst)

Thanks.
I've applied this, though I change it to store the newly read policy into
'pol' so that it would get freed appropriately.

NeilBrown


      reply	other threads:[~2011-01-05  2:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-04 14:05 [PATCH 1/2] Assemble: we need to read policy to know array domains Czarnowska, Anna
2011-01-05  2:43 ` NeilBrown [this message]

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=20110105134339.773ec38d@notabene.brown \
    --to=neilb@suse.de \
    --cc=Marcin.Labun@intel.com \
    --cc=Wojciech.Neubauer@intel.com \
    --cc=anna.czarnowska@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ed.ciechanowski@intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=przemyslaw.hawrylewicz.czarnowski@intel.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).