Re: [PATCH 02/17] scsi_dh_alua: Disable ALUA handling for non-disk devices

Hannes Reinecke
2015-05-11T10:25:52Z

On 05/11/2015 08:46 AM, Christoph Hellwig wrote:
> On Mon, May 04, 2015 at 02:42:08PM +0200, Hannes Reinecke wrote:
>> Non-disk devices should be ignored when detecting
>> ALUA capabilities.
>
> Hmm. I don't think we should even attach the alua handler in this case,
> e.g. refine the check in scsi_dh_find_driver. But then again I don't
> remember how the spec wording actually disallows this, and a quick grep
> of SPC-4 can't find anything either. Can you put a reference to the spec
> section that disallows attachment to non-disk devices into the code?
>
The spec wording doesn't explicitly disallowing you from doing so
(unless you're using referrals).
But in realiter we're using the ALUA device handler only when
multipathing is used, which in turn runs on disk devices only.
So we can limit ourselves to disk devices, too.

Everything else (like tapes or tape changers) will have to
implement their own logic anyway; tape support in multipathing
with or without ALUA is too horrible to contemplate ...

>> + if (sdev->type != TYPE_DISK &&
>> + sdev->type != TYPE_RBC &&
>> + sdev->type != TYPE_OSD) {
>
> And does it really allow RBC (but not ZBC)?
>
Thought so, but I'll have to cross-check.
Maybe it's time to implement a 'scsi_is_disk_type()' macro...

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