Red Hat Bugzilla – Bug 6006
magicdev: kernel VFS: Disk change detected on device ide1 (22.64)
Last modified: 2008-05-01 11:37:52 EDT
This is (probably) a bug in magicdev.
Alan told me to file it here.
Since magicdev is not listed as an option in bugzilla, he
told me to put it to gmc, which doesnt exist either. So
Bug description: I get messages
kernel VFS: Disk change detected on device ide (22,64) each
two seconds (!) in my kernel logs when using gnome.
Alan pointed out that magicdev might have a problem with my
cdrom, hence suggested rpm -e it.
Indeed this fixed the problem.
My CD drive is a FX400E (yes, its old, but it never made any
*** Bug 6064 has been marked as a duplicate of this bug. ***
After installing the full RH61 distr. and rebooting I
noticed repeating messages in 'dmesg' stating there had been
a disk change on ide1. Killing the magicdev process solved
the problem. Removing kudzu from the rc.3 rc.4 and rc.5
trees solves the problem too. Messages in DMESG get repeated
once every 30 or so seconds approximatly. Behavior is
consistent with that of a friend of mine who runs RH61 as
well and confirmed this phenomena on his machine. My machine
is a Dell Dimension XPS T450 (PIII 450) with 1 25 gig HDD on
the first IDE and a Toshiba DVD-rom + SONY CDRW 100 on the
------- Additional Comments From email@example.com 10/18/99 16:27 -------
It's in magicdev; kudzu doesn't actually run as a daemon.
*** Bug 5714 has been marked as a duplicate of this bug. ***
I've just installed Redhat 6.1, and have noticed that I get
repeated messages of the form
"kernel: VFS: Disk change detected on device ide1(22,0)"
pouring into the syslogs.
The machine in question has an IDE ZIP disk and CDROM, but
no other IDE devices.
Obviously not a real problem, but a bit irritating.
------- Additional Comments From firstname.lastname@example.org 10/13/99 00:15 -------
This is due to magicdev polling your CD drive; check the CD properties
in the Gnome Control Center (gnomecc)
*** Bug 6325 has been marked as a duplicate of this bug. ***
I have recently installed RH 6.1 on my test partition, and
noticed some peculiar messages when running dmesg. It shows
VFS: Disk change detected on sr(11,0).
Major/minor 11,0 happens to be /dev/scd0, my Philips CDD
3600 CD ReWritable connected to my SYM53C810A based PCI SCSI
controller. I find this strange as there are no disks in
the CDD 3600, and more and more of these messages appear in
dmesg. My production RH 6.0 system doesn't show this
error. I'm not sure if this is kernel based, apologies if
Kind regards, Pim Vijfhuizen.
While magicdev is triggering these messages, their presence
has to be considered a kernel bug or misfeature.
Although I haven't traced through the drivers in detail,
apparently doing the CDROM_DRIVE_STATUS ioctl sets the
media_changed flag for the cdrom. The next time that the
device is opened, fs/devices.c does the printk() in question.
magicdev opens and closes the device each time it polls
rather than just keeping the device open so that another
program can eject the device. (A CDROM cannot be ejected
if the open count on the device is > 1)
The level of this message is KERN_DEBUG so it doesn't get
logged in a default Red Hat configuration, but some people
certainly will get bitten by this.
I don't know if the solution is:
a) Just remove the printk(). While its traditional to have
these messages scattered through ones log files, I don't
see that they actually are useful.
b) Fix the IDE cdrom driver so that it remembers that the
device is empty so next time a CDROM_DRIVE_STATUS ioctl()
reveals this, it doesn't set the media_changed flag again.
Note that this is completely independent of what magicdev
does once it discovers that a cdrom has been inserted, so
whether autorun is a good idea or not, any program that
tries to do the automount / autoplay actions of magicdev
will trigger the same problem.
It would be nice, of course, to get notification of the changes
without polling, but I don't know how that would be possible
with the current interfaces.
I have what might be a variant of this and possibly interaction with another
scsi driver or kernel bug resulting in worse consequences: My machine fails to
shut down cleanly. I have two CD ROM drives. The IDE drive works fine but for
my Yamaha CRW641S (attached to Adaptec AIC-7895) I get many "pangolin kernel:
Device not ready. Make sure there is a disc in the drive" log entries and then
"pangolin kernel: (scsi0:0:3:0) Performing Domain validation. Feb 20 09:56:40
pangolin kernel: (scsi0:0:3:0) Successfully completed Domain validation." Over
and over again in various groupings. Subsequently, a shutdown it cannot unmount
the root file system, which is at scsi0:0:0:0! Work around was to turn off
auto-mounting of CDs in Gnome (or disabling magicdev). If this indicates an
additional bug in the scsi driver or kernel as well (it really should be able to
unmount drivers in spite of the polling errors!) please let me know so I can try
to report it. Or feel free to redesignate or rework this report or whatever.
Its a combination of magicdev doing unusual things to drives and crap drive
firmware. There are now better ways to rewrite magic dev but not in time for
this beta I suspect
*** Bug 15455 has been marked as a duplicate of this bug. ***
*** Bug 11071 has been marked as a duplicate of this bug. ***
I gave lab-rats a patch to use proc ages ago.
Created attachment 8560 [details]
the beginning of a patch to make magicdev use proc to detect media
*** Bug 12127 has been marked as a duplicate of this bug. ***
This defect should really be fixed before the next release ships.
Owen/Elliot/Havoc: I need one of you guys to hack on magicdev with MSWs patch
Matt's patch, as it turns out, isn't doing anything but turning
off checking entirely - he had misinterpreted the meaning
of the files in /proc. (The files that the patch looks at
are in /proc/sys - and appropriate to that, they report static
info and change config options, rather than reporting dynamic
status, which still has to be done through ioctls.)
About the only thing I could see that I could conceivably do
with the information in /proc/sys/dev/cdrom is turn off magicdev
entirely for CD writers, if the kernel/firmware bugs that used
to result in coasters with magicdev turned on still exist.
I'd be curious to know how Alan thinks magicdev could be rewritten
better - my comments above about kernel problems still, as far
as I know, stand.
*** Bug 26055 has been marked as a duplicate of this bug. ***
(note that we commented out the message in a patch to 2.2.16 for 7.0,
but it is back in the 7.0/2.4.x packages)
How about we just throttle the message?
It's a real but fixed magicdev bug (or so I hear). Not a kernel bug.
If some program probes the hardware every 2 seconds, I don't think
we should throttle the error-message for that.
Does the kernel support anything else? I believe Windows handles this
situation without polling, can we?
2.4 kernels have a very nice change-notification mechanism. I'm not sure
it works for CD-rom inserts though.
kernel message has been throttled.
*** Bug 30388 has been marked as a duplicate of this bug. ***
I hope that this message will reach somewhere, since I don't think it is
closed yet. Just in case I've installed the rawhide magicdev (0.3.6-1)
and it's still there. I think that basically any CD problem will make it
flood messages. The message I get is
end_request: I/O error, dev 16:00 (hdc), sector 0
and the reson I get it is that I pulled out the CD drive from my laptop
(but again, I believe that the specifics are not too important).
BTW, just as an additional reason why this is bad -- I suppose many laptop
users will pull out their CD in favor of a battery to get more time, and
this just keeps the HD busy so they end up wasting power (not to mention
piling up junk in the log file).
One more reason not to enable magicdev by default
Is the kernel message back? It should be turned off. It's been turned off twice