All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@kernel.org>
To: NeilBrown <neilb@suse.de>
Cc: Jeff Layton <jlayton@kernel.org>,
	Christoph Hellwig <hch@infradead.org>,
	linux-nfs@vger.kernel.org, Chuck Lever <chuck.lever@oracle.com>,
	Trond Myklebust <trondmy@hammerspace.com>,
	snitzer@hammerspace.com
Subject: Re: [PATCH v5 00/19] nfs/nfsd: add support for localio
Date: Wed, 19 Jun 2024 18:46:32 -0400	[thread overview]
Message-ID: <ZnNfyNkzOcoVnHL5@kernel.org> (raw)
In-Reply-To: <171883136311.14261.10658469664795186377@noble.neil.brown.name>

On Thu, Jun 20, 2024 at 07:09:23AM +1000, NeilBrown wrote:
> On Wed, 19 Jun 2024, Jeff Layton wrote:
> > On Wed, 2024-06-19 at 17:10 +1000, NeilBrown wrote:
> > > On Wed, 19 Jun 2024, Christoph Hellwig wrote:
> > > > What happened to the requirement that all protocol extensions added
> > > > to Linux need to be standardized in IETF RFCs?
> > > > 
> > > > 
> > > 
> > > Is that requirement documented somewhere?  Not that I doubt it, but it
> > > would be nice to know where it is explicit.  I couldn't quickly find
> > > anything in Documentation/
> > > 
> > > Can we get by without the LOCALIO protocol?
> > > 
> > > For NFSv4.1 we could use the server_owner4 returned by EXCHANGE_ID.  It
> > > is explicitly documented as being usable to determine if two servers are
> > > the same.
> > > 
> > > For NFSv4.0 ... I don't think we should encourage that to be used.
> > > 
> > > For NFSv3 it is harder.  I'm not as ready to deprecate it as I am for
> > > 4.0.  There is nothing in NFSv3 or MOUNT or NLM that is comparable to
> > > server_owner4.  If krb5 was used there would probably be a server
> > > identity in there that could be used.
> > > I think the server could theoretically return an AUTH_SYS verifier in
> > > each RPC reply and that could be used to identify the server.  I'm not
> > > sure that is a good idea though.
> > > 
> > 
> > My idea for v3 was that the localio client could do an O_TMPFILE create
> > on the exported fs and write some random junk to it (a uuid or
> > something). Construct the filehandle for that and then the client could
> > try to issue a READ for that filehandle via the NFS server. If it finds
> > that filehandle and the contents are correct then you're on the same
> > host. Then you just close the file and it should clean itself up.
> 
> I can't see how this would work, but maybe I don't have a good enough
> imagination.
> 
> The high-level view of the proposed protocol is:
>   - client asks remote server to identify itself.
>   - server returns an identity
>   - client uses local-sideband to ask each local server if it has the
>     given identity.
> 
> I don't see where an O_TMPFILE could fit into this, or how a different
> high-level approach would be any better.
> 
> For NFSv3 the client could ask with a new Program or Version or
> Procedure, or all three.  Or it could ask with a new file-handle or path
> name.  I imagine using a webnfs (rfc2054) multi-component lookup on the
> public filehandle for "/linux/config/server-id" and getting back a
> filehandle which encodes the server ID somehow.  All these seem credible
> options and it is not clear than any one is better than any other.
> 
> For NFSv4.1 I think that LOCALIO looks a lot like trunking and so using
> exactly the same mechanism to determine if two servers are the same is a
> good idea.
> But then LOCALIO also looks a lot like a new pNFS/DS protocol so maybe
> we should specify that protocol and use GETDEVICELIST or GETDEVICEINFO
> to find the identity of the server.

Easy enough to switch the RPC call used.  If either GETDEVICELIST or
GETDEVICEINFO can convey a UUID it sounds fine to me.  But for v4
EXCHANGE_ID already exists.

> > This is a little less straightforward and efficient than the localio
> > protocol that Mike is proposing, but requires no protocol extensions.
> 
> I think that if we use anything other than the server-id in the
> EXCHANGE_ID response, then we are defining a new protocol as it is a new
> request which we expect existing servers to ignore or fail, even though
> they have never been tested to ignore/fail that particular request.
> 
> Of all the options I would guess that a new version for an existing
> protocol would be safest as that is the most likely to have been tested.
> A new RPC program is probably conceptually simplest.  A little hack in
> LOOKUPv3 to detect the public filehandle etc is probably the easiest to
> code, and a new pnfs/ds protocol is probably the cleanest overall
> except that it doesn't support NFSv3.

NFSv3 support is pretty important. So when faced with no options for
v3, I decided to implement LOCALIO (with Trond's encouragement) and
just have both NFS versions use it.

I _can_ frame the v4 support in terms of EXCHANGE_ID (and have already
implemented it before writing LOCALIO, patches aren't on the internet
but I can unearth that work if needed).  But I'd still maintain the
nfsd_uuids list, and have nfs_localio's nfsd_uuid_is_local() lookup
the UUID that was embedded in the v4 EXCHANGE_ID payload...

But yes, we'd still need LOCALIO's GETUUID rpc for v3.  So EXCHANGE_ID
really doesn't buy much (because we'd still need an IANA registered
rpc program number).

