[dm-devel] [PATCH 50/78] Allow zero-sized devices during configuration

Benjamin Marzinski bmarzins at redhat.com
Fri Mar 27 03:56:09 UTC 2015


On Mon, Mar 16, 2015 at 01:36:37PM +0100, Hannes Reinecke wrote:
> A size of '0' doesn't indicate an invalid device; other paths might
> end up with a correct size.

don't we also need to change this is ev_add_path, then?

-Ben

> 
> Signed-off-by: Hannes Reinecke <hare at suse.de>
> ---
>  libmultipath/configure.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/libmultipath/configure.c b/libmultipath/configure.c
> index 2c10c22..ddbd3ed 100644
> --- a/libmultipath/configure.c
> +++ b/libmultipath/configure.c
> @@ -768,8 +768,8 @@ coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid, int force_r
>  			continue;
>  
>  		/* 3. if path has disappeared */
> -		if (!pp1->size) {
> -			orphan_path(pp1, "invalid size");
> +		if (pp1->state == PATH_REMOVED) {
> +			orphan_path(pp1, "path removed");
>  			continue;
>  		}
>  
> @@ -806,10 +806,11 @@ coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid, int force_r
>  			if (strcmp(pp1->wwid, pp2->wwid))
>  				continue;
>  
> -			if (!pp2->size)
> -				continue;
> +			if (!mpp->size && pp2->size)
> +				mpp->size = pp2->size;
>  
> -			if (pp2->size != mpp->size) {
> +			if (mpp->size && pp2->size &&
> +			    pp2->size != mpp->size) {
>  				/*
>  				 * ouch, avoid feeding that to the DM
>  				 */
> -- 
> 1.8.4.5




More information about the dm-devel mailing list