diff options
author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2012-04-19 20:41:17 +1000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-04-19 16:26:29 +0200 |
commit | f644a2904d5287332e4007f30c105a8622fb3db8 (patch) | |
tree | 5ef01e8eeeeec227e2cc8261689d6198e5c175de | |
parent | c9e4d8284e1f3205aa3c05dc18932f9ca2c05f53 (diff) |
SCSI emulation: should tell the guest that we actually support thin provisioning
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
[Actually, we should report it only if discard_granularity is nonzero.
Older SBC drafts assigned 0 to thin provisioning and 1 to thick
(resource-provisioned, they call it). Newer drafts assign respectively
1 and 2 - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | hw/scsi-disk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 85a75c4b29..a029ab6e84 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -628,7 +628,7 @@ static int scsi_disk_emulate_inquiry(SCSIRequest *req, uint8_t *outbuf) outbuf[3] = buflen = 8; outbuf[4] = 0; outbuf[5] = 0x60; /* write_same 10/16 supported */ - outbuf[6] = 0; + outbuf[6] = s->qdev.conf.discard_granularity ? 2 : 1; outbuf[7] = 0; break; } |