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 920964

Summary: flood with 'floppy0: unknown error' in guest dmesg when format the floppy in guest
Product: Red Hat Enterprise Linux 7 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Hanna Czenczek <hreitz>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: chayang, hhuang, juzhang, knoel, kwolf, michen, qzhang, rbalakri, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-10 16:09:22 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:

Description Sibiao Luo 2013-03-13 07:52:13 UTC
Description of problem:
boot guest with a floopy, then format it in guest, guest kernel will flood with 'floppy0: unknown error', this very similar to bug 682638 in rhel6, but HMP monitor did not prompt error.

Version-Release number of selected component (if applicable):
host info:
kernel-3.8.0-0.40.el7.x86_64
qemu-kvm-1.4.0-1.el7.x86_64
guest info:
kernel-3.8.0-0.40.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with two floppies using '-drive...-global...' method.
# qemu-img create -f qcow2 floppy-1440K.vfd 1440K
Formatting 'floppy-1440K.vfd', fmt=qcow2 size=1474560 encryption=off cluster_size=65536 lazy_refcounts=off 
e.g:...-drive file=/home/floppy-1440K.vfd,if=none,id=drive-fdc0-0-0,format=raw -global isa-fdc.driveA=drive-fdc0-0-0
2.modprobe floppy in guest.
3.format the floppy disk.
# mkfs.ext4 /dev/fd0
4.check the guest dmesg.

Actual results:
after step 3, complete to format the floppy.
after steo 4, guest kernel flood with 'floppy0: unknown error'. i will attach the log later.

Expected results:
there is no any error in guest kernel when format the floppy disk.

Additional info:
# /usr/libexec/qemu-kvm -S -M pc-i440fx-1.4 -cpu SandyBridge -enable-kvm -m 2048 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -device usb-mouse,id=mouse -name sluo-test -uuid b03eea94-a502-4142-b541-96f86473a07a -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0,addr=0x3 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -drive file=/home/RHEL-Server-7.0-64-scsi.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,serial=QEMU-DISK1 -device virtio-scsi-pci,id=scsi0,addr=0x4 -device scsi-hd,bus=scsi0.0,drive=drive-system-disk,id=system-disk,bootindex=1 -netdev tap,id=hostnet0,vhost=off,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=08:2E:5F:0A:1D:B1,bus=pci.0,addr=0x6,bootindex=2,event_idx=off -device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x7 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -serial unix:/tmp/ttyS0,server,nowait -k en-us -qmp tcp:0:4444,server,nowait -boot menu=on -vnc :1 -monitor stdio -drive file=/home/floppy-1440K.vfd,if=none,id=drive-fdc0-0-0,format=raw -global isa-fdc.driveA=drive-fdc0-0-0

Comment 1 Sibiao Luo 2013-03-13 07:53:10 UTC
# dmesg 
[   54.257413] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 74, head 1, sector 7, size 2
[   54.278418] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 74, head 1, sector 7, size 2
[   54.278427] end_request: I/O error, dev fd0, sector 2688
[   54.279054] Buffer I/O error on device fd0, logical block 336
[   54.279054] lost page write due to I/O error on fd0
[   54.340238] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 74, head 1, sector 15, size 2
[   54.360242] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 74, head 1, sector 15, size 2
[   54.360246] end_request: I/O error, dev fd0, sector 2696
[   54.360695] Buffer I/O error on device fd0, logical block 337
[   54.361039] lost page write due to I/O error on fd0
[   54.422419] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 75, head 0, sector 5, size 2
[   54.443400] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 75, head 0, sector 5, size 2
[   54.443409] end_request: I/O error, dev fd0, sector 2704
[   54.444037] Buffer I/O error on device fd0, logical block 338
[   54.444037] lost page write due to I/O error on fd0
[   54.506422] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 75, head 0, sector 13, size 2
[   54.527417] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 75, head 0, sector 13, size 2
[   54.527426] end_request: I/O error, dev fd0, sector 2712
[   54.528053] Buffer I/O error on device fd0, logical block 339
[   54.528053] lost page write due to I/O error on fd0
[   54.589254] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 75, head 1, sector 3, size 2
[   54.609259] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 75, head 1, sector 3, size 2
[   54.609263] end_request: I/O error, dev fd0, sector 2720
[   54.609739] Buffer I/O error on device fd0, logical block 340
[   54.610054] lost page write due to I/O error on fd0
[   54.671419] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 75, head 1, sector 11, size 2
[   54.692400] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 75, head 1, sector 11, size 2
[   54.692409] end_request: I/O error, dev fd0, sector 2728
[   54.693036] Buffer I/O error on device fd0, logical block 341
[   54.693036] lost page write due to I/O error on fd0
[   54.755390] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 76, head 0, sector 1, size 2
[   54.776377] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 76, head 0, sector 1, size 2
[   54.776382] end_request: I/O error, dev fd0, sector 2736
[   54.777023] Buffer I/O error on device fd0, logical block 342
[   54.777023] lost page write due to I/O error on fd0
[   54.839414] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 76, head 0, sector 9, size 2
[   54.860394] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 76, head 0, sector 9, size 2
[   54.860402] end_request: I/O error, dev fd0, sector 2744
[   54.861035] Buffer I/O error on device fd0, logical block 343
[   54.861035] lost page write due to I/O error on fd0
[   54.923398] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 76, head 0, sector 17, size 2
[   54.944395] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 76, head 0, sector 17, size 2
[   54.944404] end_request: I/O error, dev fd0, sector 2752
[   54.945036] Buffer I/O error on device fd0, logical block 344
[   54.945036] lost page write due to I/O error on fd0
[   55.007425] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 76, head 1, sector 7, size 2
[   55.028399] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 76, head 1, sector 7, size 2
[   55.028408] end_request: I/O error, dev fd0, sector 2760
[   55.029035] Buffer I/O error on device fd0, logical block 345
[   55.029035] lost page write due to I/O error on fd0
[   55.090255] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 76, head 1, sector 15, size 2
[   55.110258] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 76, head 1, sector 15, size 2
[   55.170417] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 77, head 0, sector 5, size 2
[   55.191418] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 77, head 0, sector 5, size 2
[   55.252399] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 77, head 0, sector 13, size 2
[   55.273404] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 77, head 0, sector 13, size 2
[   55.334419] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 77, head 1, sector 3, size 2
[   55.355401] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 77, head 1, sector 3, size 2
[   55.416402] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 77, head 1, sector 11, size 2
[   55.437413] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 77, head 1, sector 11, size 2
[   55.498418] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 78, head 0, sector 1, size 2
[   55.519418] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 78, head 0, sector 1, size 2
[   55.580399] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 78, head 0, sector 9, size 2
[   55.601401] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 78, head 0, sector 9, size 2
[   55.662419] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 78, head 0, sector 17, size 2
[   55.683420] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 78, head 0, sector 17, size 2
[   55.744399] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 78, head 1, sector 7, size 2
[   55.765414] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 78, head 1, sector 7, size 2
[   55.826416] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 78, head 1, sector 15, size 2
[   55.847414] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 78, head 1, sector 15, size 2
[   55.908399] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 79, head 0, sector 5, size 2
[   55.929414] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 79, head 0, sector 5, size 2
[   55.990398] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 79, head 0, sector 13, size 2
[   56.011389] floppy0: unknown error. ST[0..2] are: 0x60 0x0 0x0: track 79, head 0, sector 13, size 2
[   56.072414] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 79, head 1, sector 3, size 2
[   56.093417] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 79, head 1, sector 3, size 2
[   56.154419] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 79, head 1, sector 11, size 2
[   56.175420] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 79, head 1, sector 11, size 2

