All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@redhat.com>
To: Trond Myklebust <trondmy@hammerspace.com>,
	Anna Schumaker <schumakeranna@gmail.com>
Cc: daire@dneg.com, linux-nfs@vger.kernel.org,
	"J. Bruce Fields" <bfields@redhat.com>
Subject: [PATCH 0/3] reexport lock fixes
Date: Mon, 14 Jun 2021 10:48:15 -0400	[thread overview]
Message-ID: <1623682098-13236-1-git-send-email-bfields@redhat.com> (raw)

From: "J. Bruce Fields" <bfields@redhat.com>

The following fix up some problems that can cause crashes or silently
broken lock guarantees in the reexport case.

Not fixed:
	- Attempts to reclaim locks after a reboot of the reexport
	  server will fail.  This at least seems like an improvement
	  over the current situation, which is that they'll succeed even
	  in cases where they shouldn't.  Complete support for reboot
	  recovery is a bigger job.

	- NFSv4.1+ lock nofications don't work.  So, clients have to
	  poll as they do with NFSv4.0, which is suboptimal, but correct
	  (and an improvement over the current situation, which is a
	  kernel oops).

So what we have at this point is a suboptimal lock implementation that
doesn't support lock recovery.

Another alternative might be to turn off file locking entirely in the
re-export case.  I'd rather take the incremental improvement and fix the
oopses.

--b.

J. Bruce Fields (3):
  nfs: don't atempt blocking locks on nfs reexports
  lockd: lockd server-side shouldn't set fl_ops
  nfs: don't allow reexport reclaims

 fs/lockd/svclock.c       | 30 ++++++++++++------------------
 fs/nfs/export.c          |  2 +-
 fs/nfs/file.c            |  3 +++
 fs/nfsd/nfs4state.c      | 11 +++++++++--
 fs/nfsd/nfsproc.c        |  1 +
 include/linux/exportfs.h |  2 ++
 include/linux/fs.h       |  1 +
 7 files changed, 29 insertions(+), 21 deletions(-)

-- 
2.31.1


             reply	other threads:[~2021-06-14 14:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-14 14:48 J. Bruce Fields [this message]
2021-06-14 14:48 ` [PATCH 1/3] nfs: don't atempt blocking locks on nfs reexports J. Bruce Fields
2021-06-14 14:48 ` [PATCH 2/3] lockd: lockd server-side shouldn't set fl_ops J. Bruce Fields
2021-06-14 14:48 ` [PATCH 3/3] nfs: don't allow reexport reclaims J. Bruce Fields
2021-06-14 14:56   ` Trond Myklebust
2021-06-14 19:34     ` J. Bruce Fields
2021-06-14 19:53       ` Trond Myklebust
2021-06-14 20:03         ` bfields
2021-06-14 21:03           ` Trond Myklebust
2021-07-22 14:34             ` bfields

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=1623682098-13236-1-git-send-email-bfields@redhat.com \
    --to=bfields@redhat.com \
    --cc=daire@dneg.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=schumakeranna@gmail.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.