archive mirror
 help / color / mirror / Atom feed
From: Richard Weinberger <>
Cc:,,,,,,,,,,,, Richard Weinberger <>
Subject: [PATCH 0/3] NFS: NFSD: Allow crossing mounts when re-exporting
Date: Thu, 17 Nov 2022 20:11:48 +0100	[thread overview]
Message-ID: <> (raw)

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.


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      | 2 +-
 fs/nfs/export.c | 2 +-
 fs/nfsd/vfs.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)


             reply	other threads:[~2022-11-17 19:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17 19:11 Richard Weinberger [this message]
2022-11-17 19:11 ` [PATCH 1/3] NFSD: Teach nfsd_mountpoint() auto mounts Richard Weinberger
2022-11-17 19:11 ` [PATCH 2/3] fs: namei: Allow follow_down() to uncover " Richard Weinberger
2022-11-17 21:01   ` Jeff Layton
2022-11-17 21:12     ` Richard Weinberger
2022-11-17 21:42       ` Jeff Layton
2022-11-27 21:29         ` Richard Weinberger
2022-11-28 11:49           ` Jeff Layton
2022-11-17 23:37     ` Ian Kent
2022-11-17 19:11 ` [PATCH 3/3] NFS: nfs_encode_fh: Remove S_AUTOMOUNT check Richard Weinberger

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* 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).