Bug 1025166 - "VFS: busy inodes on changed media or resized disk sr0" warning message after eject the cdrom
"VFS: busy inodes on changed media or resized disk sr0" warning message after...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.5
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Paolo Bonzini
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-31 02:58 EDT by Sibiao Luo
Modified: 2017-05-17 09:22 EDT (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-05-08 15:14:15 EDT
Type: Bug
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 Sibiao Luo 2013-10-31 02:58:25 EDT
Description of problem:
there are four "VFS: busy inodes on changed media or resized disk sr0" message prompt after eject the IDE cdrom via HMP monitor.

Version-Release number of selected component (if applicable):
host info:
2.6.32-425.el6.x86_64
qemu-kvm-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.boot guest with a IDE cdrom.
e.g:...-drive file=/home/my-cdrom1.iso,media=cdrom,if=none,id=drive-disk1,format=raw,cache=none,aio=native -device ide-drive,bus=ide.0,unit=0,drive=drive-disk1,id=disk1
(qemu) info block
drive-virtio-disk: removable=0 io-status=ok file=/home/RHEL-6.5-Snapshot-4-Server-x86_64.qcow2 ro=0 drv=qcow2 encrypted=0
drive-data-disk: removable=0 io-status=ok file=/home/my-data-disk.raw ro=0 drv=raw encrypted=0
drive-disk1: removable=1 locked=0 tray-open=0 io-status=ok file=/home/my-cdrom1.iso ro=1 drv=raw encrypted=0
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
2.login guest.
# mount
...
/dev/sr0 on /media/CDROM type iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=0,gid=0,iocharset=utf8,mode=0400,dmode=0500)
3.eject the ide cdrom via HMP monitor.
(qemu) eject drive-disk1
# dmesg
# mount
4.change the ide cdrom and umount it in guest.
(qemu) change drive-disk1 /home/my-cdrom1.iso
# mount
# umount /media/CDROM
# dmesg

Actual results:
after step 3, there are four "VFS: busy inodes on changed media or resized disk sr0" message prompt after eject the IDE cdrom via HMP monitor.
# dmesg 
VFS: busy inodes on changed media or resized disk sr0
VFS: busy inodes on changed media or resized disk sr0
VFS: busy inodes on changed media or resized disk sr0
VFS: busy inodes on changed media or resized disk sr0
# mount
      <------there is no cdrom mounted.
after step 4, removing the cdrom from guest not meet the VFS warning.
# dmesg
SELinux: initialized (dev sr0, type iso9660), uses genfs_contexts

Expected results:
there shoud no "VFS: busy inodes on changed media or resized disk sr0" warning message in guest dmesg.

Additional info:
Comment 1 Sibiao Luo 2013-10-31 03:08:38 EDT
Also hit it with the scsi-cd interface, so modify the title.

e.g:...-drive file=/home/my-cdrom1.iso,media=cdrom,if=none,id=drive-disk1,format=raw,cache=none,aio=native -device virtio-scsi-pci,bus=pci.0,addr=0x8,id=scsi0 -device scsi-cd,bus=scsi0.0,drive=drive-disk1,id=disk1
(qemu) info block
drive-virtio-disk: removable=0 io-status=ok file=/home/RHEL-6.5-Snapshot-4-Server-x86_64.qcow2 ro=0 drv=qcow2 encrypted=0
drive-data-disk: removable=0 io-status=ok file=/home/my-data-disk.raw ro=0 drv=raw encrypted=0
drive-disk1: removable=1 locked=0 tray-open=0 io-status=ok file=/home/my-cdrom1.iso ro=1 drv=raw encrypted=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]

# mount
...
/dev/sr1 on /media/CDROM type iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=0,gid=0,iocharset=utf8,mode=0400,dmode=0500)
# ls -lh /dev/cdrom*
lrwxrwxrwx. 1 root root 3 Oct 30 19:02 /dev/cdrom -> sr0
lrwxrwxrwx. 1 root root 3 Oct 30 19:02 /dev/cdrom4 -> sr1

- After eject the cdrom via HMP monitor.
(qemu) eject drive-disk1
(qemu) info block
drive-virtio-disk: removable=0 io-status=ok file=/home/RHEL-6.5-Snapshot-4-Server-x86_64.qcow2 ro=0 drv=qcow2 encrypted=0
drive-data-disk: removable=0 io-status=ok file=/home/my-data-disk.raw ro=0 drv=raw encrypted=0
drive-disk1: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]

