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
344#define NFS_INO_LAYOUTCOMMITTING (10) /* layoutcommit inflight */344#define NFS_INO_LAYOUTCOMMITTING (10) /* layoutcommit inflight */
345#define NFS_INO_LAYOUTSTATS (11) /* layoutstats inflight */345#define NFS_INO_LAYOUTSTATS (11) /* layoutstats inflight */
346#define NFS_INO_ODIRECT (12) /* I/O setting is O_DIRECT */346#define NFS_INO_ODIRECT (12) /* I/O setting is O_DIRECT */
347#define NFS_INO_REQ_DIR_DELEG (13) /* Request a directory delegation */
347 348
348static inline struct nfs_inode *NFS_I(const struct inode *inode)349static inline struct nfs_inode *NFS_I(const struct inode *inode)
349{350{
include/linux/nfs_fs_sb.h+6−0
@@ -172,6 +172,11 @@ struct nfs_server { · 171 unmodified lines
172#define NFS_MOUNT_FORCE_RDIRPLUS 0x20000000172#define NFS_MOUNT_FORCE_RDIRPLUS 0x20000000
173#define NFS_MOUNT_NETUNREACH_FATAL 0x40000000173#define NFS_MOUNT_NETUNREACH_FATAL 0x40000000
174 174
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
175 unsigned int caps; /* server capabilities */180 unsigned int caps; /* server capabilities */
176 __u64 fattr_valid; /* Valid attributes */181 __u64 fattr_valid; /* Valid attributes */
177 unsigned int rsize; /* read size */182 unsigned int rsize; /* read size */
@@ -305,6 +310,7 @@ struct nfs_server { · 127 unmodified lines
305#define NFS_CAP_REBOOT_LAYOUTRETURN (1U << 8)310#define NFS_CAP_REBOOT_LAYOUTRETURN (1U << 8)
306#define NFS_CAP_OFFLOAD_STATUS (1U << 9)311#define NFS_CAP_OFFLOAD_STATUS (1U << 9)
307#define NFS_CAP_ZERO_RANGE (1U << 10)312#define NFS_CAP_ZERO_RANGE (1U << 10)
313#define NFS_CAP_DIR_DELEG (1U << 11)
308#define NFS_CAP_OPEN_XOR (1U << 12)314#define NFS_CAP_OPEN_XOR (1U << 12)
309#define NFS_CAP_DELEGTIME (1U << 13)315#define NFS_CAP_DELEGTIME (1U << 13)
310#define NFS_CAP_POSIX_LOCK (1U << 14)316#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
1092 struct nfs4_sequence_args seq_args;1092 struct nfs4_sequence_args seq_args;
1093 const struct nfs_fh * fh;1093 const struct nfs_fh * fh;
1094 const u32 * bitmask;1094 const u32 * bitmask;
1095 bool get_dir_deleg;
1096};
1097
1098struct nfs4_gdd_res {
1099 u32 status;
1100 nfs4_stateid deleg;
1095};1101};
1096 1102
1097struct nfs4_getattr_res {1103struct nfs4_getattr_res {
1098 struct nfs4_sequence_res seq_res;1104 struct nfs4_sequence_res seq_res;
1099 const struct nfs_server * server;1105 const struct nfs_server * server;
1100 struct nfs_fattr * fattr;1106 struct nfs_fattr * fattr;
1107 struct nfs4_gdd_res * gdd_res;
1101};1108};
1102 1109
1103struct nfs4_link_arg {1110struct nfs4_link_arg {
@@ -1801,7 +1808,8 @@ struct nfs_rpc_ops { · 697 unmodified lines
1801 int (*unlink_done) (struct rpc_task *, struct inode *);1808 int (*unlink_done) (struct rpc_task *, struct inode *);
1802 void (*rename_setup) (struct rpc_message *msg,1809 void (*rename_setup) (struct rpc_message *msg,
1803 struct dentry *old_dentry,1810 struct dentry *old_dentry,
1804 struct dentry *new_dentry);1811 struct dentry *new_dentry,
1812 struct inode *same_parent);
1805 void (*rename_rpc_prepare)(struct rpc_task *task, struct nfs_renamedata *);1813 void (*rename_rpc_prepare)(struct rpc_task *task, struct nfs_renamedata *);
1806 int (*rename_done) (struct rpc_task *task, struct inode *old_dir, struct inode *new_dir);1814 int (*rename_done) (struct rpc_task *task, struct inode *old_dir, struct inode *new_dir);
1807 int (*link) (struct inode *, struct inode *, const struct qstr *);1815 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
25void xprt_free_bc_request(struct rpc_rqst *req);25void xprt_free_bc_request(struct rpc_rqst *req);
26int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs);26int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs);
27void xprt_destroy_backchannel(struct rpc_xprt *, unsigned int max_reqs);27void xprt_destroy_backchannel(struct rpc_xprt *, unsigned int max_reqs);
28void xprt_enqueue_bc_request(struct rpc_rqst *req);
28 29
29/* Socket backchannel transport methods */30/* Socket backchannel transport methods */
30int xprt_setup_bc(struct rpc_xprt *xprt, unsigned int min_reqs);31int xprt_setup_bc(struct rpc_xprt *xprt, unsigned int min_reqs);
31void xprt_destroy_bc(struct rpc_xprt *xprt, unsigned int max_reqs);32void xprt_destroy_bc(struct rpc_xprt *xprt, unsigned int max_reqs);
32void xprt_free_bc_rqst(struct rpc_rqst *req);33void xprt_free_bc_rqst(struct rpc_rqst *req);
33unsigned int xprt_bc_max_slots(struct rpc_xprt *xprt);34unsigned int xprt_bc_max_slots(struct rpc_xprt *xprt);
35void xprt_svc_destroy_nullify_bc(struct rpc_xprt *xprt, struct svc_serv **serv);
34 36
35/*37/*
36 * Determine if a shared backchannel is in use38 * 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
68static inline void xprt_free_bc_request(struct rpc_rqst *req)70static inline void xprt_free_bc_request(struct rpc_rqst *req)
69{71{
70}72}
73
74static inline void xprt_svc_destroy_nullify_bc(struct rpc_xprt *xprt, struct svc_serv **serv)
75{
76 svc_destroy(serv);
77}
71#endif /* CONFIG_SUNRPC_BACKCHANNEL */78#endif /* CONFIG_SUNRPC_BACKCHANNEL */
72#endif /* _LINUX_SUNRPC_BC_XPRT_H */79#endif /* _LINUX_SUNRPC_BC_XPRT_H */