block/iscsi: use 16 byte CDBs only when necessary
commit9281fe9eea5c9e5037fbf4fb75c5dc8f6e1a24a3
authorPeter Lieven <pl@kamp.de>
Wed, 4 Jun 2014 13:47:39 +0000 (4 15:47 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 18 Jun 2014 06:47:10 +0000 (18 08:47 +0200)
tree5b83c432e9b95a11997844cdae315a78d3d79e0e
parentfcd470d857a02ad76cd5a351a80bc0bb46588314
block/iscsi: use 16 byte CDBs only when necessary

this patch changes the driver to uses 16 Byte CDBs for
READ/WRITE only if the target requires 64bit lba addressing.

On one hand this saves 6 bytes in each PDU on the other
hand it seems that 10 Byte CDBs seems to be much better
supported and tested as a recent issue I had with a
major storage supplier lined out.

For WRITESAME the logic is a bit more tricky as WRITESAME10
with UNMAP was added really late. Thus a fallback to WRITESAME16
is possible if it supports UNMAP and WRITESAME10 not.

Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
block/iscsi.c