From: NeilBrown <neilb@ownmail.net>
To: Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>
Cc: Jeff Layton <jlayton@kernel.org>, Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/9] nfs: prepare for VFS locking changes.
Date: Tue, 29 Sep 2026 12:21:10 +1000 [thread overview]
Message-ID: <20260929022547.1428036-1-neilb@ownmail.net> (raw)
sashiko reported some problem with the previous posting. A lot
were false positives as it used the wrong base. However:
3/9 had inverted the return code from nfs_neg_need_reval() - it returns
1 for "must revalidate" unlike d_revalidate which returns 0.
8/9 didn't handle and error from nfs_lookup() correctly - it
should be fatal rather than triggering a retry.
Original intro below.
Thanks,
NeilBrown
I am working on changes to directory locking. The medium term goal is
to lift d_alloc_parallel() locking above i_rwsem, so d_alloc_paralle()
can be run unlocked, and consequently cannot be called when ->i_rwsem is
held.
The requires:
1/ the d_alloc_parallel() not be called while i_rwsem is held. NFS does
this in a few places. New interfaces d_alloc_trylock() and d_duplicate()
are now available and can be used instead.
2/ a dentry must not be d_drop()ed while an operation is ongoing, as an
unlocked d_alloc_parallel() would then be able to create a new
dentry with the same name. In particular d_rehash() must be phased
out as it won't be safe. Various techiniques are used to avoid the
need for d_drop(), particularly that d_splice_alias() is now able to
splice a hashed alias.
Further, the first two patches here fixes bugs that I found while
developing and reviewing these changes.
The patches depend on patches recently added to the vfs tree. I would
prefer these land in that tree too with an Acked-by or similar from NFS
maintainers.
Thanks,
NeilBrown
[PATCH v2 1/9] nfs: fix open-blocking with d_fsdata
[PATCH v2 2/9] nfs: fix nfs_call_unlink()
[PATCH v2 3/9] nfs: remove d_drop()/d_alloc_parallel() from
[PATCH v2 4/9] nfs: use d_splice_alias() in nfs_link()
[PATCH v2 5/9] nfs: don't d_drop() before d_splice_alias()
[PATCH v2 6/9] nfs: don't d_drop() before d_splice_alias() in
[PATCH v2 7/9] nfs: Use d_alloc_trylock() in nfs_prime_dcache()
[PATCH v2 8/9] nfs: use d_alloc_trylock() in silly-rename
[PATCH v2 9/9] nfs: use d_duplicate()
next reply other threads:[~2026-09-29 2:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 2:21 NeilBrown [this message]
2026-09-29 2:21 ` [PATCH v2 1/9] nfs: fix open-blocking with d_fsdata NeilBrown
2026-09-29 2:21 ` [PATCH v2 2/9] nfs: fix nfs_call_unlink() NeilBrown
2026-09-29 2:21 ` [PATCH v2 3/9] nfs: remove d_drop()/d_alloc_parallel() from nfs_atomic_open() NeilBrown
2026-09-30 14:32 ` John Stoffel
2026-09-30 21:17 ` NeilBrown
2026-10-01 19:43 ` John Stoffel
2026-09-29 2:21 ` [PATCH v2 4/9] nfs: use d_splice_alias() in nfs_link() NeilBrown
2026-09-29 2:21 ` [PATCH v2 5/9] nfs: don't d_drop() before d_splice_alias() NeilBrown
2026-09-29 2:21 ` [PATCH v2 6/9] nfs: don't d_drop() before d_splice_alias() in atomic_create NeilBrown
2026-09-29 2:21 ` [PATCH v2 7/9] nfs: Use d_alloc_trylock() in nfs_prime_dcache() NeilBrown
2026-09-29 2:21 ` [PATCH v2 8/9] nfs: use d_alloc_trylock() in silly-rename NeilBrown
2026-09-29 2:21 ` [PATCH v2 9/9] nfs: use d_duplicate() NeilBrown
2026-09-29 21:24 ` [PATCH v2 0/9] nfs: prepare for VFS locking changes Anna Schumaker
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=20260929022547.1428036-1-neilb@ownmail.net \
--to=neilb@ownmail.net \
--cc=anna@kernel.org \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=trondmy@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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