Skip to content

OPEN optimisations and Attribute delegations

[email protected] linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest19 patches 2 repliesIn review

Changes in v2 from the cover letter

- Fix issues when compiling without CONFIG_NFS_V4
- Update "NFSv4: Fix up delegated attributes in nfs_setattr" to fix regressions pointed out by Anna Schumaker
- Squash commits "NFSv4: Ask for a delegation or an open stateid in OPEN" and "Return the delegation when deleting the sillyrenamed file" as suggested by Jeff Layton
- Add "NFSv4: Don't send delegation-related share access modes to CLOSE"

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19NFSv4: Clean up open delegation return structurefs/nfs/nfs4proc.c fs/nfs/nfs4xdr.c include/linux/nfs_xdr.h+54 -350 replies
2/19NFSv4: Refactor nfs4_opendata_check_deleg()fs/nfs/nfs4proc.c+30 -360 replies
3/19NFSv4: Add new attribute delegation definitionsfs/nfs/nfs4proc.c include/linux/nfs4.h include/uapi/linux/nfs4.h+12 -10 replies
4/19NFSv4: Plumb in XDR support for the new delegation-only setattr opfs/nfs/nfs4proc.c fs/nfs/nfs4xdr.c include/linux/nfs_xdr.h+86 -00 replies
5/19NFSv4: Add CB_GETATTR support for delegated attributesfs/nfs/callback.h fs/nfs/callback_proc.c fs/nfs/callback_xdr.c+49 -90 replies
6/19NFSv4: Add a flags argument to the 'have_delegation' callbackfs/nfs/delegation.c fs/nfs/delegation.h fs/nfs/dir.c +7 more+43 -340 replies
7/19NFSv4: Add support for delegated atime and mtime attributesfs/nfs/delegation.c fs/nfs/delegation.h fs/nfs/inode.c +3 more+124 -200 replies
8/19NFSv4: Add recovery of attribute delegationsfs/nfs/nfs4proc.c fs/nfs/nfs4xdr.c include/linux/nfs_xdr.h+24 -140 replies
9/19NFSv4: Add a capability for delegated attributesfs/nfs/nfs4proc.c include/linux/nfs_fs_sb.h+3 -00 replies
10/19NFSv4: Enable attribute delegationsfs/nfs/nfs4proc.c+6 -10 replies
11/19NFSv4: Delegreturn must set m/atime when they are delegatedfs/nfs/delegation.c fs/nfs/delegation.h fs/nfs/nfs4proc.c+32 -83 replies
12/19NFSv4: Fix up delegated attributes in nfs_setattrfs/nfs/inode.c+25 -00 replies
13/19NFSv4: Don't request atime/mtime/size if they are delegated to usfs/nfs/nfs4proc.c+17 -30 replies
14/19NFSv4: Add support for the FATTR4_OPEN_ARGUMENTS attributefs/nfs/nfs4proc.c fs/nfs/nfs4xdr.c include/linux/nfs4.h +1 more+53 -20 replies
15/19NFSv4: Detect support for OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATIONfs/nfs/nfs4proc.c include/linux/nfs_fs_sb.h include/uapi/linux/nfs4.h+7 -00 replies
16/19NFSv4: Add support for OPEN4_RESULT_NO_OPEN_STATEIDfs/nfs/nfs4proc.c+12 -40 replies
17/19NFSv4: Ask for a delegation or an open stateid in OPENfs/nfs/nfs4proc.c+2 -00 replies
18/19Return the delegation when deleting sillyrenamed filesfs/nfs/nfs3proc.c fs/nfs/nfs4proc.c fs/nfs/proc.c +2 more+20 -00 replies
19/19NFSv4: Don't send delegation-related share access modes to CLOSEfs/nfs/nfs4proc.c+11 -40 replies

Reviews trailers per patch

18 of 19 patches have a Reviewed-by or Acked-by.

PatchJeff Layton
1/19R-b
2/19R-b
3/19R-b
4/19R-b
5/19R-b
6/19R-b
7/19R-b
8/19R-b
9/19R-b
10/19R-b
11/19R-b R-b
12/19R-b
13/19R-b
14/19R-b
15/19R-b
16/19R-b
17/19R-b
18/19R-b
19/19

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/19] OPEN optimisations and Attribute delegations

From: Trond Myklebust <[email protected]>

Now that https://datatracker.ietf.org/doc/draft-ietf-nfsv4-delstid/ is mostly done with the review process, it is time to look at pushing the client implementation that we've been working on upstream.

The following patch series therefore adds support for the NFSv4.2 extension to OP_OPEN to allow the client to request that the server return either an open stateid or a delegation instead of always sending the open stateid whether or not a delegation is returned. This allows us to optimise away CLOSE, and hence makes small or cached file access significantly more efficient.

It also adds support for attribute delegations, which allow the client to manage the atime and mtime, and simply inform the server at file close time what the values should be. This means that most GETATTR operations to retrieve the atime/mtime values while the file is under I/O can be optimised away.

Finally, we also add support for the detection mechanism that allows the client to determine whether or not the server supports the above functionality.

v2:
- Fix issues when compiling without CONFIG_NFS_V4
- Update "NFSv4: Fix up delegated attributes in nfs_setattr" to fix regressions pointed out by Anna Schumaker
- Squash commits "NFSv4: Ask for a delegation or an open stateid in OPEN" and "Return the delegation when deleting the sillyrenamed file" as suggested by Jeff Layton
- Add "NFSv4: Don't send delegation-related share access modes to CLOSE"

Lance Shelton (1):
Return the delegation when deleting sillyrenamed files

Trond Myklebust (18):
NFSv4: Clean up open delegation return structure
NFSv4: Refactor nfs4_opendata_check_deleg()
NFSv4: Add new attribute delegation definitions
NFSv4: Plumb in XDR support for the new delegation-only setattr op
NFSv4: Add CB_GETATTR support for delegated attributes
NFSv4: Add a flags argument to the 'have_delegation' callback
NFSv4: Add support for delegated atime and mtime attributes
NFSv4: Add recovery of attribute delegations
NFSv4: Add a capability for delegated attributes
NFSv4: Enable attribute delegations
NFSv4: Delegreturn must set m/atime when they are delegated
NFSv4: Fix up delegated attributes in nfs_setattr
NFSv4: Don't request atime/mtime/size if they are delegated to us
NFSv4: Add support for the FATTR4_OPEN_ARGUMENTS attribute
NFSv4: Detect support for OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION
NFSv4: Add support for OPEN4_RESULT_NO_OPEN_STATEID
NFSv4: Ask for a delegation or an open stateid in OPEN
NFSv4: Don't send delegation-related share access modes to CLOSE

 fs/nfs/callback.h         |   5 +-
 fs/nfs/callback_proc.c    |  14 ++-
 fs/nfs/callback_xdr.c     |  39 +++++-
 fs/nfs/delegation.c       |  67 ++++++----
 fs/nfs/delegation.h       |  45 ++++++-
 fs/nfs/dir.c              |   2 +-
 fs/nfs/file.c             |   4 +-
 fs/nfs/inode.c            |  86 +++++++++++--
 fs/nfs/nfs3proc.c         |  10 +-
 fs/nfs/nfs4proc.c         | 248 ++++++++++++++++++++++++++++----------
 fs/nfs/nfs4xdr.c          | 131 +++++++++++++++-----
 fs/nfs/proc.c             |  10 +-
 fs/nfs/read.c             |   3 +
 fs/nfs/unlink.c           |   2 +
 fs/nfs/write.c            |  11 +-
 include/linux/nfs4.h      |  11 ++
 include/linux/nfs_fs_sb.h |   2 +
 include/linux/nfs_xdr.h   |  45 ++++++-
 include/uapi/linux/nfs4.h |   4 +
 19 files changed, 589 insertions(+), 150 deletions(-)
Signature · 1 line
2.45.2