Linux NFS development
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Chuck Lever III <chuck.lever@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: reservation errors during fstests on pNFS block
Date: Sun, 16 Jun 2024 22:38:43 -0700	[thread overview]
Message-ID: <Zm_L48Z8-3fpWZXU@infradead.org> (raw)
In-Reply-To: <3B61FCDD-2684-4E5E-9790-2CEFDF69539D@oracle.com>

On Sat, Jun 15, 2024 at 06:09:20PM +0000, Chuck Lever III wrote:
> 
> nfs4_find_get_deviceid() tries to be clever and do a lookup without
> the spin lock first.
> 
> If it can't find a matching deviceid, it creates a new device_info
> (which calls bl_alloc_deviceid_node, and that registers the device's
> PR key).
> 
> Then it takes the nfs4_deviceid_lock and looks up the deviceid again.
> If it finds it this time, bl_find_get_deviceid() frees the spare
> (new) device_info, which unregisters the PR key for the same device.
> 
> Any subsequent I/O from this client on that device gets EBADE.
> 
> The umount later unregisters the device's PR key again.
> 
> Seems like PR key registration should be done from a more
> idempotent context...?

Yes.  Or at least not do this optimistic reservation.

      reply	other threads:[~2024-06-17  5:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14 14:46 reservation errors during fstests on pNFS block Chuck Lever III
2024-06-14 16:38 ` Christoph Hellwig
2024-06-14 17:46   ` Chuck Lever III
2024-06-14 18:26     ` Christoph Hellwig
2024-06-14 18:33       ` Chuck Lever III
2024-06-14 18:34         ` Christoph Hellwig
2024-06-15 18:09         ` Chuck Lever III
2024-06-17  5:38           ` Christoph Hellwig [this message]

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=Zm_L48Z8-3fpWZXU@infradead.org \
    --to=hch@infradead.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