Re: netfs allows multiple identical mounts (was: smb/mount

Petr Vandrovec (VANDROVE@vc.cvut.cz)
Wed, 8 Aug 2001 14:00:10 MET-1


On 8 Aug 01 at 1:20, Urban Widmark wrote:
> On Mon, 6 Aug 2001, Dan Podeanu wrote:
> > This should be self explanatory. My guess is, its probably the smb
> > filesystem reporting as mounting again a share after network failure.
>
> A very simple way to reproduce this (on 2.4.7):
>
> $ mount -t smbfs -o username=puw //srv/share /mnt/smb
> $ mount -t smbfs -o username=puw //srv/share /mnt/smb
> $ cat /proc/mounts | grep smbfs
> //srv/share /mnt/smb smbfs rw 0 0
> //srv/share /mnt/smb smbfs rw 0 0
>
> This is probably something that smbmount could check before mounting.
> But I'm not sure if that is the best fix.

For sure it is, as doing

mount -t smbfs -o username=a //srv/share /mnt/smb
mount -t smbfs -o username=b //srv/share /mnt/smb

looks quite legal to me, as both //srv/share can display completely
different set of files, and nobody except smbfs knows that username=a/
username=b matters, but fmode=700/fmode=755 does not...

> It could compare the server string ("//srv/share") but what if that server
> listens to more than one name?

ncpfs (mount.ncp) will warn you if //srv/share is listed anywhere in
/etc/mtab and it is mounted by you. If you'll use '-o multiple', then
it is assumed that you know what you are doing, and nothing prevents you
from mounting same thing on same place 255 times.
Best regards,
Petr Vandrovec
vandrove@vc.cvut.cz

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