# dmesg 
VFS: busy inodes on changed media or resized disk sr1
VFS: busy inodes on changed media or resized disk sr1
VFS: busy inodes on changed media or resized disk sr1
VFS: busy inodes on changed media or resized disk sr1
VFS: busy inodes on changed media or resized disk sr1
VFS: busy inodes on changed media or resized disk sr1
VFS: busy inodes on changed media or resized disk sr1
Comment 2 Sibiao Luo 2013-10-31 04:27:52 EDT
(In reply to Sibiao Luo from comment #1)
> Also hit it with the scsi-cd interface, so modify the title.
> 
> e.g:...-drive
> file=/home/my-cdrom1.iso,media=cdrom,if=none,id=drive-disk1,format=raw,
> cache=none,aio=native -device virtio-scsi-pci,bus=pci.0,addr=0x8,id=scsi0
> -device scsi-cd,bus=scsi0.0,drive=drive-disk1,id=disk1
> (qemu) info block
> drive-virtio-disk: removable=0 io-status=ok
> file=/home/RHEL-6.5-Snapshot-4-Server-x86_64.qcow2 ro=0 drv=qcow2 encrypted=0
> drive-data-disk: removable=0 io-status=ok file=/home/my-data-disk.raw ro=0
> drv=raw encrypted=0
> drive-disk1: removable=1 locked=0 tray-open=0 io-status=ok
> file=/home/my-cdrom1.iso ro=1 drv=raw encrypted=0
> ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
> floppy0: removable=1 locked=0 tray-open=0 [not inserted]
> sd0: removable=1 locked=0 tray-open=0 [not inserted]
> 
> # mount
> ...
> /dev/sr1 on /media/CDROM type iso9660
> (ro,nosuid,nodev,uhelper=udisks,uid=0,gid=0,iocharset=utf8,mode=0400,
> dmode=0500)
> # ls -lh /dev/cdrom*
> lrwxrwxrwx. 1 root root 3 Oct 30 19:02 /dev/cdrom -> sr0
> lrwxrwxrwx. 1 root root 3 Oct 30 19:02 /dev/cdrom4 -> sr1
> 
> - After eject the cdrom via HMP monitor.
> (qemu) eject drive-disk1
> (qemu) info block
> drive-virtio-disk: removable=0 io-status=ok
> file=/home/RHEL-6.5-Snapshot-4-Server-x86_64.qcow2 ro=0 drv=qcow2 encrypted=0
> drive-data-disk: removable=0 io-status=ok file=/home/my-data-disk.raw ro=0
> drv=raw encrypted=0
> drive-disk1: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
> ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
> floppy0: removable=1 locked=0 tray-open=0 [not inserted]
> sd0: removable=1 locked=0 tray-open=0 [not inserted]
> 
> # dmesg 
> VFS: busy inodes on changed media or resized disk sr1
> VFS: busy inodes on changed media or resized disk sr1
> VFS: busy inodes on changed media or resized disk sr1
> VFS: busy inodes on changed media or resized disk sr1
> VFS: busy inodes on changed media or resized disk sr1
> VFS: busy inodes on changed media or resized disk sr1
> VFS: busy inodes on changed media or resized disk sr1
BTW, the scsi-cd has a different from ide, there still have mount relationship in guest after eject scsi-cd cdrom and flood with "VFS: busy inodes on changed media or resized disk sr1" warning message, not only four messages, so i sperate a new bug 1025194 to tracing it.
# mount
...
/dev/sr1 on /media/CDROM type iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=0,gid=0,iocharset=utf8,mode=0400,dmode=0500)

