NFS: Enable slot table helpers for NFSv4.0
I'd like to re-use NFSv4.1's slot table machinery for NFSv4.0 transport blocking. Re-organize some of nfs4session.c so the slot table code is built even when NFS_V4_1 is disabled. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:

committed by
Trond Myklebust

parent
220e09ccd3
commit
9d33059c1b
@@ -72,15 +72,24 @@ enum nfs4_session_state {
|
||||
NFS4_SESSION_INITING,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
extern struct nfs4_slot *nfs4_alloc_slot(struct nfs4_slot_table *tbl);
|
||||
extern void nfs4_free_slot(struct nfs4_slot_table *tbl, struct nfs4_slot *slot);
|
||||
|
||||
extern void nfs41_set_target_slotid(struct nfs4_slot_table *tbl,
|
||||
u32 target_highest_slotid);
|
||||
extern void nfs4_slot_tbl_drain_complete(struct nfs4_slot_table *tbl);
|
||||
extern void nfs41_update_target_slotid(struct nfs4_slot_table *tbl,
|
||||
struct nfs4_slot *slot,
|
||||
struct nfs4_sequence_res *res);
|
||||
bool nfs41_wake_and_assign_slot(struct nfs4_slot_table *tbl,
|
||||
struct nfs4_slot *slot);
|
||||
void nfs41_wake_slot_table(struct nfs4_slot_table *tbl);
|
||||
|
||||
static inline bool nfs4_slot_tbl_draining(struct nfs4_slot_table *tbl)
|
||||
{
|
||||
return !!test_bit(NFS4_SLOT_TBL_DRAINING, &tbl->slot_tbl_state);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
extern void nfs41_set_target_slotid(struct nfs4_slot_table *tbl,
|
||||
u32 target_highest_slotid);
|
||||
|
||||
extern int nfs4_setup_session_slot_tables(struct nfs4_session *ses);
|
||||
|
||||
@@ -89,17 +98,6 @@ extern void nfs4_destroy_session(struct nfs4_session *session);
|
||||
extern int nfs4_init_session(struct nfs_client *clp);
|
||||
extern int nfs4_init_ds_session(struct nfs_client *, unsigned long);
|
||||
|
||||
extern void nfs4_slot_tbl_drain_complete(struct nfs4_slot_table *tbl);
|
||||
|
||||
static inline bool nfs4_slot_tbl_draining(struct nfs4_slot_table *tbl)
|
||||
{
|
||||
return !!test_bit(NFS4_SLOT_TBL_DRAINING, &tbl->slot_tbl_state);
|
||||
}
|
||||
|
||||
bool nfs41_wake_and_assign_slot(struct nfs4_slot_table *tbl,
|
||||
struct nfs4_slot *slot);
|
||||
void nfs41_wake_slot_table(struct nfs4_slot_table *tbl);
|
||||
|
||||
/*
|
||||
* Determine if sessions are in use.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user