[PATCH 6/8] nvme: handle invalid SCSI LBAs correctly

Keith Busch keith.busch at intel.com
Mon Apr 27 12:55:07 PDT 2015


On Mon, 27 Apr 2015, Christoph Hellwig wrote:
> On Mon, Apr 27, 2015 at 06:00:13PM +0000, Busch, Keith wrote:
>>> Trap LBAs behind the end of the device and return the correct
>>> sense code.
>>
>> Should the driver be responsible to catch these kinds of errors
>> on a passthrough IOCTL? Why not let the device deal with it?
>
> Because drives don't seem to report the right error code, and thus
> the translation isn't fully spec compliant.

Hm, the spec provides translations for status codes but doesn't say it
should short circuit the process. This layer is responsible for accurate
translations, so we'd fail complaince if we don't respect the controller's
completion, even if it returns the wrong code.



More information about the Linux-nvme mailing list