History

Merge tag 'nfs-for-6.19-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client updates from Trond Myklebust: "Bugfixes: - Fix 'nlink' attribute update races when unlinking a file - Add missing initialisers for the directory verifier in various places - Don't regress the NFSv4 open state due to misordered racing replies - Ensure the NFSv4.x callback server uses the correct transport connection - Fix potential use-after-free races when shutting down the NFSv4.x callback server - Fix a pNFS layout commit crash - Assorted fixes to ensure correct propagation of mount options when the client crosses a filesystem boundary and triggers the VFS automount code - More localio fixes Features and cleanups: - Add initial support for basic directory delegations - SunRPC back channel code cleanups" * tag 'nfs-for-6.19-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (24 commits) NFSv4: Handle NFS4ERR_NOTSUPP errors for directory delegations nfs/localio: remove 61 byte hole from needless ____cacheline_aligned nfs/localio: remove alignment size checking in nfs_is_local_dio_possible NFS: Fix up the automount fs_context to use the correct cred NFS: Fix inheritance of the block sizes when automounting NFS: Automounted filesystems should inherit ro,noexec,nodev,sync flags Revert "nfs: ignore SB_RDONLY when mounting nfs" Revert "nfs: clear SB_RDONLY before getting superblock" Revert "nfs: ignore SB_RDONLY when remounting nfs" NFS: Add a module option to disable directory delegations NFS: Shortcut lookup revalidations if we have a directory delegation NFS: Request a directory delegation during RENAME NFS: Request a directory delegation on ACCESS, CREATE, and UNLINK NFS: Add support for sending GDD_GETATTR NFSv4/pNFS: Clear NFS_INO_LAYOUTCOMMIT in pnfs_mark_layout_stateid_invalid NFSv4.1: protect destroying and nullifying bc_serv structure SUNRPC: new helper function for stopping backchannel server SUNRPC: cleanup common code in backchannel request NFSv4.1: pass transport for callback shutdown NFSv4: ensure the open stateid seqid doesn't go backwards ...

Linus Torvalds committed 11 months ago

Commit 6bb34af2 parents d358e52 bd3b04b25 files · +385 −91Browse files

Showing the changes to include/linux (4 of 25 files). Show all

Unified · Split

4 files
  1. include/linux/nfs_fs.h +1 −0
  2. include/linux/nfs_fs_sb.h +6 −0
  3. include/linux/nfs_xdr.h +9 −1
  4. include/linux/sunrpc/bc_xprt.h +7 −0
include/linux/nfs_fs.h+1−0
@@ -344,6 +344,7 @@ struct nfs4_copy_state { · 343 unmodified lines
344344 #define NFS_INO_LAYOUTCOMMITTING (10) /* layoutcommit inflight */
345345 #define NFS_INO_LAYOUTSTATS (11) /* layoutstats inflight */
346346 #define NFS_INO_ODIRECT (12) /* I/O setting is O_DIRECT */
347+#define NFS_INO_REQ_DIR_DELEG (13) /* Request a directory delegation */
347348
348349 static inline struct nfs_inode *NFS_I(const struct inode *inode)
349350 {
include/linux/nfs_fs_sb.h+6−0
@@ -172,6 +172,11 @@ struct nfs_server { · 171 unmodified lines
172172 #define NFS_MOUNT_FORCE_RDIRPLUS 0x20000000
173173 #define NFS_MOUNT_NETUNREACH_FATAL 0x40000000
174174
175+ unsigned int automount_inherit; /* Properties inherited by automount */
176+#define NFS_AUTOMOUNT_INHERIT_BSIZE 0x0001
177+#define NFS_AUTOMOUNT_INHERIT_RSIZE 0x0002
178+#define NFS_AUTOMOUNT_INHERIT_WSIZE 0x0004
179+
175180 unsigned int caps; /* server capabilities */
176181 __u64 fattr_valid; /* Valid attributes */
177182 unsigned int rsize; /* read size */
@@ -305,6 +310,7 @@ struct nfs_server { · 127 unmodified lines
305310 #define NFS_CAP_REBOOT_LAYOUTRETURN (1U << 8)
306311 #define NFS_CAP_OFFLOAD_STATUS (1U << 9)
307312 #define NFS_CAP_ZERO_RANGE (1U << 10)
313+#define NFS_CAP_DIR_DELEG (1U << 11)
308314 #define NFS_CAP_OPEN_XOR (1U << 12)
309315 #define NFS_CAP_DELEGTIME (1U << 13)
310316 #define NFS_CAP_POSIX_LOCK (1U << 14)
include/linux/nfs_xdr.h+9−1
@@ -1092,12 +1092,19 @@ struct nfs4_getattr_arg { · 1091 unmodified lines
10921092 struct nfs4_sequence_args seq_args;
10931093 const struct nfs_fh * fh;
10941094 const u32 * bitmask;
1095+ bool get_dir_deleg;
1096+};
1097+
1098+struct nfs4_gdd_res {
1099+ u32 status;
1100+ nfs4_stateid deleg;
10951101 };
10961102
10971103 struct nfs4_getattr_res {
10981104 struct nfs4_sequence_res seq_res;
10991105 const struct nfs_server * server;
11001106 struct nfs_fattr * fattr;
1107+ struct nfs4_gdd_res * gdd_res;
11011108 };
11021109
11031110 struct nfs4_link_arg {
@@ -1801,7 +1808,8 @@ struct nfs_rpc_ops { · 697 unmodified lines
18011808 int (*unlink_done) (struct rpc_task *, struct inode *);
18021809 void (*rename_setup) (struct rpc_message *msg,
18031810 struct dentry *old_dentry,
1804− struct dentry *new_dentry);
1811+ struct dentry *new_dentry,
1812+ struct inode *same_parent);
18051813 void (*rename_rpc_prepare)(struct rpc_task *task, struct nfs_renamedata *);
18061814 int (*rename_done) (struct rpc_task *task, struct inode *old_dir, struct inode *new_dir);
18071815 int (*link) (struct inode *, struct inode *, const struct qstr *);
include/linux/sunrpc/bc_xprt.h+7−0
@@ -25,12 +25,14 @@ void xprt_init_bc_request(struct rpc_rqst *req, struct rpc_task *task, · 24 unmodified lines
2525 void xprt_free_bc_request(struct rpc_rqst *req);
2626 int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs);
2727 void xprt_destroy_backchannel(struct rpc_xprt *, unsigned int max_reqs);
28+void xprt_enqueue_bc_request(struct rpc_rqst *req);
2829
2930 /* Socket backchannel transport methods */
3031 int xprt_setup_bc(struct rpc_xprt *xprt, unsigned int min_reqs);
3132 void xprt_destroy_bc(struct rpc_xprt *xprt, unsigned int max_reqs);
3233 void xprt_free_bc_rqst(struct rpc_rqst *req);
3334 unsigned int xprt_bc_max_slots(struct rpc_xprt *xprt);
35+void xprt_svc_destroy_nullify_bc(struct rpc_xprt *xprt, struct svc_serv **serv);
3436
3537 /*
3638 * Determine if a shared backchannel is in use
@@ -68,5 +70,10 @@ static inline void set_bc_enabled(struct svc_serv *serv) · 31 unmodified lines
6870 static inline void xprt_free_bc_request(struct rpc_rqst *req)
6971 {
7072 }
73+
74+static inline void xprt_svc_destroy_nullify_bc(struct rpc_xprt *xprt, struct svc_serv **serv)
75+{
76+ svc_destroy(serv);
77+}
7178 #endif /* CONFIG_SUNRPC_BACKCHANNEL */
7279 #endif /* _LINUX_SUNRPC_BC_XPRT_H */