Skip to contentSkip to conversation

Disk change messages

PATCH Petr Konecny 2 participants 2 messages Feb 27, 2001 – Mar 1, 2001

lore
Share & tools
lore
#0 lore raw

Hi,

I've been trying to use vold to automount CDs. The daemon tries to open /dev/cdrom and if it succeeds it examines the media and mounts it under /cdrom/volume_name.

The problem is that when there is no disk in the drive the following message:
VFS: Disk change detected on device ide1(22,0)
is written to system log during each open call. Vold calls open every 5 seconds, so it's 17280 lines in log/day. I have been able to avoid these messages by commenting out a line in drivers/ide/ide-cd.c (patch included) and have not seen any problems yet.

I guess I have three questions:
1. can this patch break things ? I suppose it could happen only if cdrom_saw_media_change was not called when the CD is changed.
2. is it possible to avoid the message by modifying vold ? E.g. finding out that there is no media in the drive without calling open.
3. is there a clean way to avoid these repeated messages ?

Thanks, Petr

02/27 19:51:58 renamed from 02/22 22:30:02 1.1.1.11 +1 -1
@@ -601,7 +601,7 @@
 
                /* Check for tray open. */
                if (sense_key == NOT_READY) {
-                       cdrom_saw_media_change (drive);
+/*                     cdrom_saw_media_change (drive); */
                } else if (sense_key == UNIT_ATTENTION) {
                        /* Check for media change. */
                        cdrom_saw_media_change (drive);
#1 lore raw

Hi!

Quoted 12 lines

I've been trying to use vold to automount CDs. The daemon tries to open /dev/cdrom and if it succeeds it examines the media and mounts it under /cdrom/volume_name.

The problem is that when there is no disk in the drive the following message:
VFS: Disk change detected on device ide1(22,0)
is written to system log during each open call. Vold calls open every 5 seconds, so it's 17280 lines in log/day. I have been able to avoid these messages by commenting out a line in drivers/ide/ide-cd.c (patch included) and have not seen any problems yet.

Quoted 2 lines

I guess I have three questions:
1. can this patch break things ? I suppose it could happen only

No.

Quoted 2 lines

2. is it possible to avoid the message by modifying vold ? E.g. finding out that there is no media in the drive without calling open.

Don't think so.

Quoted 1 line

3. is there a clean way to avoid these repeated messages ?

Syslogdshould sumarize "last message repeated 123456 times" .

Quoted 19 lines

Thanks, Petr

02/27 19:51:58 renamed from 02/22 22:30:02 1.1.1.11 +1 -2
@@ -601,7 +601,7 @@
 
                /* Check for tray open. */
                if (sense_key == NOT_READY) {
-                       cdrom_saw_media_change (drive);
+/*                     cdrom_saw_media_change (drive); */
                } else if (sense_key == UNIT_ATTENTION) {
                        /* Check for media change. */
                        cdrom_saw_media_change (drive);
 
-

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 2 lines
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.