14ce79717STrond Myklebust /* 24ce79717STrond Myklebust * linux/fs/nfs/nfs4_fs.h 34ce79717STrond Myklebust * 44ce79717STrond Myklebust * Copyright (C) 2005 Trond Myklebust 54ce79717STrond Myklebust * 64ce79717STrond Myklebust * NFSv4-specific filesystem definitions and declarations 74ce79717STrond Myklebust */ 84ce79717STrond Myklebust 94ce79717STrond Myklebust #ifndef __LINUX_FS_NFS_NFS4_FS_H 104ce79717STrond Myklebust #define __LINUX_FS_NFS_NFS4_FS_H 114ce79717STrond Myklebust 124ce79717STrond Myklebust #ifdef CONFIG_NFS_V4 134ce79717STrond Myklebust 144ce79717STrond Myklebust struct idmap; 154ce79717STrond Myklebust 164ce79717STrond Myklebust /* 174ce79717STrond Myklebust * In a seqid-mutating op, this macro controls which error return 184ce79717STrond Myklebust * values trigger incrementation of the seqid. 194ce79717STrond Myklebust * 204ce79717STrond Myklebust * from rfc 3010: 214ce79717STrond Myklebust * The client MUST monotonically increment the sequence number for the 224ce79717STrond Myklebust * CLOSE, LOCK, LOCKU, OPEN, OPEN_CONFIRM, and OPEN_DOWNGRADE 234ce79717STrond Myklebust * operations. This is true even in the event that the previous 244ce79717STrond Myklebust * operation that used the sequence number received an error. The only 254ce79717STrond Myklebust * exception to this rule is if the previous operation received one of 264ce79717STrond Myklebust * the following errors: NFSERR_STALE_CLIENTID, NFSERR_STALE_STATEID, 274ce79717STrond Myklebust * NFSERR_BAD_STATEID, NFSERR_BAD_SEQID, NFSERR_BADXDR, 284ce79717STrond Myklebust * NFSERR_RESOURCE, NFSERR_NOFILEHANDLE. 294ce79717STrond Myklebust * 304ce79717STrond Myklebust */ 314ce79717STrond Myklebust #define seqid_mutating_err(err) \ 324ce79717STrond Myklebust (((err) != NFSERR_STALE_CLIENTID) && \ 334ce79717STrond Myklebust ((err) != NFSERR_STALE_STATEID) && \ 344ce79717STrond Myklebust ((err) != NFSERR_BAD_STATEID) && \ 354ce79717STrond Myklebust ((err) != NFSERR_BAD_SEQID) && \ 364ce79717STrond Myklebust ((err) != NFSERR_BAD_XDR) && \ 374ce79717STrond Myklebust ((err) != NFSERR_RESOURCE) && \ 384ce79717STrond Myklebust ((err) != NFSERR_NOFILEHANDLE)) 394ce79717STrond Myklebust 404ce79717STrond Myklebust enum nfs4_client_state { 41e005e804STrond Myklebust NFS4CLNT_MANAGER_RUNNING = 0, 42e598d843STrond Myklebust NFS4CLNT_CHECK_LEASE, 4358d9714aSTrond Myklebust NFS4CLNT_LEASE_EXPIRED, 44b79a4a1bSTrond Myklebust NFS4CLNT_RECLAIM_REBOOT, 45b79a4a1bSTrond Myklebust NFS4CLNT_RECLAIM_NOGRACE, 46707fb4b3STrond Myklebust NFS4CLNT_DELEGRETURN, 4743f1b3daSFred Isaman NFS4CLNT_LAYOUTRECALL, 486df08189SAndy Adamson NFS4CLNT_SESSION_RESET, 49b9efa1b2SAndy Adamson NFS4CLNT_RECALL_SLOT, 504ce79717STrond Myklebust }; 514ce79717STrond Myklebust 52a2118c33STrond Myklebust enum nfs4_session_state { 531055d76dSTrond Myklebust NFS4_SESSION_INITING, 54a2118c33STrond Myklebust NFS4_SESSION_DRAINING, 55a2118c33STrond Myklebust }; 56a2118c33STrond Myklebust 5797dc1359STrond Myklebust struct nfs4_minor_version_ops { 5897dc1359STrond Myklebust u32 minor_version; 5997dc1359STrond Myklebust 6097dc1359STrond Myklebust int (*call_sync)(struct nfs_server *server, 6197dc1359STrond Myklebust struct rpc_message *msg, 6297dc1359STrond Myklebust struct nfs4_sequence_args *args, 6397dc1359STrond Myklebust struct nfs4_sequence_res *res, 6497dc1359STrond Myklebust int cache_reply); 65e047a10cSTrond Myklebust int (*validate_stateid)(struct nfs_delegation *, 66e047a10cSTrond Myklebust const nfs4_stateid *); 67c48f4f35STrond Myklebust const struct nfs4_state_recovery_ops *reboot_recovery_ops; 68c48f4f35STrond Myklebust const struct nfs4_state_recovery_ops *nograce_recovery_ops; 69c48f4f35STrond Myklebust const struct nfs4_state_maintenance_ops *state_renewal_ops; 7097dc1359STrond Myklebust }; 7197dc1359STrond Myklebust 724ce79717STrond Myklebust /* 73cee54fc9STrond Myklebust * struct rpc_sequence ensures that RPC calls are sent in the exact 74cee54fc9STrond Myklebust * order that they appear on the list. 75cee54fc9STrond Myklebust */ 76cee54fc9STrond Myklebust struct rpc_sequence { 77cee54fc9STrond Myklebust struct rpc_wait_queue wait; /* RPC call delay queue */ 78cee54fc9STrond Myklebust spinlock_t lock; /* Protects the list */ 79cee54fc9STrond Myklebust struct list_head list; /* Defines sequence of RPC calls */ 80cee54fc9STrond Myklebust }; 81cee54fc9STrond Myklebust 82cee54fc9STrond Myklebust #define NFS_SEQID_CONFIRMED 1 83cee54fc9STrond Myklebust struct nfs_seqid_counter { 84cee54fc9STrond Myklebust struct rpc_sequence *sequence; 85cee54fc9STrond Myklebust int flags; 86cee54fc9STrond Myklebust u32 counter; 87cee54fc9STrond Myklebust }; 88cee54fc9STrond Myklebust 89cee54fc9STrond Myklebust struct nfs_seqid { 90cee54fc9STrond Myklebust struct nfs_seqid_counter *sequence; 914e51336aSTrond Myklebust struct list_head list; 92cee54fc9STrond Myklebust }; 93cee54fc9STrond Myklebust 94cee54fc9STrond Myklebust static inline void nfs_confirm_seqid(struct nfs_seqid_counter *seqid, int status) 95cee54fc9STrond Myklebust { 96cee54fc9STrond Myklebust if (seqid_mutating_err(-status)) 97cee54fc9STrond Myklebust seqid->flags |= NFS_SEQID_CONFIRMED; 98cee54fc9STrond Myklebust } 99cee54fc9STrond Myklebust 1009f958ab8STrond Myklebust struct nfs_unique_id { 1019f958ab8STrond Myklebust struct rb_node rb_node; 1029f958ab8STrond Myklebust __u64 id; 1039f958ab8STrond Myklebust }; 1049f958ab8STrond Myklebust 105cee54fc9STrond Myklebust /* 1064ce79717STrond Myklebust * NFS4 state_owners and lock_owners are simply labels for ordered 1074ce79717STrond Myklebust * sequences of RPC calls. Their sole purpose is to provide once-only 1084ce79717STrond Myklebust * semantics by allowing the server to identify replayed requests. 1094ce79717STrond Myklebust */ 1104ce79717STrond Myklebust struct nfs4_state_owner { 1119f958ab8STrond Myklebust struct nfs_unique_id so_owner_id; 1126f2e64d3STrond Myklebust struct nfs_server *so_server; 1139f958ab8STrond Myklebust struct rb_node so_client_node; 1144ce79717STrond Myklebust 1154ce79717STrond Myklebust struct rpc_cred *so_cred; /* Associated cred */ 1169f958ab8STrond Myklebust 1179f958ab8STrond Myklebust spinlock_t so_lock; 1189f958ab8STrond Myklebust atomic_t so_count; 1197eff03aeSTrond Myklebust unsigned long so_flags; 1204ce79717STrond Myklebust struct list_head so_states; 121cee54fc9STrond Myklebust struct nfs_seqid_counter so_seqid; 122cee54fc9STrond Myklebust struct rpc_sequence so_sequence; 1234ce79717STrond Myklebust }; 1244ce79717STrond Myklebust 1257eff03aeSTrond Myklebust enum { 1267eff03aeSTrond Myklebust NFS_OWNER_RECLAIM_REBOOT, 1277eff03aeSTrond Myklebust NFS_OWNER_RECLAIM_NOGRACE 1287eff03aeSTrond Myklebust }; 1297eff03aeSTrond Myklebust 130afe6c27cSAlexandros Batsakis #define NFS_LOCK_NEW 0 131afe6c27cSAlexandros Batsakis #define NFS_LOCK_RECLAIM 1 132afe6c27cSAlexandros Batsakis #define NFS_LOCK_EXPIRED 2 133afe6c27cSAlexandros Batsakis 1344ce79717STrond Myklebust /* 1354ce79717STrond Myklebust * struct nfs4_state maintains the client-side state for a given 1364ce79717STrond Myklebust * (state_owner,inode) tuple (OPEN) or state_owner (LOCK). 1374ce79717STrond Myklebust * 1384ce79717STrond Myklebust * OPEN: 1394ce79717STrond Myklebust * In order to know when to OPEN_DOWNGRADE or CLOSE the state on the server, 1404ce79717STrond Myklebust * we need to know how many files are open for reading or writing on a 1414ce79717STrond Myklebust * given inode. This information too is stored here. 1424ce79717STrond Myklebust * 1434ce79717STrond Myklebust * LOCK: one nfs4_state (LOCK) to hold the lock stateid nfs4_state(OPEN) 1444ce79717STrond Myklebust */ 1454ce79717STrond Myklebust 14677041ed9STrond Myklebust struct nfs4_lock_owner { 14777041ed9STrond Myklebust unsigned int lo_type; 14877041ed9STrond Myklebust #define NFS4_ANY_LOCK_TYPE (0U) 14977041ed9STrond Myklebust #define NFS4_FLOCK_LOCK_TYPE (1U << 0) 15077041ed9STrond Myklebust #define NFS4_POSIX_LOCK_TYPE (1U << 1) 15177041ed9STrond Myklebust union { 15277041ed9STrond Myklebust fl_owner_t posix_owner; 15377041ed9STrond Myklebust pid_t flock_owner; 15477041ed9STrond Myklebust } lo_u; 15577041ed9STrond Myklebust }; 15677041ed9STrond Myklebust 1574ce79717STrond Myklebust struct nfs4_lock_state { 1584ce79717STrond Myklebust struct list_head ls_locks; /* Other lock stateids */ 1598d0a8a9dSTrond Myklebust struct nfs4_state * ls_state; /* Pointer to open state */ 1604ce79717STrond Myklebust #define NFS_LOCK_INITIALIZED 1 1614ce79717STrond Myklebust int ls_flags; 162cee54fc9STrond Myklebust struct nfs_seqid_counter ls_seqid; 163d0dc3701STrond Myklebust struct rpc_sequence ls_sequence; 1649f958ab8STrond Myklebust struct nfs_unique_id ls_id; 1654ce79717STrond Myklebust nfs4_stateid ls_stateid; 1664ce79717STrond Myklebust atomic_t ls_count; 16777041ed9STrond Myklebust struct nfs4_lock_owner ls_owner; 1684ce79717STrond Myklebust }; 1694ce79717STrond Myklebust 1704ce79717STrond Myklebust /* bits for nfs4_state->flags */ 1714ce79717STrond Myklebust enum { 1724ce79717STrond Myklebust LK_STATE_IN_USE, 173003707c7STrond Myklebust NFS_DELEGATED_STATE, /* Current stateid is delegation */ 174003707c7STrond Myklebust NFS_O_RDONLY_STATE, /* OPEN stateid has read-only state */ 175003707c7STrond Myklebust NFS_O_WRONLY_STATE, /* OPEN stateid has write-only state */ 176003707c7STrond Myklebust NFS_O_RDWR_STATE, /* OPEN stateid has read/write state */ 177b79a4a1bSTrond Myklebust NFS_STATE_RECLAIM_REBOOT, /* OPEN stateid server rebooted */ 178b79a4a1bSTrond Myklebust NFS_STATE_RECLAIM_NOGRACE, /* OPEN stateid needs to recover state */ 1798e469ebdSTrond Myklebust NFS_STATE_POSIX_LOCKS, /* Posix locks are supported */ 1804ce79717STrond Myklebust }; 1814ce79717STrond Myklebust 1824ce79717STrond Myklebust struct nfs4_state { 1834ce79717STrond Myklebust struct list_head open_states; /* List of states for the same state_owner */ 1844ce79717STrond Myklebust struct list_head inode_states; /* List of states for the same inode */ 1854ce79717STrond Myklebust struct list_head lock_states; /* List of subservient lock stateids */ 1864ce79717STrond Myklebust 1874ce79717STrond Myklebust struct nfs4_state_owner *owner; /* Pointer to the open owner */ 1884ce79717STrond Myklebust struct inode *inode; /* Pointer to the inode */ 1894ce79717STrond Myklebust 1904ce79717STrond Myklebust unsigned long flags; /* Do we hold any locks? */ 1918d0a8a9dSTrond Myklebust spinlock_t state_lock; /* Protects the lock_states list */ 1924ce79717STrond Myklebust 1938bda4e4cSTrond Myklebust seqlock_t seqlock; /* Protects the stateid/open_stateid */ 194003707c7STrond Myklebust nfs4_stateid stateid; /* Current stateid: may be delegation */ 195003707c7STrond Myklebust nfs4_stateid open_stateid; /* OPEN stateid */ 1964ce79717STrond Myklebust 1978bda4e4cSTrond Myklebust /* The following 3 fields are protected by owner->so_lock */ 198003707c7STrond Myklebust unsigned int n_rdonly; /* Number of read-only references */ 199003707c7STrond Myklebust unsigned int n_wronly; /* Number of write-only references */ 200003707c7STrond Myklebust unsigned int n_rdwr; /* Number of read/write references */ 201dc0b027dSTrond Myklebust fmode_t state; /* State on the server (R,W, or RW) */ 2024ce79717STrond Myklebust atomic_t count; 2034ce79717STrond Myklebust }; 2044ce79717STrond Myklebust 2054ce79717STrond Myklebust 2064ce79717STrond Myklebust struct nfs4_exception { 2074ce79717STrond Myklebust long timeout; 2084ce79717STrond Myklebust int retry; 2099e33bed5STrond Myklebust struct nfs4_state *state; 2104ce79717STrond Myklebust }; 2114ce79717STrond Myklebust 2124ce79717STrond Myklebust struct nfs4_state_recovery_ops { 2137eff03aeSTrond Myklebust int owner_flag_bit; 214b79a4a1bSTrond Myklebust int state_flag_bit; 2154ce79717STrond Myklebust int (*recover_open)(struct nfs4_state_owner *, struct nfs4_state *); 2164ce79717STrond Myklebust int (*recover_lock)(struct nfs4_state *, struct file_lock *); 217591d71cbSAndy Adamson int (*establish_clid)(struct nfs_client *, struct rpc_cred *); 21890a16617SAndy Adamson struct rpc_cred * (*get_clid_cred)(struct nfs_client *); 219fce5c838SRicardo Labiaga int (*reclaim_complete)(struct nfs_client *); 2204ce79717STrond Myklebust }; 2214ce79717STrond Myklebust 22229fba38bSBenny Halevy struct nfs4_state_maintenance_ops { 22329fba38bSBenny Halevy int (*sched_state_renewal)(struct nfs_client *, struct rpc_cred *); 224a7b72103SAndy Adamson struct rpc_cred * (*get_state_renewal_cred_locked)(struct nfs_client *); 2258e69514fSBenny Halevy int (*renew_lease)(struct nfs_client *, struct rpc_cred *); 22629fba38bSBenny Halevy }; 22729fba38bSBenny Halevy 228f786aa90SAl Viro extern const struct dentry_operations nfs4_dentry_operations; 22992e1d5beSArjan van de Ven extern const struct inode_operations nfs4_dir_inode_operations; 2306b3b5496SJ. Bruce Fields 2314ce79717STrond Myklebust /* nfs4proc.c */ 232bb8b27e5STrond Myklebust extern int nfs4_proc_setclientid(struct nfs_client *, u32, unsigned short, struct rpc_cred *, struct nfs4_setclientid_res *); 233bb8b27e5STrond Myklebust extern int nfs4_proc_setclientid_confirm(struct nfs_client *, struct nfs4_setclientid_res *arg, struct rpc_cred *); 2344d643d1dSAndy Adamson extern int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred); 235adfa6f98SDavid Howells extern int nfs4_proc_async_renew(struct nfs_client *, struct rpc_cred *); 236adfa6f98SDavid Howells extern int nfs4_proc_renew(struct nfs_client *, struct rpc_cred *); 237591d71cbSAndy Adamson extern int nfs4_init_clientid(struct nfs_client *, struct rpc_cred *); 2384d643d1dSAndy Adamson extern int nfs41_init_clientid(struct nfs_client *, struct rpc_cred *); 2398535b2beSTrond Myklebust extern int nfs4_do_close(struct path *path, struct nfs4_state *state, gfp_t gfp_mask, int wait); 24055a97593STrond Myklebust extern int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle); 24156659e99STrond Myklebust extern int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name, 2427aaa0b3bSManoj Naik struct nfs4_fs_locations *fs_locations, struct page *page); 243d3c7b7ccSTrond Myklebust extern void nfs4_release_lockowner(const struct nfs4_lock_state *); 24464c2ce8bSAneesh Kumar K.V extern const struct xattr_handler *nfs4_xattr_handlers[]; 2454ce79717STrond Myklebust 246557134a3SAndy Adamson #if defined(CONFIG_NFS_V4_1) 247035168abSTrond Myklebust static inline struct nfs4_session *nfs4_get_session(const struct nfs_server *server) 248035168abSTrond Myklebust { 249035168abSTrond Myklebust return server->nfs_client->cl_session; 250035168abSTrond Myklebust } 251035168abSTrond Myklebust 252035168abSTrond Myklebust extern int nfs4_setup_sequence(const struct nfs_server *server, 253fbcd4abcSAndy Adamson struct nfs4_sequence_args *args, struct nfs4_sequence_res *res, 254fbcd4abcSAndy Adamson int cache_reply, struct rpc_task *task); 255557134a3SAndy Adamson extern void nfs4_destroy_session(struct nfs4_session *session); 256557134a3SAndy Adamson extern struct nfs4_session *nfs4_alloc_session(struct nfs_client *clp); 257f26468fbSTrond Myklebust extern int nfs4_proc_create_session(struct nfs_client *); 258c3fad1b1SAndy Adamson extern int nfs4_proc_destroy_session(struct nfs4_session *); 259fccba804STrond Myklebust extern int nfs4_init_session(struct nfs_server *server); 2609430fb6bSRicardo Labiaga extern int nfs4_proc_get_lease_time(struct nfs_client *clp, 2619430fb6bSRicardo Labiaga struct nfs_fsinfo *fsinfo); 262fbcd4abcSAndy Adamson #else /* CONFIG_NFS_v4_1 */ 263035168abSTrond Myklebust static inline struct nfs4_session *nfs4_get_session(const struct nfs_server *server) 264035168abSTrond Myklebust { 265035168abSTrond Myklebust return NULL; 266035168abSTrond Myklebust } 267035168abSTrond Myklebust 268035168abSTrond Myklebust static inline int nfs4_setup_sequence(const struct nfs_server *server, 269fbcd4abcSAndy Adamson struct nfs4_sequence_args *args, struct nfs4_sequence_res *res, 270fbcd4abcSAndy Adamson int cache_reply, struct rpc_task *task) 271fbcd4abcSAndy Adamson { 272fbcd4abcSAndy Adamson return 0; 273fbcd4abcSAndy Adamson } 274fccba804STrond Myklebust 275fccba804STrond Myklebust static inline int nfs4_init_session(struct nfs_server *server) 276fccba804STrond Myklebust { 277fccba804STrond Myklebust return 0; 278fccba804STrond Myklebust } 279557134a3SAndy Adamson #endif /* CONFIG_NFS_V4_1 */ 2804ce79717STrond Myklebust 28197dc1359STrond Myklebust extern const struct nfs4_minor_version_ops *nfs_v4_minor_ops[]; 28229fba38bSBenny Halevy 2834ce79717STrond Myklebust extern const u32 nfs4_fattr_bitmap[2]; 2844ce79717STrond Myklebust extern const u32 nfs4_statfs_bitmap[2]; 2854ce79717STrond Myklebust extern const u32 nfs4_pathconf_bitmap[2]; 2864ce79717STrond Myklebust extern const u32 nfs4_fsinfo_bitmap[2]; 287830b8e33SManoj Naik extern const u32 nfs4_fs_locations_bitmap[2]; 2884ce79717STrond Myklebust 2894ce79717STrond Myklebust /* nfs4renewd.c */ 290adfa6f98SDavid Howells extern void nfs4_schedule_state_renewal(struct nfs_client *); 2914ce79717STrond Myklebust extern void nfs4_renewd_prepare_shutdown(struct nfs_server *); 292adfa6f98SDavid Howells extern void nfs4_kill_renewd(struct nfs_client *); 29365f27f38SDavid Howells extern void nfs4_renew_state(struct work_struct *); 2944ce79717STrond Myklebust 2954ce79717STrond Myklebust /* nfs4state.c */ 296a7b72103SAndy Adamson struct rpc_cred *nfs4_get_setclientid_cred(struct nfs_client *clp); 2976dc9d57aSTrond Myklebust struct rpc_cred *nfs4_get_renew_cred_locked(struct nfs_client *clp); 298a7b72103SAndy Adamson #if defined(CONFIG_NFS_V4_1) 299a7b72103SAndy Adamson struct rpc_cred *nfs4_get_machine_cred_locked(struct nfs_client *clp); 300b4b82607SAndy Adamson struct rpc_cred *nfs4_get_exchange_id_cred(struct nfs_client *clp); 301a7b72103SAndy Adamson #endif /* CONFIG_NFS_V4_1 */ 3024ce79717STrond Myklebust 3034ce79717STrond Myklebust extern struct nfs4_state_owner * nfs4_get_state_owner(struct nfs_server *, struct rpc_cred *); 3044ce79717STrond Myklebust extern void nfs4_put_state_owner(struct nfs4_state_owner *); 3054ce79717STrond Myklebust extern struct nfs4_state * nfs4_get_open_state(struct inode *, struct nfs4_state_owner *); 3064ce79717STrond Myklebust extern void nfs4_put_open_state(struct nfs4_state *); 307dc0b027dSTrond Myklebust extern void nfs4_close_state(struct path *, struct nfs4_state *, fmode_t); 308dc0b027dSTrond Myklebust extern void nfs4_close_sync(struct path *, struct nfs4_state *, fmode_t); 309dc0b027dSTrond Myklebust extern void nfs4_state_set_mode_locked(struct nfs4_state *, fmode_t); 310adfa6f98SDavid Howells extern void nfs4_schedule_state_recovery(struct nfs_client *); 311b0d3ded1STrond Myklebust extern void nfs4_schedule_state_manager(struct nfs_client *); 3129e33bed5STrond Myklebust extern int nfs4_state_mark_reclaim_nograce(struct nfs_client *clp, struct nfs4_state *state); 313a2c0b9e2STrond Myklebust extern int nfs4_state_mark_reclaim_reboot(struct nfs_client *clp, struct nfs4_state *state); 3140629e370SAlexandros Batsakis extern void nfs41_handle_sequence_flag_errors(struct nfs_client *clp, u32 flags); 315b9efa1b2SAndy Adamson extern void nfs41_handle_recall_slot(struct nfs_client *clp); 316faf5f49cSTrond Myklebust extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp); 3178d0a8a9dSTrond Myklebust extern int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl); 31877041ed9STrond Myklebust extern void nfs4_copy_stateid(nfs4_stateid *, struct nfs4_state *, fl_owner_t, pid_t); 3194ce79717STrond Myklebust 3208535b2beSTrond Myklebust extern struct nfs_seqid *nfs_alloc_seqid(struct nfs_seqid_counter *counter, gfp_t gfp_mask); 321cee54fc9STrond Myklebust extern int nfs_wait_on_sequence(struct nfs_seqid *seqid, struct rpc_task *task); 322cee54fc9STrond Myklebust extern void nfs_increment_open_seqid(int status, struct nfs_seqid *seqid); 323cee54fc9STrond Myklebust extern void nfs_increment_lock_seqid(int status, struct nfs_seqid *seqid); 32472211dbeSTrond Myklebust extern void nfs_release_seqid(struct nfs_seqid *seqid); 325cee54fc9STrond Myklebust extern void nfs_free_seqid(struct nfs_seqid *seqid); 326cee54fc9STrond Myklebust 3274ce79717STrond Myklebust extern const nfs4_stateid zero_stateid; 3284ce79717STrond Myklebust 3294ce79717STrond Myklebust /* nfs4xdr.c */ 3304ce79717STrond Myklebust extern struct rpc_procinfo nfs4_procedures[]; 3314ce79717STrond Myklebust 3324ce79717STrond Myklebust struct nfs4_mount_data; 3334ce79717STrond Myklebust 3344ce79717STrond Myklebust /* callback_xdr.c */ 3354ce79717STrond Myklebust extern struct svc_version nfs4_callback_version1; 33607bccc2dSAlexandros Batsakis extern struct svc_version nfs4_callback_version4; 3374ce79717STrond Myklebust 3384ce79717STrond Myklebust #else 3394ce79717STrond Myklebust 3404a35bd41STrond Myklebust #define nfs4_close_state(a, b, c) do { } while (0) 341e9a40458SOlof Johansson #define nfs4_close_sync(a, b, c) do { } while (0) 3424ce79717STrond Myklebust 3434ce79717STrond Myklebust #endif /* CONFIG_NFS_V4 */ 3444ce79717STrond Myklebust #endif /* __LINUX_FS_NFS_NFS4_FS.H */ 345