4 #include <linux/list.h>
7 #include <linux/wait.h>
19 struct nfs4_minor_version_ops;
20 struct nfs41_server_scope;
30 #define NFS_CS_READY 0
31 #define NFS_CS_INITING 1
32 #define NFS_CS_SESSION_INITING 2
34 #define NFS_CS_CALLBACK 1
35 #define NFS_CS_IDMAP 2
36 #define NFS_CS_RENEWD 3
37 #define NFS_CS_STOP_RENEW 4
38 #define NFS_CS_CHECK_LEASE_TIME 5
40 #define NFS_CS_NORESVPORT 0
41 #define NFS_CS_DISCRTRY 1
42 #define NFS_CS_MIGRATION 2
57 #if IS_ENABLED(CONFIG_NFS_V4)
60 unsigned long cl_state;
64 unsigned long cl_lease_time;
65 unsigned long cl_last_renewal;
71 struct idmap * cl_idmap;
78 const struct nfs4_minor_version_ops *cl_mvops;
83 u32 cl_exchange_flags;
84 struct nfs4_session *cl_session;
85 bool cl_preserve_clid;
86 struct nfs41_server_owner *cl_serverowner;
87 struct nfs41_server_scope *cl_serverscope;
88 struct nfs41_impl_id *cl_implid;
91 #ifdef CONFIG_NFS_FSCACHE
129 #define NFS_OPTION_FSCACHE 0x00000001
130 #define NFS_OPTION_MIGRATION 0x00000002
138 #ifdef CONFIG_NFS_FSCACHE
139 struct nfs_fscache_key *fscache_key;
144 #if IS_ENABLED(CONFIG_NFS_V4)
148 u32 cache_consistency_bitmask[2];
159 struct pnfs_layoutdriver_type *pnfs_curr_ld;
184 #define NFS_CAP_READDIRPLUS (1U << 0)
185 #define NFS_CAP_HARDLINKS (1U << 1)
186 #define NFS_CAP_SYMLINKS (1U << 2)
187 #define NFS_CAP_ACLS (1U << 3)
188 #define NFS_CAP_ATOMIC_OPEN (1U << 4)
189 #define NFS_CAP_CHANGE_ATTR (1U << 5)
190 #define NFS_CAP_FILEID (1U << 6)
191 #define NFS_CAP_MODE (1U << 7)
192 #define NFS_CAP_NLINK (1U << 8)
193 #define NFS_CAP_OWNER (1U << 9)
194 #define NFS_CAP_OWNER_GROUP (1U << 10)
195 #define NFS_CAP_ATIME (1U << 11)
196 #define NFS_CAP_CTIME (1U << 12)
197 #define NFS_CAP_MTIME (1U << 13)
198 #define NFS_CAP_POSIX_LOCK (1U << 14)
199 #define NFS_CAP_UIDGID_NOMAP (1U << 15)
203 #define NFS4_DEF_SLOT_TABLE_SIZE (16U)
204 #define NFS4_MAX_SLOT_TABLE (256U)
205 #define NFS4_NO_SLOT ((u32)-1)
207 #if IS_ENABLED(CONFIG_NFS_V4)
210 #define SLOT_TABLE_SZ DIV_ROUND_UP(NFS4_MAX_SLOT_TABLE, 8*sizeof(long))
211 struct nfs4_slot_table {
213 unsigned long used_slots[SLOT_TABLE_SZ];
217 u32 highest_used_slotid;
219 u32 target_max_slots;
224 static inline int slot_idx(
struct nfs4_slot_table *tbl,
struct nfs4_slot *
sp)
226 return sp - tbl->slots;
232 struct nfs4_session {
235 unsigned long session_state;
241 struct nfs4_slot_table fc_slot_table;
243 struct nfs4_slot_table bc_slot_table;