Bug 6006 - magicdev: kernel VFS: Disk change detected on device ide1 (22.64)
magicdev: kernel VFS: Disk change detected on device ide1 (22.64)
Product: Red Hat Linux
Classification: Retired
Component: magicdev (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Florence RC-1
: 5714 6064 6325 11071 12127 15455 30388 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 1999-10-16 18:59 EDT by Mario Lorenz
Modified: 2008-05-01 11:37 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-02-09 09:50:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
the beginning of a patch to make magicdev use proc to detect media (1.02 KB, patch)
2001-01-31 08:55 EST, Matt Wilson
no flags Details | Diff

  None (edit)
Description Mario Lorenz 1999-10-16 18:59:15 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
trouble before...)
Comment 1 Bill Nottingham 1999-10-18 16:28:59 EDT
*** 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
second IDE.

------- Additional Comments From notting@redhat.com  10/18/99 16:27 -------
It's in magicdev; kudzu doesn't actually run as a daemon.
Comment 2 Bill Nottingham 1999-10-18 17:15:59 EDT
*** 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 katzj@linuxpower.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)
Comment 3 Bill Nottingham 1999-10-25 12:14:59 EDT
*** Bug 6325 has been marked as a duplicate of this bug. ***

Hello Bugzilla,

I have recently installed RH 6.1 on my test partition, and
noticed some peculiar messages when running dmesg. It shows
numerous entries:
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.
Comment 4 Owen Taylor 1999-11-18 13:54:59 EST
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.
Comment 5 Stephan R.A. Deibel 2000-02-20 10:17:59 EST
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.
Comment 6 Alan Cox 2000-08-05 10:27:23 EDT
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
Comment 7 Owen Taylor 2000-08-05 17:42:13 EDT
*** Bug 15455 has been marked as a duplicate of this bug. ***
Comment 8 Owen Taylor 2000-08-05 18:01:06 EDT
*** Bug 15455 has been marked as a duplicate of this bug. ***
Comment 9 Alan Cox 2000-08-08 17:09:41 EDT
*** Bug 11071 has been marked as a duplicate of this bug. ***
Comment 10 Matt Wilson 2001-01-31 08:54:23 EST
I gave lab-rats a patch to use proc ages ago.
Comment 11 Matt Wilson 2001-01-31 08:55:47 EST
Created attachment 8560 [details]
the beginning of a patch to make magicdev use proc to detect media
Comment 12 Preston Brown 2001-01-31 14:54:15 EST
*** Bug 12127 has been marked as a duplicate of this bug. ***
Comment 13 Glen Foster 2001-01-31 15:40:37 EST
This defect should really be fixed before the next release ships.
Comment 14 Preston Brown 2001-02-05 17:53:08 EST
Owen/Elliot/Havoc:  I need one of you guys to hack on magicdev with MSWs patch
this week.
Comment 15 Owen Taylor 2001-02-07 15:56:26 EST
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.
Comment 16 Owen Taylor 2001-02-07 16:04:51 EST
*** Bug 26055 has been marked as a duplicate of this bug. ***
Comment 17 Owen Taylor 2001-02-07 21:14:07 EST
(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)
Comment 18 Michael K. Johnson 2001-02-08 13:00:18 EST
How about we just throttle the message?
Comment 19 Arjan van de Ven 2001-02-08 13:06:43 EST
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.
Comment 20 Jason Merrill 2001-02-09 09:47:23 EST
Does the kernel support anything else?  I believe Windows handles this 
situation without polling, can we?
Comment 21 Arjan van de Ven 2001-02-09 09:50:18 EST
2.4 kernels have a very nice change-notification mechanism. I'm not sure
it works for CD-rom inserts though.
Comment 22 Preston Brown 2001-02-15 11:18:12 EST
kernel message has been throttled.
Comment 23 Owen Taylor 2001-08-01 14:52:10 EDT
*** Bug 30388 has been marked as a duplicate of this bug. ***
Comment 24 Eli Barzilay 2001-08-17 05:25:34 EDT
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).
Comment 25 Arjan van de Ven 2001-08-17 05:31:59 EDT
One more reason not to enable magicdev by default
Comment 26 Havoc Pennington 2001-08-17 09:53:31 EDT
Is the kernel message back? It should be turned off. It's been turned off twice
before IIRC.

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