Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Dec 2021 22:22:44 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Luoqi Chen <luoqi.chen@gmail.com>
Cc:        freebsd-fs <freebsd-fs@freebsd.org>
Subject:   Re: nullfs traversing mount points (with working code)
Message-ID:  <YbEUFJk9rXitOhbk@kib.kiev.ua>
In-Reply-To: <CAHJqQjt=5JVBomYfQbaXce68iN9Dxacww8qsGNqAtbn=vH7Tqg@mail.gmail.com>
References:  <CAHJqQjt=5JVBomYfQbaXce68iN9Dxacww8qsGNqAtbn=vH7Tqg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 06, 2021 at 10:31:28PM -0800, Luoqi Chen wrote:
> Hi,
> 
> Recently I had the need to access nfs automounts (for example /net) from
> within jails, I searched everywhere but couldn't find any suitable
> solution. It seems we still don't support mount point traversal in nullfs,
> even though many people have asked for it. I had no choice so I spent a bit
> of time adding the support myself, which worked satisfactorily for my own
> purpose. I wonder if anyone's interested in taking the code, polishing it
> and eventually checking it in. The patch against 13.0-RELENG is at
> https://people.freebsd.org/~luoqi/nullxmnt.diff

Let's put a note about wanting this feature aside.
It is not just polishing, the code is mostly wrong.

>From a very quick look, it breaks a lot of VFS expectations from a filesystem.

For instance, nullfs inherits some behavior flags from the lower fs, which
is no longer true with your patch, like mnt_kern_flags initialization in
nullfs_mount().

A look at the update to the null_lookup() indicates that you are busying
some filesystem while owning some other vnode lock.

I suspect that after this update, null_lookup() might call VOP_LOOKUP()
for dotdot on rootvp for some mountpoint.

At this point I stopped looking.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YbEUFJk9rXitOhbk>