kern/162591: [nullfs] cross-filesystem nullfs does not work as
expected
Gleb Kurtsou
gleb.kurtsou at gmail.com
Mon Nov 21 15:00:31 UTC 2011
The following reply was made to PR kern/162591; it has been noted by GNATS.
From: Gleb Kurtsou <gleb.kurtsou at gmail.com>
To: bug-followup at FreeBSD.org, mw at wzff.de
Cc:
Subject: Re: kern/162591: [nullfs] cross-filesystem nullfs does not work as
expected
Date: Mon, 21 Nov 2011 16:23:47 +0200
That is expected behaviour, according to mount_nullfs(8):
The mount_nullfs utility creates a null layer, duplicating a
sub-tree of the file system name space under another part of the
global file system namespace.
It mentions sub-tree of a single file system only. nullfs is technically
very different from loop mounts in Linux or nullfs in DragonFly, it
doesn't map part of file name space elsewhere, but duplicates file
system sub-tree.
Messing with v_mountedhere in nullfs would bring much more trouble than
it can potentially solve: VFS_VGET(), full path lookups, etc. We could
add mount option to automatically nullfs-mount nested mounts, but it
also feels overcomplicated: unmounting may be difficult, should we track
new mounts, etc. Mounting nullfs over nullfs is a very bad idea imo (it
it's not forbidden, I'd also suggest not to NFS export nullfs).
I think writing a small script to do nested mounts/unmounts that suites
your needs would be the best option here.
More information about the freebsd-fs
mailing list