| From: |
| Amir Goldstein <amir73il-AT-gmail.com> |
| To: |
| Jeff Layton <jlayton-AT-kernel.org> |
| Subject: |
| [RFC PATCH 0/2] API for exporting connectable file handles to userspace |
| Date: |
| Thu, 19 Sep 2024 16:06:09 +0200 |
| Message-ID: |
| <20240919140611.1771651-1-amir73il@gmail.com> |
| Cc: |
| Christian Brauner <brauner-AT-kernel.org>, Aleksa Sarai <cyphar-AT-cyphar.com>, Chuck Lever <chuck.lever-AT-oracle.com>, linux-fsdevel-AT-vger.kernel.org, linux-nfs-AT-vger.kernel.org |
| Archive-link: |
| Article |
Jeff,
These patches bring the NFS connectable file handles feature to
userspace servers.
They rely on Christian's and Aleksa's changes recently merged to v6.12.
It may not be the best timing for posting RFC patches in the middle of
the merge window and during LPC, but at least this gives you a chance to
gossip about how bad an idea this is with folks ;)
I am aware of the usability implications with connectable file handles,
which are not consistent throughout the inode lifetime (i.e. when moved
to another parent), but the nfsd feature does exists and some users (me)
are interested in exporting this feature to userspace.
The API I chose for encoding conenctable file handles is pretty
conventional (AT_HANDLE_CONNECTABLE).
The API I chose for decoding a connected fd is a bit whacky, but if
you let it sink, it could make sense - my use case is to examine an
object's current path given a previously connectable encoded file handle.
By requesting to open an O_PATH fd, relative to an O_PATH mount_fd,
I would like to get an error (ESTALE) if the path connecting mount_fd
to the would-be-opened fd is unknown.
Thought and flames are welcome.
Thanks,
Amir.
Amir Goldstein (2):
fs: name_to_handle_at() support for connectable file handles
fs: open_by_handle_at() support for decoding connectable file handles
fs/fhandle.c | 85 +++++++++++++++++++++++++-------------
include/uapi/linux/fcntl.h | 1 +
2 files changed, 58 insertions(+), 28 deletions(-)
--
2.34.1