All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "bfields@fieldses.org" <bfields@fieldses.org>,
	"chuck.lever@oracle.com" <chuck.lever@oracle.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"aglo@umich.edu" <aglo@umich.edu>
Subject: Re: client's caching of server-side capabilities
Date: Wed, 30 Jun 2021 15:52:13 +0000	[thread overview]
Message-ID: <1c36c2e932db265d9e5c1699a657c2706504598d.camel@hammerspace.com> (raw)
In-Reply-To: <20210630152258.GC20229@fieldses.org>

On Wed, 2021-06-30 at 11:22 -0400, J. Bruce Fields wrote:
> On Tue, Jun 29, 2021 at 01:51:43PM +0000, Chuck Lever III wrote:
> > 
> > 
> > > On Jun 29, 2021, at 9:48 AM, Olga Kornievskaia <aglo@umich.edu>
> > > wrote:
> > > 
> > > On Tue, Jun 29, 2021 at 8:58 AM Chuck Lever III
> > > <chuck.lever@oracle.com> wrote:
> > > > 
> > > > 
> > > > 
> > > > > On Jun 28, 2021, at 6:06 PM, Trond Myklebust
> > > > > <trondmy@hammerspace.com> wrote:
> > > > > 
> > > > > On Mon, 2021-06-28 at 16:23 -0400, Olga Kornievskaia wrote:
> > > > > > Hi folks,
> > > > > > 
> > > > > > I have a general question of why the client doesn't throw
> > > > > > away the
> > > > > > cached server's capabilities on server reboot. Say a client
> > > > > > mounted a
> > > > > > server when the server didn't support security_labels, then
> > > > > > the
> > > > > > server
> > > > > > was rebooted and support was enabled. Client re-establishes
> > > > > > its
> > > > > > clientid/session, recovers state, but assumes all the old
> > > > > > capabilities
> > > > > > apply. A remount is required to clear old/find new
> > > > > > capabilities. The
> > > > > > opposite is true that a capability could be removed (but
> > > > > > I'm assuming
> > > > > > that's a less practical example).
> > > > > > 
> > > > > > I'm curious what are the problems of clearing server
> > > > > > capabilities and
> > > > > > rediscovering them on reboot? Is it because a local
> > > > > > filesystem could
> > > > > > never have its attributes changed and thus a network file
> > > > > > system
> > > > > > can't
> > > > > > either?
> > > > > > 
> > > > > > Thank you.
> > > > > 
> > > > > In my opinion, the client should aim for the absolute minimum
> > > > > overhead
> > > > > on a server reboot. The goal should be to recover state and
> > > > > get I/O
> > > > > started again as quickly as possible.
> > > > 
> > > > I 100% agree with the above. However...
> > > > 
> > > > 
> > > > > Detection of new features, etc
> > > > > can wait until the client needs to restart.
> > > > 
> > > > A server reboot can be part of a failover to a different
> > > > server. I
> > > > think capability discovery needs to happen as part of server
> > > > reboot
> > > > recovery, it can't be optimized away.
> > > 
> > > Can you clarify what you mean by a "failover to a different
> > > server"?
> > 
> > IP-based failover means that a server can crash, and its partner
> > can
> > detect that and take over the IP address and exports of the failed
> > server. The replacement server doesn't have to have exactly the
> > same
> > set of capabilities.
> 
> So it could also lose capabilities?
> 
> I'm a little nervous about server features being changed out from
> under
> the client while the client has the server mounted.
> 
> But, I don't know, looking quickly through the list of NFS_CAP_*
> definitions in nfs_fs_sb.h, I'm not coming up with a case where we
> couldn't handle it, maybe it's OK.
> 
> --b.

I'm not taking any patches for the server reboot case. If someone wants
to do it for the migration case, then fine: that's not a case that is
common or that requires performance. However reprobing all mounted
filesystems on every server reboot is NACKed.

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



  reply	other threads:[~2021-06-30 15:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 20:23 client's caching of server-side capabilities Olga Kornievskaia
2021-06-28 22:06 ` Trond Myklebust
2021-06-29 12:58   ` Chuck Lever III
2021-06-29 13:48     ` Olga Kornievskaia
2021-06-29 13:51       ` Chuck Lever III
2021-06-30 15:22         ` J. Bruce Fields
2021-06-30 15:52           ` Trond Myklebust [this message]
2021-06-30 16:48           ` Olga Kornievskaia
2021-06-30 17:11             ` Trond Myklebust
2021-06-29 13:41   ` Olga Kornievskaia
2021-06-29 16:12     ` Olga Kornievskaia
2021-06-29 17:05       ` 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=1c36c2e932db265d9e5c1699a657c2706504598d.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=aglo@umich.edu \
    --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 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.