On 05/20/2015 06:08 AM, Ilias Tsitsimpis wrote:
On Tue, May 19, 2015 at 02:44PM, Andy Grover wrote:
After much discussion, give up on only passing a subset of SCSI commands
to userspace and pass them all. Based on what pscsi is doing, make sure
to set SCF_SCSI_DATA_CDB for I/O ops, and define attributes identical to
pscsi.
Make hw_block_size configurable via dev param.
Why does hw_block_size need to be configurable via dev params? Since
TCMU is now a full pass-through SCSI implementation, userspace gets to
answer the READ CAPACITY command and decide the hw_block_size itself.
Setting this parameter to a value (say 512) has no effect if the TCMU
handler replies to the READ CAPACITY command with a different value.
Hi Ilias, thanks for taking a look.
The reasoning was that dev_attrib.block_size is set from hw_block_size,
and block_size is then used in the device's "info" configfs entry, see
implementation and callsite of transport_dump_dev_state(). It would be
nice if this was consistent with what userspace returns for READ CAPACITY.
Not a huge deal, but I was thinking making it set (if different than
512) via a dev param wasn't a huge deal either, and kind of going along
with setting of the device size via dev param as well.
-- Andy
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html