qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] SCSI: Make write commands fail if the device is readonly
@ 2012-07-13 21:30 Ronnie Sahlberg
  2012-07-13 21:30 ` [Qemu-devel] [PATCH] SCSI: Fail medium writes with proper sense for readonly LUNs Ronnie Sahlberg
  0 siblings, 1 reply; 3+ messages in thread
From: Ronnie Sahlberg @ 2012-07-13 21:30 UTC (permalink / raw)
  To: qemu-devel, pbonzini

List, Paolo

Please find a patch that makes WRITE and WRITE_VERIFY fail with DATA_PROTECT/WRITE_PROTECTED sense code for devices that are write-protected via readonly=on


Tests have been berformed to verify the functionality using :

./x86_64-softmmu/qemu-system-x86_64 -enable-kvm -m 128 -drive file=20mb.img -drive file=./scsi-disk.img,if=scsi,readonly=on -net nic -net user,hostfwd=tcp:127.0.0.1:32601-:3260 -vnc 0.0.0.0:0

iscsi-test --dataloss --test="*300_readonly*" iscsi://127.0.0.1:32601/iqn.qemu.scsi-test/3
0300_readonly:
==============
WRITE10 to LUN 0 ... [OK]
WRITE12 to LUN 0 ... [OK]
WRITE16 to LUN 0 ... [OK]
WRITESAME10 to LUN 0 ... [OK]
WRITESAME16 to LUN 0 ... [OK]
WRITESAME10 to UNMAP LUN 0 ... LUN is not thin-provisioned. [SKIPPED]
WRITESAME16 to UNMAP LUN 0 ... LUN is not thin-provisioned. [SKIPPED]
UNMAP LUN 0 ... LUN is not thin-provisioned. [SKIPPED]
TEST T0300_readonly [OK]


regards
ronnie sahlberg

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-16  6:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-13 21:30 [Qemu-devel] [PATCH] SCSI: Make write commands fail if the device is readonly Ronnie Sahlberg
2012-07-13 21:30 ` [Qemu-devel] [PATCH] SCSI: Fail medium writes with proper sense for readonly LUNs Ronnie Sahlberg
2012-07-16  6:58   ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).