[patch] CTL should check condition INQUIRY with invalid LUN
Kenneth D. Merry
ken at freebsd.org
Tue Mar 6 00:17:33 UTC 2012
On Mon, Mar 05, 2012 at 14:46:52 -0800, Chuck Tuffli wrote:
> Currently, the CTL responds to INQUIRY commands targeted at invalid
> LUNs by returning valid data with the peripheral qualifier set to LU
> OFFLINE. This patch instead returns a check condition with LU NOT
> READY.
>
> Linux initiators see the LU OFFLINE and start creating SG devices, but
> are not able to finish. The offline also causes them to keep probing
> LUNs.
Linux used to behave properly. What version are you testing with?
Returning a check condition is not correct according to the spec. This is
from SPC-4 (r31):
"In response to an INQUIRY command received by an incorrect logical unit,
the SCSI target device shall return the INQUIRY data with the peripheral
qualifier set to the value defined in 6.4.2. The INQUIRY command shall
return CHECK CONDITION status only when the device server is unable to
return the requested INQUIRY data."
Since CTL can support a LUN at the requested address, but there isn't one
there, it returns OFFLINE status.
They should be issuing a REPORT LUNs and then probe the LUNs that are
returned...
Ken
--
Kenneth Merry
ken at FreeBSD.ORG
More information about the freebsd-scsi
mailing list