Best Regards,
sluo
Comment 3 Paolo Bonzini 2013-10-31 09:44:38 EDT
Sibiao, can you reproduce it with RHEL7 guest on RHEL6 host, and RHEL6 guest on RHEL7 host?
Comment 4 Sibiao Luo 2013-10-31 23:04:44 EDT
(In reply to Paolo Bonzini from comment #3)
> Sibiao, can you reproduce it with RHEL7 guest on RHEL6 host, and RHEL6 guest
> on RHEL7 host?
Tried the ide cdrom with your instructions.

rhel6.5 host + rhel7 guest ------ still hit it with the same results.
rhel7 host + rhel6.5 guest ------ still hit it with the same results.

rhel7 info:
# uname -r && rpm -q qemu-kvm
3.10.0-37.el7.x86_64
qemu-kvm-1.5.3-10.el7.x86_64
rhel6.5 info:
2.6.32-425.el6.x86_64
qemu-kvm-0.12.1.2-2.415.el6.x86_64

Best Regards,
sluo
Comment 5 Sibiao Luo 2013-11-01 01:14:20 EDT
(In reply to Sibiao Luo from comment #4)
> (In reply to Paolo Bonzini from comment #3)
> > Sibiao, can you reproduce it with RHEL7 guest on RHEL6 host, and RHEL6 guest
> > on RHEL7 host?
> Tried the ide cdrom with your instructions.
> 
> rhel6.5 host + rhel7 guest ------ still hit it with the same results.
> rhel7 host + rhel6.5 guest ------ still hit it with the same results.
Paolo, should I need to clone this issue to rhel7 for tracing it ? Thnaks.
> rhel7 info:
> # uname -r && rpm -q qemu-kvm
> 3.10.0-37.el7.x86_64
> qemu-kvm-1.5.3-10.el7.x86_64
> rhel6.5 info:
> 2.6.32-425.el6.x86_64
> qemu-kvm-0.12.1.2-2.415.el6.x86_64
> 
> Best Regards,
> sluo
Comment 6 RHEL Product and Program Management 2013-11-04 00:25:45 EST
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 10 Paolo Bonzini 2016-01-08 11:48:02 EST
QE, can this be reproduced on RHEL7 too?
Comment 11 jingzhao 2016-01-11 02:34:31 EST
(In reply to Paolo Bonzini from comment #10)
> QE, can this be reproduced on RHEL7 too?

--Can reproduced on rhel6 host +rhel 6 guest
kernel version: 2.6.32-595.el6.x86_64
qemu-kvm-0.12.1.2-2.482.el6.x86_64

Didn't reproduced on RHEL7 host + rhel7 guest
kernel version:3.10.0-327.5.1.el7.x86_64
qemu-kvm-rhev-2.3.0-31.el7_2.5.x86_64

but found another questions
1. we didn't find the /dev/sr0 messages through mount in guest
2. we should eject the disk successfully after executed eject cmd in qemu secondly (I think we should eject successfully at the first time)

following is the steps of reproduce:
1. Boot guest with following cli:

/usr/libexec/qemu-kvm \
-M pc \
-cpu SandyBridge \
-no-user-config -nodefaults -rtc base=utc -no-hpet \
-m 4G \
-smp 4,sockets=2,cores=2,threads=1 \
-enable-kvm \
-name rhel7 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-k en-us \
-monitor stdio \
-qmp tcp:0:6660,server,nowait \
-serial unix:/tmp/serial0,server,nowait \
-boot menu=on \
-bios /usr/share/seabios/bios.bin \
-vga std \
-vnc :0 \
-netdev tap,id=hostnet0,vhost=on \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=54:52:00:B6:40:21 \
-drive file=/home/rhel.img,if=none,id=drive-virtio-disk0,format=raw,cache=none,werror=stop,rerror=stop,aio=threads \
-device virtio-blk-pci,scsi=off,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0 \
-drive file=/usr/share/virtio-win/virtio-win-1.8.0.iso,media=cdrom,if=none,id=drive-disk1,format=raw,cache=none,aio=native \
-device ide-drive,bus=ide.0,unit=0,drive=drive-disk1,id=disk1 \

2.in guest:
#mount

/dev/sr0 on /run/media/root/virtio-win-1.8.0 type iso9660 (ro,nosuid,nodev,relatime,uid=0,gid=0,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks2)
3.eject drive-disk1 in qemu monitor

Device 'drive-disk1' is locked

# info block in qemu monitor
drive-disk1: /usr/share/virtio-win/virtio-win-1.8.0.iso (raw, read-only)
    Removable device: not locked, tray open
    Cache mode:       writeback, direct


4.in guest:
#mount
there no message about /dev/sr0

#dmesg
[   82.710283] VFS: busy inodes on changed media or resized disk sr0

[root@localhost ~]# ls -lh /dev/cdrom*
lrwxrwxrwx. 1 root root 3 1月  11 15:26 /dev/cdrom -> sr0

5. eject drive-disk1 in qemu monitor again and there no warnings
Comment 12 jingzhao 2016-01-11 02:50:21 EST
(In reply to jingzhao from comment #11)
> (In reply to Paolo Bonzini from comment #10)
> > QE, can this be reproduced on RHEL7 too?
> 
> --Can reproduced on rhel6 host +rhel 6 guest
> kernel version: 2.6.32-595.el6.x86_64
> qemu-kvm-0.12.1.2-2.482.el6.x86_64
> 
> Didn't reproduced on RHEL7 host + rhel7 guest
> kernel version:3.10.0-327.5.1.el7.x86_64
> qemu-kvm-rhev-2.3.0-31.el7_2.5.x86_64
> 
> but found another questions
> 1. we didn't find the /dev/sr0 messages through mount in guest
> 2. we should eject the disk successfully after executed eject cmd in qemu
> secondly (I think we should eject successfully at the first time)
> 
> following is the steps of reproduce:
> 1. Boot guest with following cli:
> 
> /usr/libexec/qemu-kvm \
> -M pc \
> -cpu SandyBridge \
> -no-user-config -nodefaults -rtc base=utc -no-hpet \
> -m 4G \
> -smp 4,sockets=2,cores=2,threads=1 \
> -enable-kvm \
> -name rhel7 \
> -uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
> -smbios type=1,manufacturer='Red Hat',product='RHEV
> Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-
> e63fcdb67170 \
> -k en-us \
> -monitor stdio \
> -qmp tcp:0:6660,server,nowait \
> -serial unix:/tmp/serial0,server,nowait \
> -boot menu=on \
> -bios /usr/share/seabios/bios.bin \
> -vga std \
> -vnc :0 \
> -netdev tap,id=hostnet0,vhost=on \
> -device virtio-net-pci,netdev=hostnet0,id=net0,mac=54:52:00:B6:40:21 \
> -drive
> file=/home/rhel.img,if=none,id=drive-virtio-disk0,format=raw,cache=none,
> werror=stop,rerror=stop,aio=threads \
> -device
> virtio-blk-pci,scsi=off,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0 \
> -drive
> file=/usr/share/virtio-win/virtio-win-1.8.0.iso,media=cdrom,if=none,id=drive-
> disk1,format=raw,cache=none,aio=native \
> -device ide-drive,bus=ide.0,unit=0,drive=drive-disk1,id=disk1 \
> 
> 2.in guest:
> #mount
> 
> /dev/sr0 on /run/media/root/virtio-win-1.8.0 type iso9660
> (ro,nosuid,nodev,relatime,uid=0,gid=0,iocharset=utf8,mode=0400,dmode=0500,
> uhelper=udisks2)
> 3.eject drive-disk1 in qemu monitor
> 
> Device 'drive-disk1' is locked
> 
> # info block in qemu monitor
> drive-disk1: /usr/share/virtio-win/virtio-win-1.8.0.iso (raw, read-only)
>     Removable device: not locked, tray open
>     Cache mode:       writeback, direct
> 
> 
> 4.in guest:
> #mount
> there no message about /dev/sr0
> 
> #dmesg
> [   82.710283] VFS: busy inodes on changed media or resized disk sr0
> 
> [root@localhost ~]# ls -lh /dev/cdrom*
> lrwxrwxrwx. 1 root root 3 1月  11 15:26 /dev/cdrom -> sr0
> 
> 5. eject drive-disk1 in qemu monitor again and there no warnings

-keep on going with above steps and found there have no messages about "dev/sr0" after the following steps, please help to confirm it and we will file a new bug for tracking it if it's really a issue. thanks

6."change drive-disk1 /usr/share/virtio-win/virtio-win-1.8.0.iso" in qemu monitor and in guest:
#mount
there have no message about /dev/sr0

but "info block" in monitor 

drive-disk1: /usr/share/virtio-win/virtio-win-1.8.0.iso (raw, read-only)
    Removable device: locked, tray closed
    Cache mode:       writethrough

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