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

Christoph Hellwig
2015-05-12T08:20:50Z

On Mon, May 11, 2015 at 04:52:14PM +0200, Hannes Reinecke wrote:
> Sigh. This is one of the sore topics with the SCSI stack.
>
> The default sense code handling is correct only for filesystem
> I/O; BLOCK_PC callers are expected to handle all errors themselves.
> Which typically is a pain as one always forgets the one or the
> other issue.
>
> The device handlers have a callout into that generic function
> to handle and device handler specific sense codes.
>
> So with that I do agree that calling alua_check_sense() here
> is dubious as it should have been run from the generic path already.
>
> Will be checking and fixing it up.

What I meant is that we really shouldn't handle the sense codes in
the ALUA handler - they are generic SCSІ sense codes and we'd better
handle them in the core code, ditto for the other device handlers actually.

Now the problem of BLOCK_PC ignoring the sense handling is a different
one, but why don't we export scsi_check_sense and allow BLOCK_PC callers
like the device handlers reuse the logic instead of duplicating it?
--
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