linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Assemble: we need to read policy to know array domains
@ 2011-01-04 14:05 Czarnowska, Anna
  2011-01-05  2:43 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: Czarnowska, Anna @ 2011-01-04 14:05 UTC (permalink / raw)
  To: Neil Brown
  Cc: linux-raid@vger.kernel.org, Williams, Dan J, Ciechanowski, Ed,
	Hawrylewicz Czarnowski, Przemyslaw, Labun, Marcin,
	Neubauer, Wojciech

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


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

* Re: [PATCH 1/2] Assemble: we need to read policy to know array domains
  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
  0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2011-01-05  2:43 UTC (permalink / raw)
  To: Czarnowska, Anna
  Cc: linux-raid@vger.kernel.org, Williams, Dan J, Ciechanowski, Ed,
	Hawrylewicz Czarnowski, Przemyslaw, Labun, Marcin,
	Neubauer, Wojciech

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


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

end of thread, other threads:[~2011-01-05  2:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).