Subject: Re: multiple mounts on same directory
To: None <tech-userlevel@netbsd.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-userlevel
Date: 07/18/2003 19:19:47
On Fri, 18 Jul 2003, Bill Studenmund wrote:
> I think it's perfectly fine to just have the code in mount know that for
> mfs mount (and mfs mounts _only_), f_mntfromname doesn't matter for
> differences.
>
> The reason that "union" is special is that if you mount with the -b
> option, then the f_mntfromname will get changed. As I recall, it'll become
> "<below>:" in front of the name. So the matching code would also need to
> synthesize a new union f_mntfromname. But once it's done that, it will
> match perfectly well.
The special cases that I know about so far are:
fstype original name f_mntfromname
------ ------------- -------------
mfs anything mfs:123
kernfs anything kernfs
procfs anything procfs
union /some/dir <above>:/some/dir
union /some/dir <below>:/some/dir
Is it OK to hard-code knowledge of these special cases in the duplicate
detection part of "mount -a"? The normal case would then be that
f_mntfromname would have to be an exact match before a potential mount
would be detected as a duplicate.
--apb (Alan Barrett)