• P
    scsi-disk: correctly implement WRITE SAME · 84f94a9a
    Paolo Bonzini 提交于
    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: NPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
    84f94a9a
scsi-disk.c 78.7 KB