Re: [PATCH 11/17] scsi_dh_alua: simplify sense code handling

Christoph Hellwig
2015-05-11T06:58:04Z

On Mon, May 04, 2015 at 02:42:17PM +0200, Hannes Reinecke wrote:
> Most sense code is already handled in the generic
> code, so we shouldn't be adding special cases here.
> However, when doing so we need to check for
> unit attention whenever we're sending an internal
> command.

Shouldn't we move handling of all these sense codes to common code? They
are part of the generic SPC list of sense codes, so splitting them up
into two functions is rather confusing.

> @@ -474,6 +440,8 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_port_group *pg, int w
> }
>
> err = alua_check_sense(sdev, &sense_hdr);
> + if (sense_hdr.sense_key == UNIT_ATTENTION)
> + err = ADD_TO_MLQUEUE;

And this really should be a separate patch.