summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmcommon.h
diff options
context:
space:
mode:
authorMark Fasheh <mark.fasheh@oracle.com>2006-03-10 02:55:56 +0100
committerMark Fasheh <mark.fasheh@oracle.com>2006-06-26 23:42:39 +0200
commita3d3329159ea76bae0b3b8680691a1c3ecf5801f (patch)
treea4521103c45190ff340f918d131649a20b414b27 /fs/ocfs2/dlm/dlmcommon.h
parentocfs2: move lockres qstr next to hlist_node structure (diff)
downloadlinux-a3d3329159ea76bae0b3b8680691a1c3ecf5801f.tar.xz
linux-a3d3329159ea76bae0b3b8680691a1c3ecf5801f.zip
ocfs2: calculate lockid hash values outside of the spinlock
Fixes a performance bug - pointed out by Andrew. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmcommon.h')
-rw-r--r--fs/ocfs2/dlm/dlmcommon.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h
index 1c05d485e019..3b675368762e 100644
--- a/fs/ocfs2/dlm/dlmcommon.h
+++ b/fs/ocfs2/dlm/dlmcommon.h
@@ -39,6 +39,9 @@
#define DLM_HASH_BUCKETS (PAGE_SIZE / sizeof(struct hlist_head))
+/* Intended to make it easier for us to switch out hash functions */
+#define dlm_lockid_hash(_n, _l) full_name_hash(_n, _l)
+
enum dlm_ast_type {
DLM_AST = 0,
DLM_BAST,
@@ -694,7 +697,8 @@ void __dlm_insert_lockres(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res);
struct dlm_lock_resource * __dlm_lookup_lockres(struct dlm_ctxt *dlm,
const char *name,
- unsigned int len);
+ unsigned int len,
+ unsigned int hash);
struct dlm_lock_resource * dlm_lookup_lockres(struct dlm_ctxt *dlm,
const char *name,
unsigned int len);