fatal mount-problem
Hello all,
If you mount a device like ide-cdrom with the scsi-emulation turned on (as modules) and you do the same mount again on the same (not unmounted) device, the mount-programm hangs up and never comes back. It doesn't recognize, that the device is allready mounted.
If I do a simple "mount", mount lists the /cdrom - device as mounted.
Problem: if you want to unmount the device, mount tells that the device would be bussy and ends. So, you've no chance to unmount the device again. The only way to unmount it, is to do a hardware reset (a normal reboot doesn't work, because mount hangs at the cdrom-device).
Kernel 2.4.9 is working fine.
Quoted 1 line
mount --version
mount: mount-2.11h
Regards,
Andreas Hartmann
Quoted 7 lines · Andreas Hartmann
Hello all,
If you mount a device like ide-cdrom with the scsi-emulation turned on (as modules) and you do the same mount again on the same (not unmounted) device, the mount-programm hangs up and never comes back. It doesn't recognize, that the device is allready mounted.
strace, please. -ac5 and 2.4.9 have the same code in fs/super.c, so I really wonder what the hell is happening...
Quoted 6 lines
Quoted 3 lines
(as modules) and you do the same mount again on the same (not unmounted) device, the mount-programm hangs up and never comes back. It doesn't recognize, that the device is allready mounted.
strace, please. -ac5 and 2.4.9 have the same code in
fs/super.c, so I really wonder what the hell is happening...
Duplicated here with 2.4.8-ac6
Booted with ide-scsi as the cd driver
mount /dev/scd0 /mnt
umount /dev/scs0
mount /dev/scd0 /mnt
umount /dev/scd0
works fine
mount /dev/scd0 /mnt
mount /dev/scd0 /mmt
hangs (D state)
mount /dev/scd0 /mnt
mount /dev/scd0 /tmp
hangs (D state)
Quoted 5 lines · Alan Cox
Quoted 5 lines
Quoted 3 lines
(as modules) and you do the same mount again on the same (not unmounted) device, the mount-programm hangs up and never comes back. It doesn't recognize, that the device is allready mounted.
strace, please. -ac5 and 2.4.9 have the same code in
fs/super.c, so
Aha. They actually don't (sorry - I was thinking of 2.4.7-ac5), but...
Quoted 4 lines
Quoted 1 line
I really wonder what the hell is happening...
Duplicated here with 2.4.8-ac6
Booted with ide-scsi as the cd driver
I can't reproduce it with /dev/hda and /dev/hdd (ide-disk and ide-cd resp.) here. I'll build kernel with ide-scsi and see what's going on with that.
Quoted 9 lines · Alexander Viro
Quoted 5 lines · Alan Cox
Quoted 5 lines
Quoted 3 lines
(as modules) and you do the same mount again on the same (not unmounted) device, the mount-programm hangs up and never comes back. It doesn't recognize, that the device is allready mounted.
strace, please. -ac5 and 2.4.9 have the same code in
fs/super.c, so
Quoted 8 lines
Aha. They actually don't (sorry - I was thinking of 2.4.7-ac5), but...
Quoted 4 lines
Quoted 1 line
I really wonder what the hell is happening...
Duplicated here with 2.4.8-ac6
Booted with ide-scsi as the cd driverI can't reproduce it with
/dev/hdaand/dev/hdd(ide-disk and ide-cd resp.) here. I'll build kernel with ide-scsi and see what's going on with that.
andreas@athlon:~ > mount/dev/hda1 on / type reiserfs (rw)
proc on /proc type proc (rw)/dev/hda6 on /opt type reiserfs (rw)/dev/hda9 on /usr type reiserfs (rw)/dev/hda8 on /Daten type reiserfs (rw) /dev/hda7 on /home type reiserfs (rw)/dev/hda5 on /var type reiserfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw)/dev/sr1 on /cdrom type iso9660 (ro,noexec,nosuid,nodev)
Now the strace after /cdrom has allready been mounted (with ide-scsi turned on)
145 execve("/bin/mount", ["mount", "/cdrom"], [/* 54 vars */]) = 0
145 uname({sys="Linux", node="athlon", ...}) = 0
145 brk(0) = 0x8057840
145 shmat(0, 0x400151b8, 0x1) = ?
145 shmat(1, 0x400151b8, 0x1) = 0xbffff424
145 shmat(2, 0x400151b8, 0x1) = ?
145 access("/etc/suid-debug", F_OK) = -1 ENOENT (No such file or
directory)
145 open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
145 open("/etc/ld.so.cache", O_RDONLY) = 4
145 SYS_197(0x4, 0xbfffebe4, 0x40014f40, 0x40015164, 0x4) = 0
145 mmap(NULL, 62282, PROT_READ, MAP_PRIVATE, 4, 0) = 0x40016000
145 close(4) = 0
145 open("/lib/libc.so.6", O_RDONLY) = 4
145 read(4,"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0X\331\1"..., 1024) = 1024
145 SYS_197(0x4, 0xbfffec2c, 0x40014f40, 0x40015164, 0x4) = 0
145 mmap(NULL, 1195044, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) =0x40026000
145 mprotect(0x40140000, 39972, PROT_NONE) = 0
145 mmap(0x40140000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 4, 0x119000) = 0x40140000
145 mmap(0x40146000, 15396, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40146000
145 close(4) = 0
145 munmap(0x40016000, 62282) = 0
145 brk(0) = 0x8057840
145 brk(0x8057860) = 0x8057860
145 brk(0x8058000) = 0x8058000
145 open("/share/locale/locale.alias", O_RDONLY) = 4
145 SYS_197(0x4, 0xbfffb414, 0x40145a60, 0x4014942c, 0x4) = 0
145 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40016000
145 read(4, "# Locale name alias data base.\n#"..., 4096) = 2601
145 brk(0x8059000) = 0x8059000
145 read(4, "", 4096) = 0
145 close(4) = 0
145 munmap(0x40016000, 4096) = 0
145 open("/lib/locale/de_DE/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT
(No such file or directory)
145 open("/lib/locale/de/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No
such file or directory)
145 open("/dev/null", O_RDWR|O_LARGEFILE) = 4
145 close(4) = 0
145 SYS_199(0x40144d40, 0x2, 0x40145a60, 0x40143490, 0xbffff898) =1001
145 semop(0x40144d40, 0x2, 0x40145a60, 0x40143490) = 0
145 SYS_196(0x8053c40, 0xbffff79c, 0x40145a60, 0x4014942c, 0x8053c40)
= 0
145 brk(0x805b000) = 0x805b000
145 readlink("/cdrom", 0xbfffe7dc, 4095) = -1 EINVAL (Invalid
argument)
145 open("/etc/fstab", O_RDONLY|O_LARGEFILE) = 4
145 SYS_197(0x4, 0xbffff588, 0x40145a60, 0x4014942c, 0x4) = 0
145 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40016000
145 read(4, "/dev/hda2 /boot "..., 4096) = 1702
145 read(4, "", 4096) = 0
145 close(4) = 0
145 munmap(0x40016000, 4096) = 0
145 SYS_195(0xbffff670, 0xbffff610, 0x40145a60, 0x4014942c,0xbffff670) = -1 ENOENT (No such file or directory)
145 rt_sigprocmask(SIG_BLOCK, ~[TRAP SEGV], NULL, 8) = 0
145 SYS_195(0x8059bb8, 0xbfffe3b0, 0x40145a60, 0x4014942c, 0x8059bb8)
= 0
145 open("/dev/sr1", O_RDONLY|O_LARGEFILE) = 4
145 _llseek(4, 1024, [1024], SEEK_SET) = 0
145 read(4,"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 228) = 228
145 _llseek(4, 65536, [65536], SEEK_SET) = 0
145 read(4,
"~\0\301\360\0\0\0\0\360\301K\7\t\0\0\t\7Ke\5\20\2\25;\10"..., 228) = 228
145 _llseek(4, 8192, [8192], SEEK_SET) = 0
145 read(4,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 228) = 228
145 _llseek(4, 0, [0], SEEK_SET) = 0
145 read(4,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 576) = 576
145 _llseek(4, 8192, [8192], SEEK_SET) = 0
145 read(4,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1376) = 1376
145 _llseek(4, 32768, [32768], SEEK_SET) = 0
145 read(4, "\1CD001\1\0LINUX "..., 2048) = 2048
145 close(4) = 0
145 mount("/dev/sr1", "/cdrom", "iso9660",MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC|0xc0ed0000, 0x8059c18
sorry, but I couldn't get any more output.
Regards,
Andreas Hartmann
Alan, please apply. sync_dev() in ->release() is 100% bogus - all flushing the stuff out is done by callers (blkdev_close() et.al.).
drivers/scsi/sr.c +0 -1
@@ -101,7 +101,6 @@ {if (scsi_CDs[MINOR (cdi->dev)].device->sector_size >2048 )sr_set_blocklength (MINOR (cdi->dev),2048 ); -sync_dev (cdi->dev); scsi_CDs[MINOR (cdi->dev)].device->access_count--;if (scsi_CDs[MINOR (cdi->dev)].device->host->hostt->module)__MOD_DEC_USE_COUNT (scsi_CDs[MINOR (cdi->dev)].device->host->hostt->module);
Quoted 3 lines · Alexander Viro
Alan, please apply.
sync_dev()in ->release() is 100% bogus - all flushing the stuff out is done by callers (blkdev_close()et.al.).
[...]
It's working fine in 2.4.8ac8 :-) .
Thank you very much!
Regards,
Andreas Hartmann
On a plain vanilla 2.4.7 using ide-scsi driver it works okay on the double mount, and returns device busy. It will however segfault if you try to mount scd0 with no media in the drive.
Cordially,
Mike Hobgood
Quoted 24 lines · Alexander Viro
Quoted 5 lines · Alan Cox
Quoted 5 lines
Quoted 3 lines
(as modules) and you do the same mount again on the same (not unmounted) device, the mount-programm hangs up and never comes back. It doesn't recognize, that the device is allready mounted.
strace, please. -ac5 and 2.4.9 have the same code in
fs/super.c, soAha. They actually don't (sorry - I was thinking of 2.4.7-ac5), but...
Quoted 4 lines
Quoted 1 line
I really wonder what the hell is happening...
Duplicated here with 2.4.8-ac6
Booted with ide-scsi as the cd driverI can't reproduce it with
/dev/hdaand/dev/hdd(ide-disk and ide-cd resp.) here. I'll build kernel with ide-scsi and see what's going on with that.-
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/