Re: [PATCH 1/2] Assemble: we need to read policy to know array domains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

> >From ae360c641fc5c266bb419612e6542b6f9f3e38ca Mon Sep 17 00:00:00 2001
> From: Anna Czarnowska <anna.czarnowska@xxxxxxxxx>
> 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@xxxxxxxxxxxxxxx, Williams, Dan J <dan.j.williams@xxxxxxxxx>, Ciechanowski, Ed <ed.ciechanowski@xxxxxxxxx>
> 
> 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@xxxxxxxxx>
> ---
>  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

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux