Re: [PATCH 1/8] dm-mpath, scsi_dh: don't let dm detach device handlers

Hannes Reinecke
2015-05-11T12:52:01Z

On 05/10/2015 08:40 PM, Christoph Hellwig wrote:
> While allowing dm-mpath to attach device handlers is a functionality we need
> for backwards compatibility reason there is no reason to reference count
> them and detach them if dm-mpath stops using the device for some reason.
>
> If the device handler works for the given device it can just stay attached,
> and we can take the retain_hw_handler codepath.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
[ .. ]
>
> @@ -597,20 +595,14 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps
> }
>
> if (m->hw_handler_name) {
> - /*
> - * Increments scsi_dh reference, even when using an
> - * already-attached handler.
> - */
> r = scsi_dh_attach(q, m->hw_handler_name);
> if (r == -EBUSY) {
> - /*
> - * Already attached to different hw_handler:
> - * try to reattach with correct one.
> - */
> - scsi_dh_detach(q);
> - r = scsi_dh_attach(q, m->hw_handler_name);
> + char b[BDEVNAME_SIZE];
> +

Whitespace error ...

Cheers,

Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html