qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: qemu-devel@nongnu.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PATCH 0/3] scsi: eject fixed
Date: Wed,  4 Dec 2013 15:55:22 +1100	[thread overview]
Message-ID: <1386132925-16728-1-git-send-email-aik@ozlabs.ru> (raw)

The initial problem was if the user ejects a ISO/DVD mounted in Fedora19,
the block device went into weird state when QEMU's monitor reported that
it is locked, has medium but tray open (some debug output is below).

Please comment. Thanks!


[root@localhost ~]# mount /dev/cdrom /mnt
mount: /dev/sr0 is write-protected, mounting read-only
ISO 9660 Extensions: Microsoft Joliet Level 3
ISO 9660 Extensions: RRIP_1991A
[root@localhost ~]# QEMU 1.7.50 monitor - type 'help' for more information
(qemu) eject cd1
Device 'cd1' is locked
(qemu) info block
sd0: virtimg/fc19_16GB.qcow2 (qcow2)

cd1: virtimg/Fedora-19-ppc64-netinst.iso (raw)
    Removable device: locked, tray open
    (qemu) 

[root@localhost ~]# ls /mnt
sr 1:0:0:0: [sr0] Device not ready
sr 1:0:0:0: [sr0]  
Result: hostbyte=0x00 driverbyte=0x08
sr 1:0:0:0: [sr0]  
Sense Key : 0x2 [current] 
sr 1:0:0:0: [sr0]  
ASC=0x3a ASCQ=0x0
sr 1:0:0:0: [sr0] CDB: 
cdb[0]=0x28: 28 00 00 00 00 1c 00 00 01 00
end_request: I/O error, dev sr0, sector 112
[root@localhost ~]# 



Alexey Kardashevskiy (3):
  scsi-disk: close drive on START_STOP
  scsi-disk: check for meduim on ALLOW_MEDIUM_REMOVAL
  scsi debug: print command name in debug

 hw/scsi/scsi-bus.c    | 5 ++++-
 hw/scsi/scsi-disk.c   | 7 +++++--
 hw/scsi/spapr_vscsi.c | 5 +++--
 include/block/scsi.h  | 2 ++
 4 files changed, 14 insertions(+), 5 deletions(-)

-- 
1.8.4.rc4

             reply	other threads:[~2013-12-04  4:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-04  4:55 Alexey Kardashevskiy [this message]
2013-12-04  4:55 ` [Qemu-devel] [PATCH 1/3] scsi-disk: close drive on START_STOP Alexey Kardashevskiy
2013-12-04  8:58   ` Paolo Bonzini
2013-12-04  9:33     ` Markus Armbruster
2013-12-04 11:59       ` Alexey Kardashevskiy
2013-12-04 13:12         ` Markus Armbruster
2013-12-04 23:08           ` Alexey Kardashevskiy
2013-12-05  8:01             ` Markus Armbruster
2013-12-05 12:29       ` Markus Armbruster
2013-12-05 12:42         ` Alexey Kardashevskiy
2013-12-05 12:49           ` Paolo Bonzini
2013-12-06 11:18             ` Markus Armbruster
2013-12-04  4:55 ` [Qemu-devel] [PATCH 2/3] scsi-disk: check for meduim on ALLOW_MEDIUM_REMOVAL Alexey Kardashevskiy
2013-12-04  9:03   ` Paolo Bonzini
2013-12-04  9:35     ` Markus Armbruster
2013-12-04 12:03       ` Alexey Kardashevskiy
2013-12-04 12:51         ` Markus Armbruster
2013-12-04 17:34   ` Paolo Bonzini
2013-12-04  4:55 ` [Qemu-devel] [PATCH 3/3] scsi debug: print command name in debug Alexey Kardashevskiy

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=1386132925-16728-1-git-send-email-aik@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --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).