git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ocfs2/dlm: Improve lockres counts
[pandora-kernel.git]
/
fs
/
ocfs2
/
dlm
/
dlmcommon.h
diff --git
a/fs/ocfs2/dlm/dlmcommon.h
b/fs/ocfs2/dlm/dlmcommon.h
index
bb53714
..
e5026ce
100644
(file)
--- a/
fs/ocfs2/dlm/dlmcommon.h
+++ b/
fs/ocfs2/dlm/dlmcommon.h
@@
-52,16
+52,18
@@
enum dlm_mle_type {
DLM_MLE_BLOCK,
DLM_MLE_MASTER,
enum dlm_mle_type {
DLM_MLE_BLOCK,
DLM_MLE_MASTER,
- DLM_MLE_MIGRATION
+ DLM_MLE_MIGRATION,
+ DLM_MLE_NUM_TYPES
};
struct dlm_lock_name {
};
struct dlm_lock_name {
- u8 len;
- u8 name[DLM_LOCKID_NAME_MAX];
+ unsigned int hash;
+ unsigned int len;
+ unsigned char name[DLM_LOCKID_NAME_MAX];
};
struct dlm_master_list_entry {
};
struct dlm_master_list_entry {
- struct
list_head list
;
+ struct
hlist_node master_hash_node
;
struct list_head hb_events;
struct dlm_ctxt *dlm;
spinlock_t spinlock;
struct list_head hb_events;
struct dlm_ctxt *dlm;
spinlock_t spinlock;
@@
-79,8
+81,8
@@
struct dlm_master_list_entry {
struct o2hb_callback_func mle_hb_up;
struct o2hb_callback_func mle_hb_down;
union {
struct o2hb_callback_func mle_hb_up;
struct o2hb_callback_func mle_hb_down;
union {
- struct dlm_lock_resource *res;
- struct dlm_lock_name name;
+ struct dlm_lock_resource *
mle
res;
+ struct dlm_lock_name
mle
name;
} u;
};
} u;
};
@@
-151,13
+153,14
@@
struct dlm_ctxt
unsigned long recovery_map[BITS_TO_LONGS(O2NM_MAX_NODES)];
struct dlm_recovery_ctxt reco;
spinlock_t master_lock;
unsigned long recovery_map[BITS_TO_LONGS(O2NM_MAX_NODES)];
struct dlm_recovery_ctxt reco;
spinlock_t master_lock;
- struct
list_head master_list
;
+ struct
hlist_head **master_hash
;
struct list_head mle_hb_events;
/* these give a really vague idea of the system load */
struct list_head mle_hb_events;
/* these give a really vague idea of the system load */
- atomic_t local_resources;
- atomic_t remote_resources;
- atomic_t unknown_resources;
+ atomic_t mle_tot_count[DLM_MLE_NUM_TYPES];
+ atomic_t mle_cur_count[DLM_MLE_NUM_TYPES];
+ atomic_t res_tot_count;
+ atomic_t res_cur_count;
struct dlm_debug_ctxt *dlm_debug_ctxt;
struct dentry *dlm_debugfs_subroot;
struct dlm_debug_ctxt *dlm_debug_ctxt;
struct dentry *dlm_debugfs_subroot;
@@
-195,6
+198,13
@@
static inline struct hlist_head *dlm_lockres_hash(struct dlm_ctxt *dlm, unsigned
return dlm->lockres_hash[(i / DLM_BUCKETS_PER_PAGE) % DLM_HASH_PAGES] + (i % DLM_BUCKETS_PER_PAGE);
}
return dlm->lockres_hash[(i / DLM_BUCKETS_PER_PAGE) % DLM_HASH_PAGES] + (i % DLM_BUCKETS_PER_PAGE);
}
+static inline struct hlist_head *dlm_master_hash(struct dlm_ctxt *dlm,
+ unsigned i)
+{
+ return dlm->master_hash[(i / DLM_BUCKETS_PER_PAGE) % DLM_HASH_PAGES] +
+ (i % DLM_BUCKETS_PER_PAGE);
+}
+
/* these keventd work queue items are for less-frequently
* called functions that cannot be directly called from the
* net message handlers for some reason, usually because
/* these keventd work queue items are for less-frequently
* called functions that cannot be directly called from the
* net message handlers for some reason, usually because
@@
-1008,6
+1018,9
@@
static inline void __dlm_wait_on_lockres(struct dlm_lock_resource *res)
DLM_LOCK_RES_MIGRATING));
}
DLM_LOCK_RES_MIGRATING));
}
+void __dlm_unlink_mle(struct dlm_ctxt *dlm, struct dlm_master_list_entry *mle);
+void __dlm_insert_mle(struct dlm_ctxt *dlm, struct dlm_master_list_entry *mle);
+
/* create/destroy slab caches */
int dlm_init_master_caches(void);
void dlm_destroy_master_caches(void);
/* create/destroy slab caches */
int dlm_init_master_caches(void);
void dlm_destroy_master_caches(void);