Bug 703789 - Virtual floppy locked value remains 0 regardless of using or not in guest
Virtual floppy locked value remains 0 regardless of using or not in guest
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.7
Unspecified Unspecified
low Severity medium
: rc
: ---
Assigned To: jason wang
Virtualization Bugs
: Reopened
: 709222 (view as bug list)
Depends On:
Blocks: Rhel5KvmTier3
  Show dependency treegraph
 
Reported: 2011-05-11 05:24 EDT by juzhang
Modified: 2011-07-31 09:34 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-31 09:34:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description juzhang 2011-05-11 05:24:46 EDT
Description of problem:
Virtual floppy locked value remains 0 regardless of using or not in guest

Version-Release number of selected component (if applicable):
kvm version:
kvm-83-232.el5


How reproducible:
100%

Steps to Reproduce:
1.boot guest with -fda /root/zhangjunyi/test.vfd
#/usr/libexec/qemu-kvm -M rhel5.6.0 -m 4G -smp 8 -name rhel5.7_64 -uuid 02b8079c-cca0-ae65-c63a-b2aa4119497d -monitor stdio -no-kvm-pit-reinjection -startdate now -boot c -drive  file=/root/zhangjunyi/rhel57.qcow2,if=virtio,format=qcow2,werror=stop,cache=none,boot=on -net nic,macaddr=54:52:40:3d:4c:88,vlan=0,model=virtio -net tap,script=/etc/qemu-ifup,downscript=no,vlan=0 -usb -k en-us -balloon none -notify all -cdrom /root/zhangjunyi/boot.iso -vnc :10 -fda /root/zhangjunyi/test.vfd

2.check block status,please note,locked=0
(qemu) info block
virtio0: type=hd removable=0 file=/root/zhangjunyi/rhel57.qcow2 ro=0 drv=qcow2 encrypted=0
ide1-cd0: type=cdrom removable=1 locked=0 file=/root/zhangjunyi/boot.iso ro=1 drv=raw encrypted=0
floppy0: type=floppy removable=1 locked=0 file=/root/zhangjunyi/test.vfd ro=0 drv=qcow2 encrypted=0
sd0: type=floppy removable=1 locked=0 [not inserted]

3.in guest,mount fd0 to /mnt
mount /dev/fd0 /mnt

4. check block status again,please note,still locked=0
(qemu) info block
virtio0: type=hd removable=0 file=/root/zhangjunyi/rhel57.qcow2 ro=0 drv=qcow2 encrypted=0
ide1-cd0: type=cdrom removable=1 locked=1 file=/root/zhangjunyi/boot.iso ro=1 drv=raw encrypted=0
floppy0: type=floppy removable=1 locked=0 file=/root/zhangjunyi/test.vfd ro=0 drv=qcow2 encrypted=0
sd0: type=floppy removable=1 locked=0 [not inserted]

locked=0 means can eject floppy in (qemu) regardless of using or not in guest 
  
Actual results:
locked value remain 0 even this virtual floppy is using by guest.

Expected results:
locked value should as 1.

Additional info:
1.if locked=0 even virtual floppy is using by guest,user still can reject this virtual floppy via (qemu) eject floppy0,however,guest don't know that.

EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
floppy0: disk absent or changed during operation
end_request: I/O error, dev fd0, sector 22
floppy0: disk absent or changed during operation
end_request: I/O error, dev fd0, sector 2
Buffer I/O error on device fd0, logical block 1
lost page write due to I/O error on fd0
EXT2-fs error (device fd0): ext2_get_inode: unable to read inode block - inode=11, block=11

2.take cdrom for example.
if we mount cdrom device in guest.then locks=1.
if we umount it.then locks=0.
Comment 1 Mike Cao 2011-05-31 02:47:59 EDT
*** Bug 709222 has been marked as a duplicate of this bug. ***
Comment 2 Mike Cao 2011-05-31 02:54:19 EDT
Raise the priority to high as it may cause floppy lose data ,referring to bug 709222

Note You need to log in before you can comment on or make changes to this bug.