Re: [PATCH 3/9] dm-mpath: don't call scsi_dh_attach when we want to retain the attached handler

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

 



On Thu, Apr 30 2015 at  1:32pm -0400,
Christoph Hellwig <hch@xxxxxx> wrote:

> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
>  drivers/md/dm-mpath.c | 20 +++++++++-----------
>  1 file changed, 9 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> index 9fb91ca..f6d40d3 100644
> --- a/drivers/md/dm-mpath.c
> +++ b/drivers/md/dm-mpath.c
> @@ -591,9 +591,7 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps
>  			kfree(m->hw_handler_params);
>  			m->hw_handler_params = NULL;
>  		}
> -	}
> -
> -	if (m->hw_handler_name) {
> +	} else if (m->hw_handler_name) {
>  		/*
>  		 * Increments scsi_dh reference, even when using an
>  		 * already-attached handler.
> @@ -604,15 +602,15 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps
>  			dm_put_device(ti, p->path.dev);
>  			goto bad;
>  		}
> +	}
>  
> -		if (m->hw_handler_params) {
> -			r = scsi_dh_set_params(q, m->hw_handler_params);
> -			if (r < 0) {
> -				ti->error = "unable to set hardware "
> -							"handler parameters";
> -				dm_put_device(ti, p->path.dev);
> -				goto bad;
> -			}
> +	if (m->hw_handler_name && m->hw_handler_params) {
> +		r = scsi_dh_set_params(q, m->hw_handler_params);
> +		if (r < 0) {
> +			ti->error = "unable to set hardware "
> +						"handler parameters";
> +			dm_put_device(ti, p->path.dev);
> +			goto bad;
>  		}
>  	}
>  

Would prefer to see the old weird error message line wrapping fixed up
to be on a single line (80 cols be damned).

Acked-by: Mike Snitzer <snitzer@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux