diff options
author | David Teigland <teigland@redhat.com> | 2012-05-10 10:18:07 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2012-07-16 14:16:19 -0500 |
commit | c04fecb4d9f7753e0cbff7edd03ec68f8721cdce (patch) | |
tree | ecd82017d49c7bb03b96a8ad1eb4e9a5bb84409a /fs/dlm/lock.h | |
parent | ecc728467fb0c3e350b57fc66ed7585c15be50f5 (diff) | |
download | op-kernel-dev-c04fecb4d9f7753e0cbff7edd03ec68f8721cdce.zip op-kernel-dev-c04fecb4d9f7753e0cbff7edd03ec68f8721cdce.tar.gz |
dlm: use rsbtbl as resource directory
Remove the dir hash table (dirtbl), and use
the rsb hash table (rsbtbl) as the resource
directory. It has always been an unnecessary
duplication of information.
This improves efficiency by using a single rsbtbl
lookup in many cases where both rsbtbl and dirtbl
lookups were needed previously.
This eliminates the need to handle cases of rsbtbl
and dirtbl being out of sync.
In many cases there will be memory savings because
the dir hash table no longer exists.
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/lock.h')
-rw-r--r-- | fs/dlm/lock.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/dlm/lock.h b/fs/dlm/lock.h index c8b226c..5e0c72e 100644 --- a/fs/dlm/lock.h +++ b/fs/dlm/lock.h @@ -14,6 +14,7 @@ #define __LOCK_DOT_H__ void dlm_dump_rsb(struct dlm_rsb *r); +void dlm_dump_rsb_name(struct dlm_ls *ls, char *name, int len); void dlm_print_lkb(struct dlm_lkb *lkb); void dlm_receive_message_saved(struct dlm_ls *ls, struct dlm_message *ms, uint32_t saved_seq); @@ -28,9 +29,11 @@ void dlm_unlock_recovery(struct dlm_ls *ls); void dlm_scan_waiters(struct dlm_ls *ls); void dlm_scan_timeout(struct dlm_ls *ls); void dlm_adjust_timeouts(struct dlm_ls *ls); +int dlm_master_lookup(struct dlm_ls *ls, int nodeid, char *name, int len, + unsigned int flags, int *r_nodeid, int *result); int dlm_search_rsb_tree(struct rb_root *tree, char *name, int len, - unsigned int flags, struct dlm_rsb **r_ret); + struct dlm_rsb **r_ret); void dlm_recover_purge(struct dlm_ls *ls); void dlm_purge_mstcpy_locks(struct dlm_rsb *r); |