scsi-generic: Merge block max xfer len in INQUIRY response
commitc9fb07ba56ae4d8f4eaa6e461179017624b23355
authorFam Zheng <famz@redhat.com>
Thu, 26 May 2016 06:15:05 +0000 (26 14:15 +0800)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 5 Aug 2016 20:08:54 +0000 (5 15:08 -0500)
tree7d7fc92fdc045f50843716bc75b25b0b1eb17da7
parentab2aac59e8cc7172800864a28f2386d780a08016
scsi-generic: Merge block max xfer len in INQUIRY response

The rationale is similar to the above mode sense response interception:
this is practically the only channel to communicate restraints from
elsewhere such as host and block driver.

The scsi bus we attach onto can have a larger max xfer len than what is
accepted by the host file system (guarding between the host scsi LUN and
QEMU), in which case the SG_IO we generate would get -EINVAL.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <1464243305-10661-3-git-send-email-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 063143d5b1fde0fdcbae30bc7d6d14e76fa607d2)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/scsi/scsi-generic.c