summaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-11-22 13:40:01 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-12-03 15:26:49 +0100
commit84f94a9a82487639bc87d5f09f938c9f6a61f79a (patch)
treeb8f6e8df50785865b68f8c6e68d54f25ebed8ba1 /block.c
parent823bd7391c96ba675f20fd6d952d1cb6e1ffb851 (diff)
downloadqemu-84f94a9a82487639bc87d5f09f938c9f6a61f79a.tar.gz
scsi-disk: correctly implement WRITE SAME
Fetch the data to be written from the input buffer. If it is all zeroes, we can use the write_zeroes call (possibly with the new MAY_UNMAP flag). Otherwise, do as many write cycles as needed, writing 512k at a time. Strictly speaking, this is still incorrect because a zero cluster should only be written if the MAY_UNMAP flag is set. But this is a bug in qcow2 and the other formats, not in the SCSI code. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block.c')
0 files changed, 0 insertions, 0 deletions