Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1026591

Summary: remove the <"locked": false> from QMP monitor for passthrough disk (scsi-block )
Product: Red Hat Enterprise Linux 6 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED CANTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 6.5CC: acathrow, bsarathy, chayang, juzhang, michen, mkenneth, pbonzini, qzhang, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1026595 (view as bug list) Environment:
Last Closed: 2013-11-05 10:23:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1026595    

Description Sibiao Luo 2013-11-05 02:46:23 UTC
Description of problem:
We have disable removeable for passthrough cdrom (scsi-block) and remove the locked and tray-open from HMP monitor infos in bug 890011. Lock status is not visible in "info block" for scsi-block, because it is not being emulated by QEMU. But there are still has <"locked": false> in QMP monitor, so i think we should remove it. 

Version-Release number of selected component (if applicable):
host info:
2.6.32-425.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.415.el6.x86_64
seabios-0.6.1.2-28.el6.x86_64
guest info:
2.6.32-425.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.insert a DVD or CD to host.
2.boot guest with this DVD/CD passthrough via scsi-block interface.
e.g:...-qmp tcp:0:4444,server,nowait -drive file=/dev/sr0,if=none,id=drive-cdrom-disk,format=raw,media=cdrom,cache=none,aio=native -device virtio-scsi-pci,bus=pci.0,addr=0x7,id=scsi0 -device scsi-block,drive=drive-cdrom-disk,id=cdrom-disk,bus=scsi0.0
3.compare the block info between HMP and QMP monitor.
(qemu) info block
{"execute":"query-block"}

Actual results:
after step 3,
- HMP:
(qemu) info block
...
drive-cdrom-disk: removable=0 io-status=ok file=/dev/sr0 ro=1 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
- QMP:
{"execute":"query-block"}
{"return": [...{"io-status": "ok", "device": "drive-cdrom-disk", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "iops_wr": 0, "ro": true, "drv": "raw", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "/dev/sr0"}, "type": "unknown"}...]}

Expected results:
we should remove the <"locked": false> from QMP monitor.

Additional info:

Comment 1 Sibiao Luo 2013-11-05 02:56:04 UTC
Also tried the passthrough hard disk which hit the same issue.
e.g:...-drive file=/dev/sdb,if=none,id=drive-disk,format=raw,media=disk,cache=none,aio=native -device virtio-scsi-pci,bus=pci.0,addr=0x7,id=scsi0 -device scsi-block,drive=drive-disk,id=disk,bus=scsi0.0
(qemu) info block
...
drive-disk: removable=0 io-status=ok file=/dev/sdb ro=0 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
{"execute":"query-block"}
{"return": [...{"io-status": "ok", "device": "drive-disk", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "iops_wr": 0, "ro": false, "drv": "raw", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "/dev/sdb"}, "type": "unknown"}...]}

Best Regards,
sluo

Comment 3 Paolo Bonzini 2013-11-05 10:23:15 UTC
For historical reasons, the "locked" field in the output of "query-block" is mandatory.  It will even be present in hard disks, for example (unlike tray-open).  So it cannot be removed.