scsi-disk: reject ANCHOR=1 for UNMAP and WRITE SAME commands
commit823bd7391c96ba675f20fd6d952d1cb6e1ffb851
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 22 Nov 2013 12:40:00 +0000 (22 13:40 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 3 Dec 2013 14:26:49 +0000 (3 15:26 +0100)
tree308ebd269f72540836ee4bee171280b0141fa18b
parentc5fd1fb038405ed13496761970b3b531f747a892
scsi-disk: reject ANCHOR=1 for UNMAP and WRITE SAME commands

Since we report ANC_SUP==0 in VPD page B2h, we need to return
an error (ILLEGAL REQUEST/INVALID FIELD IN CDB) for all WRITE SAME
requests with ANCHOR==1.

Inspired by a similar patch to the LIO in-kernel target.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/scsi/scsi-disk.c