hc
2024-05-10 ee930fffee469d076998274a2ca55e13dc1efb67
kernel/include/linux/nfs_fs_sb.h
....@@ -45,6 +45,9 @@
4545 #define NFS_CS_INFINITE_SLOTS 3 /* - don't limit TCP slots */
4646 #define NFS_CS_NO_RETRANS_TIMEOUT 4 /* - Disable retransmit timeouts */
4747 #define NFS_CS_TSM_POSSIBLE 5 /* - Maybe state migration */
48
+#define NFS_CS_NOPING 6 /* - don't ping on connect */
49
+#define NFS_CS_DS 7 /* - Server is a DS */
50
+#define NFS_CS_REUSEPORT 8 /* - reuse src port on reconnect */
4851 struct sockaddr_storage cl_addr; /* server identifier */
4952 size_t cl_addrlen;
5053 char * cl_hostname; /* hostname of server */
....@@ -58,7 +61,8 @@
5861 struct nfs_subversion * cl_nfs_mod; /* pointer to nfs version module */
5962
6063 u32 cl_minorversion;/* NFSv4 minorversion */
61
- struct rpc_cred *cl_machine_cred;
64
+ unsigned int cl_nconnect; /* Number of connections */
65
+ const char * cl_principal; /* used for machine cred */
6266
6367 #if IS_ENABLED(CONFIG_NFS_V4)
6468 struct list_head cl_ds_clients; /* auth flavor data servers */
....@@ -139,6 +143,17 @@
139143 struct nfs_iostats __percpu *io_stats; /* I/O statistics */
140144 atomic_long_t writeback; /* number of writeback pages */
141145 int flags; /* various flags */
146
+
147
+/* The following are for internal use only. Also see uapi/linux/nfs_mount.h */
148
+#define NFS_MOUNT_LOOKUP_CACHE_NONEG 0x10000
149
+#define NFS_MOUNT_LOOKUP_CACHE_NONE 0x20000
150
+#define NFS_MOUNT_NORESVPORT 0x40000
151
+#define NFS_MOUNT_LEGACY_INTERFACE 0x80000
152
+#define NFS_MOUNT_LOCAL_FLOCK 0x100000
153
+#define NFS_MOUNT_LOCAL_FCNTL 0x200000
154
+#define NFS_MOUNT_SOFTERR 0x400000
155
+#define NFS_MOUNT_SOFTREVAL 0x800000
156
+
142157 unsigned int caps; /* server capabilities */
143158 unsigned int rsize; /* read size */
144159 unsigned int rpages; /* read size (in pages) */
....@@ -148,6 +163,11 @@
148163 unsigned int dtsize; /* readdir size */
149164 unsigned short port; /* "port=" setting */
150165 unsigned int bsize; /* server block size */
166
+#ifdef CONFIG_NFS_V4_2
167
+ unsigned int gxasize; /* getxattr size */
168
+ unsigned int sxasize; /* setxattr size */
169
+ unsigned int lxasize; /* listxattr size */
170
+#endif
151171 unsigned int acregmin; /* attr cache timeouts */
152172 unsigned int acregmax;
153173 unsigned int acdirmin;
....@@ -160,7 +180,7 @@
160180
161181 struct nfs_fsid fsid;
162182 __u64 maxfilesize; /* maximum file size */
163
- struct timespec time_delta; /* smallest time granularity */
183
+ struct timespec64 time_delta; /* smallest time granularity */
164184 unsigned long mount_time; /* when this fs was mounted */
165185 struct super_block *super; /* VFS super block */
166186 dev_t s_dev; /* superblock dev numbers */
....@@ -228,6 +248,12 @@
228248 unsigned short mountd_port;
229249 unsigned short mountd_protocol;
230250 struct rpc_wait_queue uoc_rpcwaitq;
251
+
252
+ /* XDR related information */
253
+ unsigned int read_hdrsize;
254
+
255
+ /* User namespace info */
256
+ const struct cred *cred;
231257 };
232258
233259 /* Server capabilities */
....@@ -258,5 +284,9 @@
258284 #define NFS_CAP_CLONE (1U << 23)
259285 #define NFS_CAP_COPY (1U << 24)
260286 #define NFS_CAP_OFFLOAD_CANCEL (1U << 25)
287
+#define NFS_CAP_LAYOUTERROR (1U << 26)
288
+#define NFS_CAP_COPY_NOTIFY (1U << 27)
289
+#define NFS_CAP_XATTR (1U << 28)
290
+#define NFS_CAP_READ_PLUS (1U << 29)
261291
262292 #endif