qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ronnie Sahlberg <ronniesahlberg@gmail.com>
To: qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH] SCSI update to the correct sense code for media removal prevention
Date: Mon, 30 Jul 2012 07:52:02 +1000	[thread overview]
Message-ID: <1343598723-12299-1-git-send-email-ronniesahlberg@gmail.com> (raw)

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

             reply	other threads:[~2012-07-29 21:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-29 21:52 Ronnie Sahlberg [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1343598723-12299-1-git-send-email-ronniesahlberg@gmail.com \
    --to=ronniesahlberg@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).