diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-11-23 19:09:38 +0100 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-12-06 00:30:44 +0100 |
commit | 5d63360dd8daffc2bc86531e9a44ff9d4881b102 (patch) | |
tree | 6fdad98cdfbbe3830d8cc3679c435ed8c8be0606 /fs/nfs/nfs4_fs.h | |
parent | NFSv4.1: If slot allocation fails due to OOM, retry more quickly (diff) | |
download | linux-5d63360dd8daffc2bc86531e9a44ff9d4881b102.tar.xz linux-5d63360dd8daffc2bc86531e9a44ff9d4881b102.zip |
NFSv4.1: Clean up session draining
Coalesce nfs4_check_drain_bc_complete and nfs4_check_drain_fc_complete
into a single function that can be called when the slot table is known
to be empty, then change nfs4_callback_free_slot() and nfs4_free_slot()
to use it.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4_fs.h')
-rw-r--r-- | fs/nfs/nfs4_fs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 0a109ec75e69..16b19372c4ba 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h @@ -335,6 +335,14 @@ int nfs41_discover_server_trunking(struct nfs_client *clp, struct nfs_client **, struct rpc_cred *); extern void nfs4_schedule_session_recovery(struct nfs4_session *, int); extern void nfs41_server_notify_target_slotid_update(struct nfs_client *clp); + +extern void nfs4_session_drain_complete(struct nfs4_session *session, + struct nfs4_slot_table *tbl); + +static inline bool nfs4_session_draining(struct nfs4_session *session) +{ + return !!test_bit(NFS4_SESSION_DRAINING, &session->session_state); +} #else static inline void nfs4_schedule_session_recovery(struct nfs4_session *session, int err) { |