From 2f92ae343e2358a4936c2470debfc4424b29eb3e Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Wed, 14 Aug 2013 17:58:28 -0400 Subject: NFSv4.1: Add tracepoints for debugging slot table operations Add tracepoints to nfs41_setup_sequence and nfs41_sequence_done to track session and slot table state changes. Signed-off-by: Trond Myklebust --- fs/nfs/nfs4session.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'fs/nfs/nfs4session.h') diff --git a/fs/nfs/nfs4session.h b/fs/nfs/nfs4session.h index 86a066926f24..e3e6ce357f69 100644 --- a/fs/nfs/nfs4session.h +++ b/fs/nfs/nfs4session.h @@ -117,6 +117,16 @@ static inline int nfs4_has_persistent_session(const struct nfs_client *clp) return 0; } +#ifdef CONFIG_CRC32 +/* + * nfs_session_id_hash - calculate the crc32 hash for the session id + * @session - pointer to session + */ +#define nfs_session_id_hash(sess_id) \ + (~crc32_le(0xFFFFFFFF, &(sess_id)->data[0], sizeof((sess_id)->data))) +#else +#define nfs_session_id_hash(session) (0) +#endif #else /* defined(CONFIG_NFS_V4_1) */ static inline int nfs4_init_session(struct nfs_client *clp) -- cgit v1.2.2