2001-07-26 23:27:27

by J.A. Magallon

[permalink] [raw]
Subject: mount-2.11e bug ?

Hello...

Can anybody tell me if there was a bug in mount from util-linux-2.11e that could
do things like this with new kernels:

/etc/fstab:
...
tmpfs /dev/shm tmpfs defaults,size=128M 0 0
...

werewolf:~/soft/util/util-linux-2.11e/mount# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/sda1 248895 83086 152959 36% /
/dev/sda2 3099292 2092872 848984 72% /usr
/dev/sda3 4095488 1603796 2283652 42% /home
/dev/sda5 1027768 8 975552 1% /toast
/home/soft/util/util-linux-2.11e/mount/tmpfs
131072 0 131072 0% /dev/shm

2.11h works ok.

TIA.

--
J.A. Magallon # Let the source be with you...
mailto:[email protected]
Mandrake Linux release 8.1 (Cooker) for i586
Linux werewolf 2.4.7-ac1 #1 SMP Thu Jul 26 19:53:39 CEST 2001 i686


2001-07-27 09:54:00

by Guest section DW

[permalink] [raw]
Subject: Re: mount-2.11e bug ?

On Fri, Jul 27, 2001 at 01:31:38AM +0200, J . A . Magallon wrote:

> Can anybody tell me if there was a bug in mount from util-linux-2.11e that could
> do things like this with new kernels:
>
> /etc/fstab:
> ...
> tmpfs /dev/shm tmpfs defaults,size=128M 0 0
> ...
>
> werewolf:~/soft/util/util-linux-2.11e/mount# df
> Filesystem 1k-blocks Used Available Use% Mounted on
> /dev/sda1 248895 83086 152959 36% /
> /dev/sda2 3099292 2092872 848984 72% /usr
> /dev/sda3 4095488 1603796 2283652 42% /home
> /dev/sda5 1027768 8 975552 1% /toast
> /home/soft/util/util-linux-2.11e/mount/tmpfs
> 131072 0 131072 0% /dev/shm
>
> 2.11h works ok.

Yes, there was.

Mount does a canonicalize() on the path names of device and mount point.
Thus, tmpfs when your current directory is ~/soft/util/util-linux-2.11e/mount
becomes /home/soft/util/util-linux-2.11e/mount/tmpfs.

However, this only happens when the thus obtained pathname points at an
actual file. In a few mount versions the realpath() routine also did this
when there is no such file.

Andries