Bug 6006 - magicdev: kernel VFS: Disk change detected on device ide1 (22.64)
Summary: magicdev: kernel VFS: Disk change detected on device ide1 (22.64)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: magicdev
Version: 6.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact:
URL:
Whiteboard: Florence RC-1
: 5714 6064 6325 11071 12127 15455 30388 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-10-16 22:59 UTC by Mario Lorenz
Modified: 2008-05-01 15:37 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-02-09 14:50:33 UTC
Embargoed:


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

Description Mario Lorenz 1999-10-16 22:59:15 UTC
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
gnome.

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 20:28:59 UTC
*** 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  10/18/99 16:27 -------
It's in magicdev; kudzu doesn't actually run as a daemon.

Comment 2 Bill Nottingham 1999-10-18 21:15:59 UTC
*** 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  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 4 Owen Taylor 1999-11-18 18:54:59 UTC
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 15:17:59 UTC
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.
Thanks!

Comment 6 Alan Cox 2000-08-05 14:27:23 UTC
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 21:42:13 UTC
*** Bug 15455 has been marked as a duplicate of this bug. ***

Comment 8 Owen Taylor 2000-08-05 22:01:06 UTC
*** Bug 15455 has been marked as a duplicate of this bug. ***

Comment 9 Alan Cox 2000-08-08 21:09:41 UTC
*** Bug 11071 has been marked as a duplicate of this bug. ***

Comment 10 Matt Wilson 2001-01-31 13:54:23 UTC
I gave lab-rats a patch to use proc ages ago.

Comment 11 Matt Wilson 2001-01-31 13:55:47 UTC
Created attachment 8560 [details]
the beginning of a patch to make magicdev use proc to detect media

Comment 12 Preston Brown 2001-01-31 19:54:15 UTC
*** Bug 12127 has been marked as a duplicate of this bug. ***

Comment 13 Glen Foster 2001-01-31 20:40:37 UTC
This defect should really be fixed before the next release ships.

Comment 14 Preston Brown 2001-02-05 22:53:08 UTC
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 20:56:26 UTC
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 21:04:51 UTC
*** Bug 26055 has been marked as a duplicate of this bug. ***

Comment 17 Owen Taylor 2001-02-08 02:14:07 UTC
(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 18:00:18 UTC
How about we just throttle the message?

Comment 19 Arjan van de Ven 2001-02-08 18:06:43 UTC
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 14:47:23 UTC
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 14:50:18 UTC
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 16:18:12 UTC
kernel message has been throttled.

Comment 23 Owen Taylor 2001-08-01 18:52:10 UTC
*** Bug 30388 has been marked as a duplicate of this bug. ***

Comment 24 Eli Barzilay 2001-08-17 09:25:34 UTC
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 09:31:59 UTC
One more reason not to enable magicdev by default

Comment 26 Havoc Pennington 2001-08-17 13:53:31 UTC
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.