* [Qemu-devel] QEMU CDROM tray-open and locked logic @ 2013-01-04 10:26 Peter Lieven 2013-01-04 18:42 ` Paolo Bonzini 0 siblings, 1 reply; 5+ messages in thread From: Peter Lieven @ 2013-01-04 10:26 UTC (permalink / raw) To: qemu-devel@nongnu.org Hi, i have observed the following with qemu-kvm-1.2.0 which I think is not right: a) if the CDROM is locked and I sent a eject command I get the error that the CDROM is locked, but its ejected nevertheless. b) if I eject the CDROM in the OS I see tray-open=1 and locked=1. In the tray-open=1 state the CDROM can`t be locked, can it? Thanks, Peter ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] QEMU CDROM tray-open and locked logic 2013-01-04 10:26 [Qemu-devel] QEMU CDROM tray-open and locked logic Peter Lieven @ 2013-01-04 18:42 ` Paolo Bonzini 2013-01-07 7:19 ` Peter Lieven 0 siblings, 1 reply; 5+ messages in thread From: Paolo Bonzini @ 2013-01-04 18:42 UTC (permalink / raw) To: Peter Lieven; +Cc: qemu-devel@nongnu.org Il 04/01/2013 11:26, Peter Lieven ha scritto: > Hi, > > i have observed the following with qemu-kvm-1.2.0 which I think is not right: > > a) if the CDROM is locked and I sent a eject command I get the error that the > CDROM is locked, but its ejected nevertheless. That's because the CD-ROM sends an "eject requested" event, and udev does the unlock & eject itself. > b) if I eject the CDROM in the OS I see tray-open=1 and locked=1. In the > tray-open=1 state the CDROM can`t be locked, can it? A "real" CD-ROM drive could have the tray open and not responding to the button. Table 330 of MMC6 matches "Operation Lock, current prevent state Locked, No media present" to "No Error, media insertion is not permitted". I cannot check right now what happens later and whether QEMU's behavior makes sense. Paolo ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] QEMU CDROM tray-open and locked logic 2013-01-04 18:42 ` Paolo Bonzini @ 2013-01-07 7:19 ` Peter Lieven 2013-01-07 12:36 ` Markus Armbruster 0 siblings, 1 reply; 5+ messages in thread From: Peter Lieven @ 2013-01-07 7:19 UTC (permalink / raw) To: Paolo Bonzini; +Cc: qemu-devel@nongnu.org Hi Paolo, Am 04.01.2013 um 19:42 schrieb Paolo Bonzini <pbonzini@redhat.com>: > Il 04/01/2013 11:26, Peter Lieven ha scritto: >> Hi, >> >> i have observed the following with qemu-kvm-1.2.0 which I think is not right: >> >> a) if the CDROM is locked and I sent a eject command I get the error that the >> CDROM is locked, but its ejected nevertheless. > > That's because the CD-ROM sends an "eject requested" event, and udev > does the unlock & eject itself. ah ok, this explains it. > >> b) if I eject the CDROM in the OS I see tray-open=1 and locked=1. In the >> tray-open=1 state the CDROM can`t be locked, can it? > > A "real" CD-ROM drive could have the tray open and not responding to the > button. Table 330 of MMC6 matches "Operation Lock, current prevent > state Locked, No media present" to "No Error, media insertion is not > permitted". I cannot check right now what happens later and whether > QEMU's behavior makes sense. okay, so this could be also correct. last question. if the OS opens the tray, the cdrom is still inserted in the case that the iso is still inserted. this behavior is also ok, but its a little confusing. this leads to a lot of cases that have to be checked regarding cdroms in qemu. thank you, peter ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] QEMU CDROM tray-open and locked logic 2013-01-07 7:19 ` Peter Lieven @ 2013-01-07 12:36 ` Markus Armbruster 2013-01-08 8:55 ` Peter Lieven 0 siblings, 1 reply; 5+ messages in thread From: Markus Armbruster @ 2013-01-07 12:36 UTC (permalink / raw) To: Peter Lieven; +Cc: Paolo Bonzini, qemu-devel@nongnu.org Peter Lieven <pl@dlhnet.de> writes: > Hi Paolo, > > Am 04.01.2013 um 19:42 schrieb Paolo Bonzini <pbonzini@redhat.com>: > >> Il 04/01/2013 11:26, Peter Lieven ha scritto: >>> Hi, >>> >>> i have observed the following with qemu-kvm-1.2.0 which I think is not right: >>> >>> a) if the CDROM is locked and I sent a eject command I get the error that the >>> CDROM is locked, but its ejected nevertheless. >> >> That's because the CD-ROM sends an "eject requested" event, and udev >> does the unlock & eject itself. > > ah ok, this explains it. > >> >>> b) if I eject the CDROM in the OS I see tray-open=1 and locked=1. In the >>> tray-open=1 state the CDROM can`t be locked, can it? >> >> A "real" CD-ROM drive could have the tray open and not responding to the >> button. Table 330 of MMC6 matches "Operation Lock, current prevent >> state Locked, No media present" to "No Error, media insertion is not >> permitted". I cannot check right now what happens later and whether >> QEMU's behavior makes sense. > > okay, so this could be also correct. For what it's worth, my physical CD-ROM can be locked while the tray is open. It stays locked when the tray closes. > last question. if the OS opens the tray, the cdrom is still inserted in the > case that the iso is still inserted. this behavior is also ok, but its a little > confusing. this leads to a lot of cases that have to be checked regarding > cdroms in qemu. I'm not sure I got your question, but perhaps the following helps anyway. OS opening the tray affects just the tray. It doesn't remove media from the tray. This is important, because programs exist that open the tray, close the tray, and expect to get their medium back unless the user actively changed it. See commit 4be9762a and https://bugzilla.redhat.com/show_bug.cgi?id=558256#c7. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] QEMU CDROM tray-open and locked logic 2013-01-07 12:36 ` Markus Armbruster @ 2013-01-08 8:55 ` Peter Lieven 0 siblings, 0 replies; 5+ messages in thread From: Peter Lieven @ 2013-01-08 8:55 UTC (permalink / raw) To: Markus Armbruster; +Cc: Paolo Bonzini, qemu-devel@nongnu.org Am 07.01.2013 um 13:36 schrieb Markus Armbruster <armbru@redhat.com>: > Peter Lieven <pl@dlhnet.de> writes: > >> Hi Paolo, >> >> Am 04.01.2013 um 19:42 schrieb Paolo Bonzini <pbonzini@redhat.com>: >> >>> Il 04/01/2013 11:26, Peter Lieven ha scritto: >>>> Hi, >>>> >>>> i have observed the following with qemu-kvm-1.2.0 which I think is not right: >>>> >>>> a) if the CDROM is locked and I sent a eject command I get the error that the >>>> CDROM is locked, but its ejected nevertheless. >>> >>> That's because the CD-ROM sends an "eject requested" event, and udev >>> does the unlock & eject itself. >> >> ah ok, this explains it. >> >>> >>>> b) if I eject the CDROM in the OS I see tray-open=1 and locked=1. In the >>>> tray-open=1 state the CDROM can`t be locked, can it? >>> >>> A "real" CD-ROM drive could have the tray open and not responding to the >>> button. Table 330 of MMC6 matches "Operation Lock, current prevent >>> state Locked, No media present" to "No Error, media insertion is not >>> permitted". I cannot check right now what happens later and whether >>> QEMU's behavior makes sense. >> >> okay, so this could be also correct. > > For what it's worth, my physical CD-ROM can be locked while the tray is > open. It stays locked when the tray closes. > >> last question. if the OS opens the tray, the cdrom is still inserted in the >> case that the iso is still inserted. this behavior is also ok, but its a little >> confusing. this leads to a lot of cases that have to be checked regarding >> cdroms in qemu. > > I'm not sure I got your question, but perhaps the following helps > anyway. > > OS opening the tray affects just the tray. It doesn't remove media from > the tray. This is important, because programs exist that open the tray, > close the tray, and expect to get their medium back unless the user > actively changed it. See commit 4be9762a and > https://bugzilla.redhat.com/show_bug.cgi?id=558256#c7. I can't access the bug, but it seems to explain what I observed. Thanks for the info! Peter ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-08 8:55 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-01-04 10:26 [Qemu-devel] QEMU CDROM tray-open and locked logic Peter Lieven 2013-01-04 18:42 ` Paolo Bonzini 2013-01-07 7:19 ` Peter Lieven 2013-01-07 12:36 ` Markus Armbruster 2013-01-08 8:55 ` Peter Lieven
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).