public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "bfields@fieldses.org" <bfields@fieldses.org>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"aglo@umich.edu" <aglo@umich.edu>,
	"bcodding@redhat.com" <bcodding@redhat.com>,
	"chuck.lever@oracle.com" <chuck.lever@oracle.com>
Subject: Re: unsharing tcp connections from different NFS mounts
Date: Wed, 7 Oct 2020 17:29:26 +0000	[thread overview]
Message-ID: <5998d49f790736aa49e7a2ac89b555bc99f3b543.camel@hammerspace.com> (raw)
In-Reply-To: <20201007171559.GF23452@fieldses.org>

On Wed, 2020-10-07 at 13:15 -0400, Bruce Fields wrote:
> On Wed, Oct 07, 2020 at 12:44:42PM -0400, Trond Myklebust wrote:
> > The problem that all locks etc are tied to the lease, so if you
> > change
> > the clientid (and hence change the lease) then you need to ensure
> > that
> > the client knows to which lease the locks belong, that it is able
> > to
> > respond appropriately to all delegation recalls, layout recalls,
> > ...
> > etc.
> 
> Looks to me like cl_owner_id never actually changes over the lifetime
> of
> a mount even if you change nfs4_unique_id.

It never changes over the lifetime of the nfs_client. If it did, we'd
be inviting fun scenarios in which we end up conflicting with ourself
over locks etc.

> 
> > This need to track things on a per-lease basis is why we have the
> > struct nfs_client. Things that are tracked on a per-superblock
> > basis
> > are tracked by the struct nfs_server.
> > 
> > However all this is moot as long as nobody can explain why we'd
> > want to
> > do all this.
> > 
> > As far as I can tell, this thread started with a complaint that
> > performance suffers when we don't allow setups that hack the client
> > by
> > pretending that a multi-homed server is actually multiple different
> > servers.
> 
> Yeah, honestly I don't understand the details of that case either.
> 
> (There is one related thing I'm curious about, which is how close we
> are
> to keeping clients in different containers completely separate (which
> we'd need, for example, if we were to ever permit unprivileged nfs
> mounts).  It looks to me like as long as two network namespaces use
> different client identifiers, the client should keep different state
> for
> them already?  Or is there more to do there?)

The containerised use case should already work. The containers have
their own private uniquifiers, which can be changed
via /sys/fs/nfs/net/nfs_client/identifier.

In fact, there is also a udev trigger for that pseudofile, so my plan
is (in my copious spare time) to write a /usr/lib/udev/nfs-set-
identifier helper in order to manage the container uniquifier, to allow
generation on the fly and persistence.

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com



  reply	other threads:[~2020-10-07 17:29 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06 15:13 unsharing tcp connections from different NFS mounts J. Bruce Fields
2020-10-06 15:20 ` Chuck Lever
2020-10-06 15:22   ` Bruce Fields
2020-10-06 17:07     ` Tom Talpey
2020-10-06 19:30       ` Bruce Fields
     [not found]         ` <CAGrwUG5_KeRVR8chcA8=3FSeii2+4c8FbuE=CSGAtYVYqV4kLg@mail.gmail.com>
2020-10-07 14:08           ` Tom Talpey
2020-10-06 19:36 ` Benjamin Coddington
2020-10-06 21:46   ` Olga Kornievskaia
2020-10-07  0:18     ` J. Bruce Fields
2020-10-07 11:27       ` Benjamin Coddington
2020-10-07 12:55         ` Benjamin Coddington
2020-10-07 13:45           ` Chuck Lever
2020-10-07 14:05             ` Bruce Fields
2020-10-07 14:15               ` Chuck Lever
2020-10-07 16:05                 ` Bruce Fields
2020-10-07 16:44                   ` Trond Myklebust
2020-10-07 17:15                     ` Bruce Fields
2020-10-07 17:29                       ` Trond Myklebust [this message]
2020-10-07 18:05                         ` bfields
2020-10-07 19:11                           ` Trond Myklebust
2020-10-07 20:29                             ` bfields
2020-10-07 18:04                     ` Benjamin Coddington
2020-10-07 18:19                       ` Trond Myklebust
2020-10-07 16:50                   ` Trond Myklebust
2021-01-19 22:22                     ` bfields
2021-01-19 23:09                       ` Trond Myklebust
2021-01-20 15:07                         ` bfields
2021-05-03 20:09                           ` bfields
2021-05-04  2:08                             ` NeilBrown
2021-05-04 13:27                               ` Tom Talpey
2021-05-04 14:27                               ` Trond Myklebust
2021-05-04 16:51                                 ` bfields
2021-05-04 21:32                                   ` Daire Byrne
2021-05-04 21:48                                     ` Trond Myklebust
2021-05-05 12:53                                       ` Daire Byrne
2021-01-20 15:58                       ` Chuck Lever
2020-10-07 13:56 ` Patrick Goetz
2020-10-07 16:28   ` Igor Ostrovsky
2020-10-07 16:30   ` Benjamin Coddington

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=5998d49f790736aa49e7a2ac89b555bc99f3b543.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=aglo@umich.edu \
    --cc=bcodding@redhat.com \
    --cc=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /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