linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Jeff Layton <jlayton@kernel.org>,
	Richard Weinberger <richard@nod.at>,
	linux-nfs@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	chuck.lever@oracle.com, anna@kernel.org,
	trond.myklebust@hammerspace.com, viro@zeniv.linux.org.uk,
	chris.chilvers@appsbroker.com, david.young@appsbroker.com,
	luis.turcitu@appsbroker.com, david@sigma-star.at,
	benmaynard@google.com
Subject: Re: [PATCH 0/3 v2] NFS: NFSD: Allow crossing mounts when re-exporting
Date: Tue, 13 Dec 2022 17:09:10 +0800	[thread overview]
Message-ID: <8967d08f-712c-5b64-efdc-4426e2b9d63a@themaw.net> (raw)
In-Reply-To: <2de81c537335da895bafcd9f50a239c439fb0439.camel@kernel.org>

On 13/12/22 01:06, Jeff Layton wrote:
> On Wed, 2022-12-07 at 09:43 +0100, Richard Weinberger wrote:
>> Currently when re-exporting a NFS share the NFS cross mount feature does
>> not work [0].
>> This patch series outlines an approach to address the problem.
>>
>> Crossing mounts does not work for two reasons:
>>
>> 1. As soon the NFS client (on the re-exporting server) sees a different
>> filesystem id, it installs an automount. That way the other filesystem
>> will be mounted automatically when someone enters the directory.
>> But the cross mount logic of KNFS does not know about automount.
>> This patch series addresses the problem and teach both KNFSD
>> and the exportfs logic of NFS to deal with automount.
>>
>> 2. When KNFSD detects crossing of a mount point, it asks rpc.mountd to install
>> a new export for the target mount point. Beside of authentication rpc.mountd
>> also has to find a filesystem id for the new export. Is the to be exported
>> filesystem a NFS share, rpc.mountd cannot derive a filesystem id from it and
>> refuses to export. In the logs you'll see errors such as:
>>
>> mountd: Cannot export /srv/nfs/vol0, possibly unsupported filesystem or fsid= required
>>
>> To deal with that I've changed rpc.mountd to use generate and store fsids [1].
>> Since the kernel side of my changes did change for a long time I decided to
>> try upstreaming it first.
>> A 3rd iteration of my rpc.mountd will happen soon.
>>
>> [0] https://marc.info/?l=linux-nfs&m=161653016627277&w=2
>> [1] https://lore.kernel.org/linux-nfs/20220217131531.2890-1-richard@nod.at/
>>
>> Changes since v1:
>> https://lore.kernel.org/linux-nfs/20221117191151.14262-1-richard@nod.at/
>>
>> - Use LOOKUP_AUTOMOUNT only when NFSEXP_CROSSMOUNT is set (Jeff Layton)
>>
>> Richard Weinberger (3):
>>    NFSD: Teach nfsd_mountpoint() auto mounts
>>    fs: namei: Allow follow_down() to uncover auto mounts
>>    NFS: nfs_encode_fh: Remove S_AUTOMOUNT check
>>
>>   fs/namei.c            | 6 +++---
>>   fs/nfs/export.c       | 2 +-
>>   fs/nfsd/vfs.c         | 8 ++++++--
>>   include/linux/namei.h | 2 +-
>>   4 files changed, 11 insertions(+), 7 deletions(-)
>>
> This set looks reasonable to me.
>
> Reviewed-by: Jeff Layton <jlayton@kernel.org>

Right, looks ok to me too, at least from the POV of that follow_down()

change.


Reviewed-by: Ian Kent <raven@themaw.net>


Ian


      reply	other threads:[~2022-12-13  9:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07  8:43 [PATCH 0/3 v2] NFS: NFSD: Allow crossing mounts when re-exporting Richard Weinberger
2022-12-07  8:43 ` [PATCH 1/3] NFSD: Teach nfsd_mountpoint() auto mounts Richard Weinberger
2022-12-07  8:43 ` [PATCH 2/3] fs: namei: Allow follow_down() to uncover " Richard Weinberger
2022-12-14 15:15   ` [PATCH 2/3] " Chuck Lever III
2023-01-03 16:15   ` Chuck Lever III
2023-01-29 15:42     ` Richard Weinberger
2023-01-30  2:15       ` Al Viro
2022-12-07  8:43 ` [PATCH 3/3] NFS: nfs_encode_fh: Remove S_AUTOMOUNT check Richard Weinberger
2022-12-14 15:09   ` Chuck Lever III
2022-12-14 16:37     ` Anna Schumaker
2022-12-14 16:39       ` Chuck Lever III
2022-12-10 16:09 ` [PATCH 0/3 v2] NFS: NFSD: Allow crossing mounts when re-exporting Chuck Lever III
2022-12-10 21:52   ` Richard Weinberger
2022-12-10 21:53     ` Chuck Lever III
2022-12-12 17:06 ` Jeff Layton
2022-12-13  9:09   ` Ian Kent [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8967d08f-712c-5b64-efdc-4426e2b9d63a@themaw.net \
    --to=raven@themaw.net \
    --cc=anna@kernel.org \
    --cc=benmaynard@google.com \
    --cc=chris.chilvers@appsbroker.com \
    --cc=chuck.lever@oracle.com \
    --cc=david.young@appsbroker.com \
    --cc=david@sigma-star.at \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=luis.turcitu@appsbroker.com \
    --cc=richard@nod.at \
    --cc=trond.myklebust@hammerspace.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).