> My purpose in all this is not to replace Mike's LOCALIO protocol, but to
> explore the solution space to ensure there is nothing that is obviously
> better.  As yet, I don't think there is.

Thanks, I really appreciate your professionalism and attention to
detail.  Pleasure working with you again Neil!

Mike

  parent reply	other threads:[~2024-06-19 22:46 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 20:19 [PATCH v5 00/19] nfs/nfsd: add support for localio Mike Snitzer
2024-06-18 20:19 ` [PATCH v5 01/19] nfs: pass nfs_client to nfs_initiate_pgio Mike Snitzer
2024-06-18 20:19 ` [PATCH v5 02/19] nfs: pass descriptor thru nfs_initiate_pgio path Mike Snitzer
2024-06-18 20:19 ` [PATCH v5 03/19] nfs: pass struct file to nfs_init_pgio and nfs_init_commit Mike Snitzer
2024-06-18 20:19 ` [PATCH v5 04/19] sunrpc: add rpcauth_map_to_svc_cred_local Mike Snitzer
2024-06-18 20:19 ` [PATCH v5 05/19] nfs_common: add NFS LOCALIO protocol extension enablement Mike Snitzer
2024-06-19  5:04   ` NeilBrown
2024-06-18 20:19 ` [PATCH v5 06/19] nfs/nfsd: add "localio" support Mike Snitzer
2024-06-18 21:28   ` Jeff Layton
2024-06-18 20:19 ` [PATCH v5 07/19] NFS: Enable localio for non-pNFS I/O Mike Snitzer
2024-06-18 20:19 ` [PATCH v5 08/19] pnfs/flexfiles: Enable localio for flexfiles I/O Mike Snitzer
2024-06-18 20:19 ` [PATCH v5 09/19] nfs: implement v3 and v4 client support for NFS_LOCALIO_PROGRAM Mike Snitzer
2024-06-19  5:30   ` NeilBrown
2024-06-19 13:18     ` Chuck Lever III
2024-06-18 20:19 ` [PATCH v5 10/19] nfsd: implement v3 and v4 server " Mike Snitzer
2024-06-18 20:19 ` [PATCH v5 11/19] nfs/nfsd: consolidate {encode,decode}_opaque_fixed in nfs_xdr.h Mike Snitzer
2024-06-18 20:19 ` [PATCH v5 12/19] nfs/localio: move managing nfsd_open_local_fh symbol to nfs_common Mike Snitzer
2024-06-18 21:32   ` Jeff Layton
2024-06-18 20:19 ` [PATCH v5 13/19] nfs/nfsd: ensure localio server always uses its network namespace Mike Snitzer
2024-06-18 21:36   ` Jeff Layton
2024-06-18 20:19 ` [PATCH v5 14/19] nfsd/localio: manage netns reference in nfsd_open_local_fh Mike Snitzer
2024-06-18 20:19 ` [PATCH v5 15/19] nfsd: prepare to use SRCU to dereference nn->nfsd_serv Mike Snitzer
2024-06-18 20:19 ` [PATCH v5 16/19] nfsd: " Mike Snitzer
2024-06-19 12:39   ` Jeff Layton
2024-06-19 17:26     ` Mike Snitzer
2024-06-18 20:19 ` [PATCH v5 17/19] nfsd/localio: use SRCU to dereference nn->nfsd_serv in nfsd_open_local_fh Mike Snitzer
2024-06-18 20:19 ` [PATCH v5 18/19] nfs/localio: use dedicated workqueues for filesystem read and write Mike Snitzer
2024-06-18 20:19 ` [PATCH v5 19/19] nfs: add Documentation/filesystems/nfs/localio.rst Mike Snitzer
2024-06-18 21:46   ` Chuck Lever
2024-06-19  5:47     ` NeilBrown
2024-06-19 18:27       ` Mike Snitzer
2024-06-19  5:49 ` [PATCH v5 00/19] nfs/nfsd: add support for localio Christoph Hellwig
2024-06-19  7:10   ` NeilBrown
2024-06-19  7:15     ` Christoph Hellwig
2024-06-19 10:09     ` Jeff Layton
2024-06-19 21:09       ` NeilBrown
2024-06-19 22:28         ` Jeff Layton
2024-06-19 22:46         ` Mike Snitzer [this message]
2024-06-20  5:16         ` Christoph Hellwig
2024-06-19 17:57     ` Mike Snitzer
2024-06-19 18:04       ` Chuck Lever III
2024-06-19 18:13         ` Mike Snitzer
2024-06-19 18:22           ` Chuck Lever III
2024-06-20  5:18       ` Christoph Hellwig
2024-06-19 14:02   ` Trond Myklebust

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=ZnNfyNkzOcoVnHL5@kernel.org \
    --to=snitzer@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=hch@infradead.org \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=snitzer@hammerspace.com \
    --cc=trondmy@hammerspace.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.