summaryrefslogtreecommitdiffstats
path: root/hw/scsi/virtio-scsi.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2014-10-30 19:23:46 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2014-10-31 11:29:02 +0100
commitc1d4096b0f033d0a52c542f0948403783c3682e9 (patch)
tree6fcc7af9f17eef8bc671ac615faa265291510e32 /hw/scsi/virtio-scsi.c
parent076893d3d06fe8642b8912591b9222bcb81f85aa (diff)
downloadhqemu-c1d4096b0f033d0a52c542f0948403783c3682e9.zip
hqemu-c1d4096b0f033d0a52c542f0948403783c3682e9.tar.gz
iscsi: Refuse to open as writable if the LUN is write protected
Before, when a write protected iSCSI target is attached as scsi-disk with BDRV_O_RDWR, we report it as writable, while in fact all writes will fail. One way to improve this is to report write protect flag as true to guest, but a even better way is to refuse using a write protected LUN to guest. Target write protect flag is checked with a mode sense query. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/virtio-scsi.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud