qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] SCSI update to the correct sense code for media removal prevention
@ 2012-07-29 21:52 Ronnie Sahlberg
  2012-07-29 21:52 ` [Qemu-devel] [PATCH] SCSI: Update the sense code for PREVENT REMOVAL errors Ronnie Sahlberg
  0 siblings, 1 reply; 3+ messages in thread
From: Ronnie Sahlberg @ 2012-07-29 21:52 UTC (permalink / raw)
  To: qemu-devel, pbonzini

List, Paolo

Please find a trivial patch that changes the sense code for errors when trying, and failing, to eject media using the START_STOP_UNIT command when the medium is locked down by a previous PREVENT_ALLOW_MEDIUM_REMOVAL command.

MMC Annex F lists MEDIUM_REMOVAL_PREVENTED as the recommended sense code for this error.


This now passes the test that a SCSI target retports the corre3ct sense code(s) for medium removal protection :

iscsi-test --dataloss --test="*prevent*eject*" iscsi://127.0.0.1:32601/iqn.qemu.scsi-test/3
0381_preventallow_eject:
========================
Try to set PREVENTALLOW ... [OK]
Try to eject the media ... Eject failed. [OK]
Load the media again in case it was ejected ... [OK]
Clear the PREVENTALLOW again ... [OK]
TEST T0381_preventallow_eject [OK]


regards
ronnie sahlberg

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

end of thread, other threads:[~2012-07-30  7:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-29 21:52 [Qemu-devel] [PATCH] SCSI update to the correct sense code for media removal prevention Ronnie Sahlberg
2012-07-29 21:52 ` [Qemu-devel] [PATCH] SCSI: Update the sense code for PREVENT REMOVAL errors Ronnie Sahlberg
2012-07-30  7:35   ` 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).