Bug 771610
Summary: | cdrom tray status is 0 after executing "eject" if no media is presented | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Xiaomei Gao <xigao> |
Component: | qemu-kvm | Assignee: | Pavel Hrdina <phrdina> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 7.0 | CC: | acathrow, areis, armbru, bsarathy, hhuang, juzhang, michen, mkenneth, pbonzini, qzhang, rhod, sluo, virt-maint, wquan |
Target Milestone: | pre-dev-freeze | Keywords: | FutureFeature |
Target Release: | 7.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | QEMU 1.3 | Doc Type: | Enhancement |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-06-13 10:17:54 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Xiaomei Gao
2012-01-04 10:12:30 UTC
Reproduced upstream. It's an implementation artifact. eject calls bdrv_close() to do the work. bdrv_close() does nothing when there's no media. In particular, it runs the media change device callback only when there's media. The callback makes the CD-ROM device open the virtual tray (open, because argument load is false). The inconsistency is ugly, but I can't see how it could do real harm. Very minor, so will postpone this to RHEL7/upstream. If there's a business case, please let us know. Patch has been merged into upstream. *** Bug 871321 has been marked as a duplicate of this bug. *** This is commit 9ca111544c64b5abed2e79cf52e19a8f227b347b upstream. hi Paolo, I boot guest with a ide cdrom, the locked=0 at first, but then will change to locked=1 when the guest boot up successfully. btw, does this bug did not fixed completely or a new issue ? host info: # uname -r && rpm -q qemu-kvm 3.7.0-0.34.el7.x86_64 qemu-kvm-1.3.0-3.el7.x86_64 guest info: RHEL-Server-7.0-64 eg:...-drive file=/home/my-cdrom.iso,if=none,media=cdrom,format=raw,id=drive-ide1-0-1 -device ide-drive,drive=drive-ide1-0-1,id=ide1-0-1,bus=ide.0,unit=0 (qemu) info block drive-system-disk: removable=0 io-status=ok file=/home/RHEL-Server-7.0-64-virtio.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0 drive-data-disk: removable=0 io-status=ok file=/home/my-data-disk.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0 drive-fdc0-0-0: removable=1 locked=0 tray-open=0 file=/home/floppy.vfd ro=0 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0 drive-ide1-0-1: removable=1 locked=1 tray-open=0 io-status=ok file=/home/my-cdrom.iso ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0 sd0: removable=1 locked=0 tray-open=0 [not inserted] Best Regards. sluo Upstream commit 9ca11154 causes minor problems, and will probably be redone for 1.5. I'd recommend to delay QA until then. See http://lists.nongnu.org/archive/html/qemu-devel/2013-02/msg00953.html (In reply to comment #13) > Upstream commit 9ca11154 causes minor problems, and will probably be redone > for 1.5. I'd recommend to delay QA until then. > > See http://lists.nongnu.org/archive/html/qemu-devel/2013-02/msg00953.html OK, thx for your reminds, our QE will wait for it. Verify this issue under qemu-kvm-1.4.0-2.el7.x86_64. host info: kernel-3.9.0-0.rc6.51.el7.x86_64 qemu-kvm-1.4.0-2.el7.x86_64 guest info: win8 64bit Steps: the same to comment #0 1.boot a guest with media cdrom. e.g:...-drive file=/home/hddsn.iso,if=none,media=cdrom,readonly=on,format=raw,id=drive-ide1-0-0 -device ide-drive,drive=drive-ide1-0-0,id=ide1-0-0 (qemu) info block ... drive-ide1-0-0: removable=1 locked=1 tray-open=0 io-status=ok file=/home/hddsn.iso ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0 2.(qemu) eject -f drive-ide1-0-0 3.(qemu) info block ... drive-ide1-0-0: removable=1 locked=0 tray-open=1 io-status=ok [not inserted] <---tray-open=1 4.boot a guest with no media cdrom. (qemu) info block ... ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted] 5.(qemu) eject -f ide1-cd0 6.(qemu) info block ... ide1-cd0: removable=1 locked=0 tray-open=1 io-status=ok [not inserted] <---tray-open=1 Result: cdrom tray status is the same(tray-open=1) as after executing "eject" whether media is presented or not. Base on above, this issue has been fixe correctly. This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |