linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anna Schumaker <anna@kernel.org>
To: linux-nfs@vger.kernel.org, trond.myklebust@hammerspace.com
Cc: anna@kernel.org
Subject: [PATCH 0/5] NFS: Client Side Directory Delegations
Date: Tue,  4 Nov 2025 10:06:40 -0500	[thread overview]
Message-ID: <20251104150645.719865-1-anna@kernel.org> (raw)

From: Anna Schumaker <anna.schumaker@oracle.com>

This patchset adds support for recallable directory delegations in the
NFS client, letting us shortcut some directory revalidation steps since
we know the directory hasn't changed from underneath us.

I tried to limit requesting a dir delegation to when we think the user
is doing work within a directory, so I look for ACCESS, CREATE, UNLINK,
and (same directory) RENAME calls. I'm open to suggestions for other
times I should be requesting a dir delegation too.

Finally, I add a new "directory_delegations" module parameter for
controlling the usage of directory delegations since they are still a
new feature. I (optimistically) have them enabled by default, and
setting this option to false will disable requesting delegations and
cause the client to return any existing delegations on the next use.

I'm happy to hear any suggestions for improvements!
Anna


Anna Schumaker (5):
  NFS: Add support for sending GDD_GETATTR
  NFS: Request a directory delegation on ACCESS, CREATE, and UNLINK
  NFS: Request a directory delegation during RENAME
  NFS: Shortcut lookup revalidations if we have a directory delegation
  NFS: Add a module option to disable directory delegations

 fs/nfs/delegation.c       |   8 +++
 fs/nfs/delegation.h       |  13 +++++
 fs/nfs/dir.c              |  19 +++++++
 fs/nfs/inode.c            |   3 ++
 fs/nfs/nfs3proc.c         |   3 +-
 fs/nfs/nfs4proc.c         |  62 ++++++++++++++++++++--
 fs/nfs/nfs4xdr.c          | 106 ++++++++++++++++++++++++++++++++++++++
 fs/nfs/proc.c             |   3 +-
 fs/nfs/unlink.c           |   3 +-
 include/linux/nfs_fs.h    |   1 +
 include/linux/nfs_fs_sb.h |   1 +
 include/linux/nfs_xdr.h   |  10 +++-
 12 files changed, 223 insertions(+), 9 deletions(-)

-- 
2.51.2


             reply	other threads:[~2025-11-04 15:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-04 15:06 Anna Schumaker [this message]
2025-11-04 15:06 ` [PATCH 1/5] NFS: Add support for sending GDD_GETATTR Anna Schumaker
2025-11-04 15:06 ` [PATCH 2/5] NFS: Request a directory delegation on ACCESS, CREATE, and UNLINK Anna Schumaker
2025-11-04 15:06 ` [PATCH 3/5] NFS: Request a directory delegation during RENAME Anna Schumaker
2025-11-04 15:06 ` [PATCH 4/5] NFS: Shortcut lookup revalidations if we have a directory delegation Anna Schumaker
2025-11-04 15:06 ` [PATCH 5/5] NFS: Add a module option to disable directory delegations 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=20251104150645.719865-1-anna@kernel.org \
    --to=anna@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).