Important: fs corruption with 2.0.33 and removable media

Wolfram@informatik.uni-bonn.de
Tue, 3 Mar 1998 13:59:17 +0100 (MET)


There is a very disastrous bug in 2.0.33 (untested with 2.1.x):
The disc change detection with removable media is not 100% working !
This has a destroying effect if your computer has enough RAM for caching.
[tested... :-(((( ]

Please test the following with your hardware: (reproduce able for me)
-mount the media and unmount it
-eject the media
-insert another media
-wait ~ 30 min. without doing anything at your computer (important !)
-mount this media (better mount it ro for safety !)
-no disc change detection.... (look at the kernel logs)

It looks like the disc change has been forgotten in these 30 min.
The disc change detection works normal if the change and mount happens within
less time.

The hardware: Fujitsu M2512A2 (230MB MO Drive & 230MB Media)
ncr53c825 SCSI interface (with Gerard Roudier's driver)

Is this reproduce able by other people ?

Is there any possibility to fix this bug inside the kernel ?
E.g. test every minute for disc change detection ?

PS:
A little fix for ext2:
Don't flood the kernel logs with "Remounting filesystem read-only" messages if
it has been done already.

--- /usr/src/linux/fs/ext2/super.c~ Tue Jul 15 12:54:04 1997
+++ /usr/src/linux/fs/ext2/super.c Tue Mar 3 12:48:02 1998
@@ -56,7 +56,8 @@
if (test_opt (sb, ERRORS_RO) ||
(sb->u.ext2_sb.s_es->s_errors == EXT2_ERRORS_RO &&
!test_opt (sb, ERRORS_CONT) && !test_opt (sb, ERRORS_PANIC))) {
- printk ("Remounting filesystem read-only\n");
+ if (!(sb->s_flags & MS_RDONLY))
+ printk(KERN_ALERT "Remounting filesystem read-only\n");
sb->s_flags |= MS_RDONLY;
}
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu