linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.4.8-ac5 and earlier] fatal mount-problem
@ 2001-08-20  9:37 Andreas Hartmann
  2001-08-20 10:03 ` Alexander Viro
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Hartmann @ 2001-08-20  9:37 UTC (permalink / raw)
  To: Kernel-Mailingliste

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.

> mount --version
mount: mount-2.11h


Regards,
Andreas Hartmann

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.4.8-ac5 and earlier] fatal mount-problem
  2001-08-20  9:37 [2.4.8-ac5 and earlier] fatal mount-problem Andreas Hartmann
@ 2001-08-20 10:03 ` Alexander Viro
  2001-08-20 11:30   ` Alan Cox
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Viro @ 2001-08-20 10:03 UTC (permalink / raw)
  To: Andreas Hartmann; +Cc: Kernel-Mailingliste



On Mon, 20 Aug 2001, Andreas Hartmann wrote:

> 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...


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.4.8-ac5 and earlier] fatal mount-problem
  2001-08-20 10:03 ` Alexander Viro
@ 2001-08-20 11:30   ` Alan Cox
  2001-08-20 11:42     ` Alexander Viro
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2001-08-20 11:30 UTC (permalink / raw)
  To: Alexander Viro; +Cc: Andreas Hartmann, Kernel-Mailingliste

> > (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)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.4.8-ac5 and earlier] fatal mount-problem
  2001-08-20 11:30   ` Alan Cox
@ 2001-08-20 11:42     ` Alexander Viro
  2001-08-20 12:30       ` Andreas Hartmann
  2001-08-20 22:07       ` mhobgood
  0 siblings, 2 replies; 8+ messages in thread
From: Alexander Viro @ 2001-08-20 11:42 UTC (permalink / raw)
  To: Alan Cox; +Cc: Andreas Hartmann, Kernel-Mailingliste



On Mon, 20 Aug 2001, Alan Cox wrote:

> > > (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...
> > 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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.4.8-ac5 and earlier] fatal mount-problem
  2001-08-20 11:42     ` Alexander Viro
@ 2001-08-20 12:30       ` Andreas Hartmann
  2001-08-20 13:35         ` [Fix] " Alexander Viro
  2001-08-20 22:07       ` mhobgood
  1 sibling, 1 reply; 8+ messages in thread
From: Andreas Hartmann @ 2001-08-20 12:30 UTC (permalink / raw)
  To: Alexander Viro; +Cc: Alan Cox, Kernel-Mailingliste

Alexander Viro wrote:
> 
> On Mon, 20 Aug 2001, Alan Cox wrote:
> 
> > > > (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...
> > > 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.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Fix] Re: [2.4.8-ac5 and earlier] fatal mount-problem
  2001-08-20 12:30       ` Andreas Hartmann
@ 2001-08-20 13:35         ` Alexander Viro
  2001-08-21 17:07           ` Andreas Hartmann
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Viro @ 2001-08-20 13:35 UTC (permalink / raw)
  To: Andreas Hartmann; +Cc: Alan Cox, Kernel-Mailingliste

Alan, please apply. sync_dev() in ->release() is 100% bogus - all flushing
the stuff out is done by callers (blkdev_close() et.al.).

--- AC8-7/drivers/scsi/sr.c	Sun Jul 29 01:54:47 2001
+++ linux/drivers/scsi/sr.c	Mon Aug 20 09:25:39 2001
@@ -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);



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.4.8-ac5 and earlier] fatal mount-problem
  2001-08-20 11:42     ` Alexander Viro
  2001-08-20 12:30       ` Andreas Hartmann
@ 2001-08-20 22:07       ` mhobgood
  1 sibling, 0 replies; 8+ messages in thread
From: mhobgood @ 2001-08-20 22:07 UTC (permalink / raw)
  To: linux-kernel

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


On Mon, Aug 20, 2001 at 07:42:24AM -0400, Alexander Viro wrote:
> 
> 
> On Mon, 20 Aug 2001, Alan Cox wrote:
> 
> > > > (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...
> > > 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.
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Fix] Re: [2.4.8-ac5 and earlier] fatal mount-problem
  2001-08-20 13:35         ` [Fix] " Alexander Viro
@ 2001-08-21 17:07           ` Andreas Hartmann
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas Hartmann @ 2001-08-21 17:07 UTC (permalink / raw)
  To: Alexander Viro; +Cc: Kernel-Mailingliste

Alexander Viro wrote:
> 
> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-08-21 17:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-20  9:37 [2.4.8-ac5 and earlier] fatal mount-problem Andreas Hartmann
2001-08-20 10:03 ` Alexander Viro
2001-08-20 11:30   ` Alan Cox
2001-08-20 11:42     ` Alexander Viro
2001-08-20 12:30       ` Andreas Hartmann
2001-08-20 13:35         ` [Fix] " Alexander Viro
2001-08-21 17:07           ` Andreas Hartmann
2001-08-20 22:07       ` mhobgood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).