Comment 2 Sibiao Luo 2013-03-13 07:58:41 UTC
(In reply to comment #0)
> Steps to Reproduce:
> 1.boot guest with two floppies using '-drive...-global...' method.
mistake for description, just add one floppy indeed.

Comment 3 Sibiao Luo 2013-07-15 01:28:35 UTC
still hit it on qemu-kvm-1.5.1-2.el7.x86_64.
host info:
3.10.0-0.rc7.64.el7.x86_64
qemu-kvm-1.5.1-2.el7.x86_64
guest info:
3.10.0-0.rc7.64.el7.x86_64

e.g:...-fda /home/floppy1.vfd -drive file=/home/floppy2.vfd,if=none,id=drive-fdc0-0-0,format=raw,cache=none -global isa-fdc.driveB=drive-fdc0-0-0

guest]# dmesg
[  144.791759] Floppy drive(s): fd0 is 1.44M, fd1 is 1.44M
[  144.803673] FDC 0 is a S82078B
[  162.321240] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 79, head 1, sector 6, size 2
[  162.342273] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 79, head 1, sector 6, size 2
[  162.343221] end_request: I/O error, dev fd0, sector 2867
[  162.343734] Buffer I/O error on device fd0, logical block 358
[  162.344156] lost page write due to I/O error on fd0
[  162.405254] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 79, head 1, sector 11, size 2
[  162.426229] floppy0: unknown error. ST[0..2] are: 0x64 0x0 0x0: track 79, head 1, sector 11, size 2
[  162.427205] end_request: I/O error, dev fd0, sector 2872
[  162.427698] Buffer I/O error on device fd0, logical block 359
[  162.428141] lost page write due to I/O error on fd0
[  166.651291] floppy1: unknown error. ST[0..2] are: 0x65 0x0 0x0: track 79, head 1, sector 6, size 2
[  166.678160] floppy1: unknown error. ST[0..2] are: 0x65 0x0 0x0: track 79, head 1, sector 6, size 2
[  166.682685] end_request: I/O error, dev fd1, sector 2867
[  166.683676] Buffer I/O error on device fd1, logical block 358
[  166.683676] lost page write due to I/O error on fd1
[  166.751202] floppy1: unknown error. ST[0..2] are: 0x65 0x0 0x0: track 79, head 1, sector 11, size 2
[  166.775225] floppy1: unknown error. ST[0..2] are: 0x65 0x0 0x0: track 79, head 1, sector 11, size 2
[  166.778524] end_request: I/O error, dev fd1, sector 2872
[  166.779516] Buffer I/O error on device fd1, logical block 359
[  166.779516] lost page write due to I/O error on fd1

Best Regards,
sluo

Comment 6 Hanna Czenczek 2015-06-10 16:09:22 UTC
Hi,

I can see the image file is created as a qcow2 file ("qemu-img create -f qcow2"), but then used as a raw file ("-drive format=raw").

I cannot reproduce the issue when using a qcow2 file and using it as a qcow2 file ("-drive format=qcow2"), but I do get a couple of I/O errors with format=raw. Using "truncate -s 1440k" on the qcow2 file, the issue disappears even with format=raw, so I guess the I/O errors appear because the image file is not as big as advertised to the guest (1440 kB).

So if there is an issue here, it's that qemu doesn't reject floppy images whose size doesn't exactly match a valid floppy disk format (and subsequently falls back to the 3.5" 1.44M format). This seems to be intentional, however, so I'm closing this BZ as NOTABUG (also, it doesn't really seem worth changing).

Max