Commit 6da6eabe authored by Lisa Nguyen's avatar Lisa Nguyen Committed by Greg Kroah-Hartman

staging: lustre: Remove typedef and update cfs_hash struct

Remove typedef keyword and rename the cfs_hash_t struct to
cfs_hash in libcfs_hash.h. These changes resolve the "Do
not add new typedefs" warning generated by checkpatch.pl
and meet kernel coding style.

Struct variables in other header and source files that
depend on libcfs_hash.h are updated as well.
Signed-off-by: default avatarLisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6ea510c1
...@@ -622,7 +622,7 @@ struct lu_site { ...@@ -622,7 +622,7 @@ struct lu_site {
/** /**
* objects hash table * objects hash table
*/ */
cfs_hash_t *ls_obj_hash; struct cfs_hash *ls_obj_hash;
/** /**
* index of bucket on hash table while purging * index of bucket on hash table while purging
*/ */
......
...@@ -375,7 +375,7 @@ struct ldlm_namespace { ...@@ -375,7 +375,7 @@ struct ldlm_namespace {
ldlm_side_t ns_client; ldlm_side_t ns_client;
/** Resource hash table for namespace. */ /** Resource hash table for namespace. */
cfs_hash_t *ns_rs_hash; struct cfs_hash *ns_rs_hash;
/** serialize */ /** serialize */
spinlock_t ns_lock; spinlock_t ns_lock;
......
...@@ -197,12 +197,12 @@ struct obd_export { ...@@ -197,12 +197,12 @@ struct obd_export {
/** Connection count value from last succesful reconnect rpc */ /** Connection count value from last succesful reconnect rpc */
__u32 exp_conn_cnt; __u32 exp_conn_cnt;
/** Hash list of all ldlm locks granted on this export */ /** Hash list of all ldlm locks granted on this export */
cfs_hash_t *exp_lock_hash; struct cfs_hash *exp_lock_hash;
/** /**
* Hash list for Posix lock deadlock detection, added with * Hash list for Posix lock deadlock detection, added with
* ldlm_lock::l_exp_flock_hash. * ldlm_lock::l_exp_flock_hash.
*/ */
cfs_hash_t *exp_flock_hash; struct cfs_hash *exp_flock_hash;
struct list_head exp_outstanding_replies; struct list_head exp_outstanding_replies;
struct list_head exp_uncommitted_replies; struct list_head exp_uncommitted_replies;
spinlock_t exp_uncommitted_replies_lock; spinlock_t exp_uncommitted_replies_lock;
......
...@@ -1427,7 +1427,7 @@ struct nrs_fifo_req { ...@@ -1427,7 +1427,7 @@ struct nrs_fifo_req {
struct nrs_crrn_net { struct nrs_crrn_net {
struct ptlrpc_nrs_resource cn_res; struct ptlrpc_nrs_resource cn_res;
cfs_binheap_t *cn_binheap; cfs_binheap_t *cn_binheap;
cfs_hash_t *cn_cli_hash; struct cfs_hash *cn_cli_hash;
/** /**
* Used when a new scheduling round commences, in order to synchronize * Used when a new scheduling round commences, in order to synchronize
* all clients with the new round number. * all clients with the new round number.
...@@ -1568,7 +1568,7 @@ struct nrs_orr_key { ...@@ -1568,7 +1568,7 @@ struct nrs_orr_key {
struct nrs_orr_data { struct nrs_orr_data {
struct ptlrpc_nrs_resource od_res; struct ptlrpc_nrs_resource od_res;
cfs_binheap_t *od_binheap; cfs_binheap_t *od_binheap;
cfs_hash_t *od_obj_hash; struct cfs_hash *od_obj_hash;
struct kmem_cache *od_cache; struct kmem_cache *od_cache;
/** /**
* Used when a new scheduling round commences, in order to synchronize * Used when a new scheduling round commences, in order to synchronize
......
...@@ -429,7 +429,7 @@ struct client_obd { ...@@ -429,7 +429,7 @@ struct client_obd {
/* ptlrpc work for writeback in ptlrpcd context */ /* ptlrpc work for writeback in ptlrpcd context */
void *cl_writeback_work; void *cl_writeback_work;
/* hash tables for osc_quota_info */ /* hash tables for osc_quota_info */
cfs_hash_t *cl_quota_hash[MAXQUOTAS]; struct cfs_hash *cl_quota_hash[MAXQUOTAS];
}; };
#define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid) #define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid)
...@@ -556,7 +556,7 @@ struct lov_obd { ...@@ -556,7 +556,7 @@ struct lov_obd {
__u32 lov_tgt_size; /* size of tgts array */ __u32 lov_tgt_size; /* size of tgts array */
int lov_connects; int lov_connects;
int lov_pool_count; int lov_pool_count;
cfs_hash_t *lov_pools_hash_body; /* used for key access */ struct cfs_hash *lov_pools_hash_body; /* used for key access */
struct list_head lov_pool_list; /* used for sequential access */ struct list_head lov_pool_list; /* used for sequential access */
struct proc_dir_entry *lov_pool_proc_entry; struct proc_dir_entry *lov_pool_proc_entry;
enum lustre_sec_part lov_sp_me; enum lustre_sec_part lov_sp_me;
...@@ -855,11 +855,11 @@ struct obd_device { ...@@ -855,11 +855,11 @@ struct obd_device {
* protection of other bits using _bh lock */ * protection of other bits using _bh lock */
unsigned long obd_recovery_expired:1; unsigned long obd_recovery_expired:1;
/* uuid-export hash body */ /* uuid-export hash body */
cfs_hash_t *obd_uuid_hash; struct cfs_hash *obd_uuid_hash;
/* nid-export hash body */ /* nid-export hash body */
cfs_hash_t *obd_nid_hash; struct cfs_hash *obd_nid_hash;
/* nid stats body */ /* nid stats body */
cfs_hash_t *obd_nid_stats_hash; struct cfs_hash *obd_nid_stats_hash;
struct list_head obd_nid_stats; struct list_head obd_nid_stats;
atomic_t obd_refcount; atomic_t obd_refcount;
wait_queue_head_t obd_refcount_waitq; wait_queue_head_t obd_refcount_waitq;
......
...@@ -745,7 +745,7 @@ void ldlm_flock_policy_local_to_wire(const ldlm_policy_data_t *lpolicy, ...@@ -745,7 +745,7 @@ void ldlm_flock_policy_local_to_wire(const ldlm_policy_data_t *lpolicy,
* Export handle<->flock hash operations. * Export handle<->flock hash operations.
*/ */
static unsigned static unsigned
ldlm_export_flock_hash(cfs_hash_t *hs, const void *key, unsigned mask) ldlm_export_flock_hash(struct cfs_hash *hs, const void *key, unsigned mask)
{ {
return cfs_hash_u64_hash(*(__u64 *)key, mask); return cfs_hash_u64_hash(*(__u64 *)key, mask);
} }
...@@ -772,7 +772,7 @@ ldlm_export_flock_object(struct hlist_node *hnode) ...@@ -772,7 +772,7 @@ ldlm_export_flock_object(struct hlist_node *hnode)
} }
static void static void
ldlm_export_flock_get(cfs_hash_t *hs, struct hlist_node *hnode) ldlm_export_flock_get(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct ldlm_lock *lock; struct ldlm_lock *lock;
struct ldlm_flock *flock; struct ldlm_flock *flock;
...@@ -787,7 +787,7 @@ ldlm_export_flock_get(cfs_hash_t *hs, struct hlist_node *hnode) ...@@ -787,7 +787,7 @@ ldlm_export_flock_get(cfs_hash_t *hs, struct hlist_node *hnode)
} }
static void static void
ldlm_export_flock_put(cfs_hash_t *hs, struct hlist_node *hnode) ldlm_export_flock_put(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct ldlm_lock *lock; struct ldlm_lock *lock;
struct ldlm_flock *flock; struct ldlm_flock *flock;
......
...@@ -1891,7 +1891,7 @@ static int reprocess_one_queue(struct ldlm_resource *res, void *closure) ...@@ -1891,7 +1891,7 @@ static int reprocess_one_queue(struct ldlm_resource *res, void *closure)
return LDLM_ITER_CONTINUE; return LDLM_ITER_CONTINUE;
} }
static int ldlm_reprocess_res(cfs_hash_t *hs, struct cfs_hash_bd *bd, static int ldlm_reprocess_res(struct cfs_hash *hs, struct cfs_hash_bd *bd,
struct hlist_node *hnode, void *arg) struct hlist_node *hnode, void *arg)
{ {
struct ldlm_resource *res = cfs_hash_object(hs, hnode); struct ldlm_resource *res = cfs_hash_object(hs, hnode);
...@@ -2040,7 +2040,7 @@ struct export_cl_data { ...@@ -2040,7 +2040,7 @@ struct export_cl_data {
* Iterator function for ldlm_cancel_locks_for_export. * Iterator function for ldlm_cancel_locks_for_export.
* Cancels passed locks. * Cancels passed locks.
*/ */
int ldlm_cancel_locks_for_export_cb(cfs_hash_t *hs, struct cfs_hash_bd *bd, int ldlm_cancel_locks_for_export_cb(struct cfs_hash *hs, struct cfs_hash_bd *bd,
struct hlist_node *hnode, void *data) struct hlist_node *hnode, void *data)
{ {
......
...@@ -937,7 +937,7 @@ EXPORT_SYMBOL(ldlm_put_ref); ...@@ -937,7 +937,7 @@ EXPORT_SYMBOL(ldlm_put_ref);
* Export handle<->lock hash operations. * Export handle<->lock hash operations.
*/ */
static unsigned static unsigned
ldlm_export_lock_hash(cfs_hash_t *hs, const void *key, unsigned mask) ldlm_export_lock_hash(struct cfs_hash *hs, const void *key, unsigned mask)
{ {
return cfs_hash_u64_hash(((struct lustre_handle *)key)->cookie, mask); return cfs_hash_u64_hash(((struct lustre_handle *)key)->cookie, mask);
} }
...@@ -973,7 +973,7 @@ ldlm_export_lock_object(struct hlist_node *hnode) ...@@ -973,7 +973,7 @@ ldlm_export_lock_object(struct hlist_node *hnode)
} }
static void static void
ldlm_export_lock_get(cfs_hash_t *hs, struct hlist_node *hnode) ldlm_export_lock_get(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct ldlm_lock *lock; struct ldlm_lock *lock;
...@@ -982,7 +982,7 @@ ldlm_export_lock_get(cfs_hash_t *hs, struct hlist_node *hnode) ...@@ -982,7 +982,7 @@ ldlm_export_lock_get(cfs_hash_t *hs, struct hlist_node *hnode)
} }
static void static void
ldlm_export_lock_put(cfs_hash_t *hs, struct hlist_node *hnode) ldlm_export_lock_put(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct ldlm_lock *lock; struct ldlm_lock *lock;
......
...@@ -1925,7 +1925,7 @@ struct ldlm_cli_cancel_arg { ...@@ -1925,7 +1925,7 @@ struct ldlm_cli_cancel_arg {
void *lc_opaque; void *lc_opaque;
}; };
static int ldlm_cli_hash_cancel_unused(cfs_hash_t *hs, struct cfs_hash_bd *bd, static int ldlm_cli_hash_cancel_unused(struct cfs_hash *hs, struct cfs_hash_bd *bd,
struct hlist_node *hnode, void *arg) struct hlist_node *hnode, void *arg)
{ {
struct ldlm_resource *res = cfs_hash_object(hs, hnode); struct ldlm_resource *res = cfs_hash_object(hs, hnode);
...@@ -2023,7 +2023,7 @@ static int ldlm_iter_helper(struct ldlm_lock *lock, void *closure) ...@@ -2023,7 +2023,7 @@ static int ldlm_iter_helper(struct ldlm_lock *lock, void *closure)
return helper->iter(lock, helper->closure); return helper->iter(lock, helper->closure);
} }
static int ldlm_res_iter_helper(cfs_hash_t *hs, struct cfs_hash_bd *bd, static int ldlm_res_iter_helper(struct cfs_hash *hs, struct cfs_hash_bd *bd,
struct hlist_node *hnode, void *arg) struct hlist_node *hnode, void *arg)
{ {
......
...@@ -389,7 +389,7 @@ int ldlm_namespace_proc_register(struct ldlm_namespace *ns) ...@@ -389,7 +389,7 @@ int ldlm_namespace_proc_register(struct ldlm_namespace *ns)
#endif /* LPROCFS */ #endif /* LPROCFS */
static unsigned ldlm_res_hop_hash(cfs_hash_t *hs, static unsigned ldlm_res_hop_hash(struct cfs_hash *hs,
const void *key, unsigned mask) const void *key, unsigned mask)
{ {
const struct ldlm_res_id *id = key; const struct ldlm_res_id *id = key;
...@@ -401,7 +401,7 @@ static unsigned ldlm_res_hop_hash(cfs_hash_t *hs, ...@@ -401,7 +401,7 @@ static unsigned ldlm_res_hop_hash(cfs_hash_t *hs,
return val & mask; return val & mask;
} }
static unsigned ldlm_res_hop_fid_hash(cfs_hash_t *hs, static unsigned ldlm_res_hop_fid_hash(struct cfs_hash *hs,
const void *key, unsigned mask) const void *key, unsigned mask)
{ {
const struct ldlm_res_id *id = key; const struct ldlm_res_id *id = key;
...@@ -453,7 +453,7 @@ static void *ldlm_res_hop_object(struct hlist_node *hnode) ...@@ -453,7 +453,7 @@ static void *ldlm_res_hop_object(struct hlist_node *hnode)
return hlist_entry(hnode, struct ldlm_resource, lr_hash); return hlist_entry(hnode, struct ldlm_resource, lr_hash);
} }
static void ldlm_res_hop_get_locked(cfs_hash_t *hs, struct hlist_node *hnode) static void ldlm_res_hop_get_locked(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct ldlm_resource *res; struct ldlm_resource *res;
...@@ -461,7 +461,7 @@ static void ldlm_res_hop_get_locked(cfs_hash_t *hs, struct hlist_node *hnode) ...@@ -461,7 +461,7 @@ static void ldlm_res_hop_get_locked(cfs_hash_t *hs, struct hlist_node *hnode)
ldlm_resource_getref(res); ldlm_resource_getref(res);
} }
static void ldlm_res_hop_put_locked(cfs_hash_t *hs, struct hlist_node *hnode) static void ldlm_res_hop_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct ldlm_resource *res; struct ldlm_resource *res;
...@@ -470,7 +470,7 @@ static void ldlm_res_hop_put_locked(cfs_hash_t *hs, struct hlist_node *hnode) ...@@ -470,7 +470,7 @@ static void ldlm_res_hop_put_locked(cfs_hash_t *hs, struct hlist_node *hnode)
ldlm_resource_putref_locked(res); ldlm_resource_putref_locked(res);
} }
static void ldlm_res_hop_put(cfs_hash_t *hs, struct hlist_node *hnode) static void ldlm_res_hop_put(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct ldlm_resource *res; struct ldlm_resource *res;
...@@ -743,7 +743,7 @@ static void cleanup_resource(struct ldlm_resource *res, struct list_head *q, ...@@ -743,7 +743,7 @@ static void cleanup_resource(struct ldlm_resource *res, struct list_head *q,
} while (1); } while (1);
} }
static int ldlm_resource_clean(cfs_hash_t *hs, struct cfs_hash_bd *bd, static int ldlm_resource_clean(struct cfs_hash *hs, struct cfs_hash_bd *bd,
struct hlist_node *hnode, void *arg) struct hlist_node *hnode, void *arg)
{ {
struct ldlm_resource *res = cfs_hash_object(hs, hnode); struct ldlm_resource *res = cfs_hash_object(hs, hnode);
...@@ -756,7 +756,7 @@ static int ldlm_resource_clean(cfs_hash_t *hs, struct cfs_hash_bd *bd, ...@@ -756,7 +756,7 @@ static int ldlm_resource_clean(cfs_hash_t *hs, struct cfs_hash_bd *bd,
return 0; return 0;
} }
static int ldlm_resource_complain(cfs_hash_t *hs, struct cfs_hash_bd *bd, static int ldlm_resource_complain(struct cfs_hash *hs, struct cfs_hash_bd *bd,
struct hlist_node *hnode, void *arg) struct hlist_node *hnode, void *arg)
{ {
struct ldlm_resource *res = cfs_hash_object(hs, hnode); struct ldlm_resource *res = cfs_hash_object(hs, hnode);
...@@ -1352,7 +1352,7 @@ void ldlm_dump_all_namespaces(ldlm_side_t client, int level) ...@@ -1352,7 +1352,7 @@ void ldlm_dump_all_namespaces(ldlm_side_t client, int level)
} }
EXPORT_SYMBOL(ldlm_dump_all_namespaces); EXPORT_SYMBOL(ldlm_dump_all_namespaces);
static int ldlm_res_hash_dump(cfs_hash_t *hs, struct cfs_hash_bd *bd, static int ldlm_res_hash_dump(struct cfs_hash *hs, struct cfs_hash_bd *bd,
struct hlist_node *hnode, void *arg) struct hlist_node *hnode, void *arg)
{ {
struct ldlm_resource *res = cfs_hash_object(hs, hnode); struct ldlm_resource *res = cfs_hash_object(hs, hnode);
......
This diff is collapsed.
...@@ -297,7 +297,7 @@ static loff_t vvp_pgcache_id_pack(struct vvp_pgcache_id *id) ...@@ -297,7 +297,7 @@ static loff_t vvp_pgcache_id_pack(struct vvp_pgcache_id *id)
((__u64)id->vpi_bucket << PGC_OBJ_SHIFT); ((__u64)id->vpi_bucket << PGC_OBJ_SHIFT);
} }
static int vvp_pgcache_obj_get(cfs_hash_t *hs, struct cfs_hash_bd *bd, static int vvp_pgcache_obj_get(struct cfs_hash *hs, struct cfs_hash_bd *bd,
struct hlist_node *hnode, void *data) struct hlist_node *hnode, void *data)
{ {
struct vvp_pgcache_id *id = data; struct vvp_pgcache_id *id = data;
......
...@@ -86,7 +86,7 @@ void lov_pool_putref_locked(struct pool_desc *pool) ...@@ -86,7 +86,7 @@ void lov_pool_putref_locked(struct pool_desc *pool)
* Chapter 6.4. * Chapter 6.4.
* Addison Wesley, 1973 * Addison Wesley, 1973
*/ */
static __u32 pool_hashfn(cfs_hash_t *hash_body, const void *key, unsigned mask) static __u32 pool_hashfn(struct cfs_hash *hash_body, const void *key, unsigned mask)
{ {
int i; int i;
__u32 result; __u32 result;
...@@ -125,7 +125,7 @@ static void *pool_hashobject(struct hlist_node *hnode) ...@@ -125,7 +125,7 @@ static void *pool_hashobject(struct hlist_node *hnode)
return hlist_entry(hnode, struct pool_desc, pool_hash); return hlist_entry(hnode, struct pool_desc, pool_hash);
} }
static void pool_hashrefcount_get(cfs_hash_t *hs, struct hlist_node *hnode) static void pool_hashrefcount_get(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct pool_desc *pool; struct pool_desc *pool;
...@@ -133,7 +133,7 @@ static void pool_hashrefcount_get(cfs_hash_t *hs, struct hlist_node *hnode) ...@@ -133,7 +133,7 @@ static void pool_hashrefcount_get(cfs_hash_t *hs, struct hlist_node *hnode)
lov_pool_getref(pool); lov_pool_getref(pool);
} }
static void pool_hashrefcount_put_locked(cfs_hash_t *hs, static void pool_hashrefcount_put_locked(struct cfs_hash *hs,
struct hlist_node *hnode) struct hlist_node *hnode)
{ {
struct pool_desc *pool; struct pool_desc *pool;
......
...@@ -577,9 +577,9 @@ static void cl_env_init0(struct cl_env *cle, void *debug) ...@@ -577,9 +577,9 @@ static void cl_env_init0(struct cl_env *cle, void *debug)
* The implementation of using hash table to connect cl_env and thread * The implementation of using hash table to connect cl_env and thread
*/ */
static cfs_hash_t *cl_env_hash; static struct cfs_hash *cl_env_hash;
static unsigned cl_env_hops_hash(cfs_hash_t *lh, static unsigned cl_env_hops_hash(struct cfs_hash *lh,
const void *key, unsigned mask) const void *key, unsigned mask)
{ {
#if BITS_PER_LONG == 64 #if BITS_PER_LONG == 64
...@@ -604,7 +604,7 @@ static int cl_env_hops_keycmp(const void *key, struct hlist_node *hn) ...@@ -604,7 +604,7 @@ static int cl_env_hops_keycmp(const void *key, struct hlist_node *hn)
return (key == cle->ce_owner); return (key == cle->ce_owner);
} }
static void cl_env_hops_noop(cfs_hash_t *hs, struct hlist_node *hn) static void cl_env_hops_noop(struct cfs_hash *hs, struct hlist_node *hn)
{ {
struct cl_env *cle = hlist_entry(hn, struct cl_env, ce_node); struct cl_env *cle = hlist_entry(hn, struct cl_env, ce_node);
LASSERT(cle->ce_magic == &cl_env_init0); LASSERT(cle->ce_magic == &cl_env_init0);
......
...@@ -816,7 +816,7 @@ struct obd_export *class_new_export(struct obd_device *obd, ...@@ -816,7 +816,7 @@ struct obd_export *class_new_export(struct obd_device *obd,
struct obd_uuid *cluuid) struct obd_uuid *cluuid)
{ {
struct obd_export *export; struct obd_export *export;
cfs_hash_t *hash = NULL; struct cfs_hash *hash = NULL;
int rc = 0; int rc = 0;
OBD_ALLOC_PTR(export); OBD_ALLOC_PTR(export);
...@@ -1384,7 +1384,7 @@ EXPORT_SYMBOL(obd_export_nid2str); ...@@ -1384,7 +1384,7 @@ EXPORT_SYMBOL(obd_export_nid2str);
int obd_export_evict_by_nid(struct obd_device *obd, const char *nid) int obd_export_evict_by_nid(struct obd_device *obd, const char *nid)
{ {
cfs_hash_t *nid_hash; struct cfs_hash *nid_hash;
struct obd_export *doomed_exp = NULL; struct obd_export *doomed_exp = NULL;
int exports_evicted = 0; int exports_evicted = 0;
...@@ -1432,7 +1432,7 @@ EXPORT_SYMBOL(obd_export_evict_by_nid); ...@@ -1432,7 +1432,7 @@ EXPORT_SYMBOL(obd_export_evict_by_nid);
int obd_export_evict_by_uuid(struct obd_device *obd, const char *uuid) int obd_export_evict_by_uuid(struct obd_device *obd, const char *uuid)
{ {
cfs_hash_t *uuid_hash; struct cfs_hash *uuid_hash;
struct obd_export *doomed_exp = NULL; struct obd_export *doomed_exp = NULL;
struct obd_uuid doomed_uuid; struct obd_uuid doomed_uuid;
int exports_evicted = 0; int exports_evicted = 0;
......
...@@ -898,7 +898,7 @@ static void lprocfs_free_client_stats(struct nid_stat *client_stat) ...@@ -898,7 +898,7 @@ static void lprocfs_free_client_stats(struct nid_stat *client_stat)
void lprocfs_free_per_client_stats(struct obd_device *obd) void lprocfs_free_per_client_stats(struct obd_device *obd)
{ {
cfs_hash_t *hash = obd->obd_nid_stats_hash; struct cfs_hash *hash = obd->obd_nid_stats_hash;
struct nid_stat *stat; struct nid_stat *stat;
/* we need extra list - because hash_exit called to early */ /* we need extra list - because hash_exit called to early */
...@@ -1422,7 +1422,7 @@ void lprocfs_init_ldlm_stats(struct lprocfs_stats *ldlm_stats) ...@@ -1422,7 +1422,7 @@ void lprocfs_init_ldlm_stats(struct lprocfs_stats *ldlm_stats)
} }
EXPORT_SYMBOL(lprocfs_init_ldlm_stats); EXPORT_SYMBOL(lprocfs_init_ldlm_stats);
int lprocfs_exp_print_uuid(cfs_hash_t *hs, struct cfs_hash_bd *bd, int lprocfs_exp_print_uuid(struct cfs_hash *hs, struct cfs_hash_bd *bd,
struct hlist_node *hnode, void *data) struct hlist_node *hnode, void *data)
{ {
...@@ -1453,7 +1453,7 @@ struct exp_hash_cb_data { ...@@ -1453,7 +1453,7 @@ struct exp_hash_cb_data {
bool first; bool first;
}; };
int lprocfs_exp_print_hash(cfs_hash_t *hs, struct cfs_hash_bd *bd, int lprocfs_exp_print_hash(struct cfs_hash *hs, struct cfs_hash_bd *bd,
struct hlist_node *hnode, void *cb_data) struct hlist_node *hnode, void *cb_data)
{ {
......
...@@ -175,7 +175,7 @@ void lu_object_unhash(const struct lu_env *env, struct lu_object *o) ...@@ -175,7 +175,7 @@ void lu_object_unhash(const struct lu_env *env, struct lu_object *o)
top = o->lo_header; top = o->lo_header;
set_bit(LU_OBJECT_HEARD_BANSHEE, &top->loh_flags); set_bit(LU_OBJECT_HEARD_BANSHEE, &top->loh_flags);
if (!test_and_set_bit(LU_OBJECT_UNHASHED, &top->loh_flags)) { if (!test_and_set_bit(LU_OBJECT_UNHASHED, &top->loh_flags)) {
cfs_hash_t *obj_hash = o->lo_dev->ld_site->ls_obj_hash; struct cfs_hash *obj_hash = o->lo_dev->ld_site->ls_obj_hash;
struct cfs_hash_bd bd; struct cfs_hash_bd bd;
cfs_hash_bd_get_and_lock(obj_hash, &top->loh_fid, &bd, 1); cfs_hash_bd_get_and_lock(obj_hash, &top->loh_fid, &bd, 1);
...@@ -589,7 +589,7 @@ static struct lu_object *lu_object_new(const struct lu_env *env, ...@@ -589,7 +589,7 @@ static struct lu_object *lu_object_new(const struct lu_env *env,
const struct lu_object_conf *conf) const struct lu_object_conf *conf)
{ {
struct lu_object *o; struct lu_object *o;
cfs_hash_t *hs; struct cfs_hash *hs;
struct cfs_hash_bd bd; struct cfs_hash_bd bd;
struct lu_site_bkt_data *bkt; struct lu_site_bkt_data *bkt;
...@@ -618,7 +618,7 @@ static struct lu_object *lu_object_find_try(const struct lu_env *env, ...@@ -618,7 +618,7 @@ static struct lu_object *lu_object_find_try(const struct lu_env *env,
struct lu_object *o; struct lu_object *o;
struct lu_object *shadow; struct lu_object *shadow;
struct lu_site *s; struct lu_site *s;
cfs_hash_t *hs; struct cfs_hash *hs;
struct cfs_hash_bd bd; struct cfs_hash_bd bd;
__u64 version = 0; __u64 version = 0;
...@@ -788,7 +788,7 @@ struct lu_site_print_arg { ...@@ -788,7 +788,7 @@ struct lu_site_print_arg {
}; };
static int static int
lu_site_obj_print(cfs_hash_t *hs, struct cfs_hash_bd *bd, lu_site_obj_print(struct cfs_hash *hs, struct cfs_hash_bd *bd,
struct hlist_node *hnode, void *data) struct hlist_node *hnode, void *data)
{ {
struct lu_site_print_arg *arg = (struct lu_site_print_arg *)data; struct lu_site_print_arg *arg = (struct lu_site_print_arg *)data;
...@@ -874,7 +874,7 @@ static int lu_htable_order(void) ...@@ -874,7 +874,7 @@ static int lu_htable_order(void)
return bits; return bits;
} }
static unsigned lu_obj_hop_hash(cfs_hash_t *hs, static unsigned lu_obj_hop_hash(struct cfs_hash *hs,
const void *key, unsigned mask) const void *key, unsigned mask)
{ {
struct lu_fid *fid = (struct lu_fid *)key; struct lu_fid *fid = (struct lu_fid *)key;
...@@ -914,7 +914,7 @@ static int lu_obj_hop_keycmp(const void *key, struct hlist_node *hnode) ...@@ -914,7 +914,7 @@ static int lu_obj_hop_keycmp(const void *key, struct hlist_node *hnode)
return lu_fid_eq(&h->loh_fid, (struct lu_fid *)key); return lu_fid_eq(&h->loh_fid, (struct lu_fid *)key);
} }
static void lu_obj_hop_get(cfs_hash_t *hs, struct hlist_node *hnode) static void lu_obj_hop_get(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct lu_object_header *h; struct lu_object_header *h;
...@@ -929,7 +929,7 @@ static void lu_obj_hop_get(cfs_hash_t *hs, struct hlist_node *hnode) ...@@ -929,7 +929,7 @@ static void lu_obj_hop_get(cfs_hash_t *hs, struct hlist_node *hnode)
} }
} }
static void lu_obj_hop_put_locked(cfs_hash_t *hs, struct hlist_node *hnode) static void lu_obj_hop_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
LBUG(); /* we should never called it */ LBUG(); /* we should never called it */
} }
...@@ -1788,7 +1788,7 @@ typedef struct lu_site_stats{ ...@@ -1788,7 +1788,7 @@ typedef struct lu_site_stats{
unsigned lss_busy; unsigned lss_busy;
} lu_site_stats_t; } lu_site_stats_t;
static void lu_site_stats_get(cfs_hash_t *hs, static void lu_site_stats_get(struct cfs_hash *hs,
lu_site_stats_t *stats, int populated) lu_site_stats_t *stats, int populated)
{ {
struct cfs_hash_bd bd; struct cfs_hash_bd bd;
...@@ -2072,7 +2072,7 @@ void lu_object_assign_fid(const struct lu_env *env, struct lu_object *o, ...@@ -2072,7 +2072,7 @@ void lu_object_assign_fid(const struct lu_env *env, struct lu_object *o,
struct lu_site_bkt_data *bkt; struct lu_site_bkt_data *bkt;
struct lu_object *shadow; struct lu_object *shadow;
wait_queue_t waiter; wait_queue_t waiter;
cfs_hash_t *hs; struct cfs_hash *hs;
struct cfs_hash_bd bd; struct cfs_hash_bd bd;
__u64 version = 0; __u64 version = 0;
......
...@@ -1692,7 +1692,7 @@ EXPORT_SYMBOL(class_manual_cleanup); ...@@ -1692,7 +1692,7 @@ EXPORT_SYMBOL(class_manual_cleanup);
*/ */
static unsigned static unsigned
uuid_hash(cfs_hash_t *hs, const void *key, unsigned mask) uuid_hash(struct cfs_hash *hs, const void *key, unsigned mask)
{ {
return cfs_hash_djb2_hash(((struct obd_uuid *)key)->uuid, return cfs_hash_djb2_hash(((struct obd_uuid *)key)->uuid,
sizeof(((struct obd_uuid *)key)->uuid), mask); sizeof(((struct obd_uuid *)key)->uuid), mask);
...@@ -1731,7 +1731,7 @@ uuid_export_object(struct hlist_node *hnode) ...@@ -1731,7 +1731,7 @@ uuid_export_object(struct hlist_node *hnode)
} }
static void static void
uuid_export_get(cfs_hash_t *hs, struct hlist_node *hnode) uuid_export_get(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct obd_export *exp; struct obd_export *exp;
...@@ -1740,7 +1740,7 @@ uuid_export_get(cfs_hash_t *hs, struct hlist_node *hnode) ...@@ -1740,7 +1740,7 @@ uuid_export_get(cfs_hash_t *hs, struct hlist_node *hnode)
} }
static void static void
uuid_export_put_locked(cfs_hash_t *hs, struct hlist_node *hnode) uuid_export_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct obd_export *exp; struct obd_export *exp;
...@@ -1763,7 +1763,7 @@ static cfs_hash_ops_t uuid_hash_ops = { ...@@ -1763,7 +1763,7 @@ static cfs_hash_ops_t uuid_hash_ops = {
*/ */
static unsigned static unsigned
nid_hash(cfs_hash_t *hs, const void *key, unsigned mask) nid_hash(struct cfs_hash *hs, const void *key, unsigned mask)
{ {
return cfs_hash_djb2_hash(key, sizeof(lnet_nid_t), mask); return cfs_hash_djb2_hash(key, sizeof(lnet_nid_t), mask);
} }
...@@ -1801,7 +1801,7 @@ nid_export_object(struct hlist_node *hnode) ...@@ -1801,7 +1801,7 @@ nid_export_object(struct hlist_node *hnode)
} }
static void static void
nid_export_get(cfs_hash_t *hs, struct hlist_node *hnode) nid_export_get(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct obd_export *exp; struct obd_export *exp;
...@@ -1810,7 +1810,7 @@ nid_export_get(cfs_hash_t *hs, struct hlist_node *hnode) ...@@ -1810,7 +1810,7 @@ nid_export_get(cfs_hash_t *hs, struct hlist_node *hnode)
} }
static void static void
nid_export_put_locked(cfs_hash_t *hs, struct hlist_node *hnode) nid_export_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct obd_export *exp; struct obd_export *exp;
...@@ -1855,7 +1855,7 @@ nidstats_object(struct hlist_node *hnode) ...@@ -1855,7 +1855,7 @@ nidstats_object(struct hlist_node *hnode)
} }
static void static void
nidstats_get(cfs_hash_t *hs, struct hlist_node *hnode) nidstats_get(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct nid_stat *ns; struct nid_stat *ns;
...@@ -1864,7 +1864,7 @@ nidstats_get(cfs_hash_t *hs, struct hlist_node *hnode) ...@@ -1864,7 +1864,7 @@ nidstats_get(cfs_hash_t *hs, struct hlist_node *hnode)
} }
static void static void
nidstats_put_locked(cfs_hash_t *hs, struct hlist_node *hnode) nidstats_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct nid_stat *ns; struct nid_stat *ns;
......
...@@ -139,7 +139,7 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[], ...@@ -139,7 +139,7 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[],
* Hash operations for uid/gid <-> osc_quota_info * Hash operations for uid/gid <-> osc_quota_info
*/ */
static unsigned static unsigned
oqi_hashfn(cfs_hash_t *hs, const void *key, unsigned mask) oqi_hashfn(struct cfs_hash *hs, const void *key, unsigned mask)
{ {
return cfs_hash_u32_hash(*((__u32*)key), mask); return cfs_hash_u32_hash(*((__u32*)key), mask);
} }
...@@ -172,17 +172,17 @@ oqi_object(struct hlist_node *hnode) ...@@ -172,17 +172,17 @@ oqi_object(struct hlist_node *hnode)
} }
static void static void
oqi_get(cfs_hash_t *hs, struct hlist_node *hnode) oqi_get(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
} }
static void static void
oqi_put_locked(cfs_hash_t *hs, struct hlist_node *hnode) oqi_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
} }
static void static void
oqi_exit(cfs_hash_t *hs, struct hlist_node *hnode) oqi_exit(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct osc_quota_info *oqi; struct osc_quota_info *oqi;
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include "ptlrpc_internal.h" #include "ptlrpc_internal.h"
static cfs_hash_t *conn_hash = NULL; static struct cfs_hash *conn_hash = NULL;
static cfs_hash_ops_t conn_hash_ops; static cfs_hash_ops_t conn_hash_ops;
struct ptlrpc_connection * struct ptlrpc_connection *
...@@ -161,7 +161,7 @@ EXPORT_SYMBOL(ptlrpc_connection_fini); ...@@ -161,7 +161,7 @@ EXPORT_SYMBOL(ptlrpc_connection_fini);
* Hash operations for net_peer<->connection * Hash operations for net_peer<->connection
*/ */
static unsigned static unsigned
conn_hashfn(cfs_hash_t *hs, const void *key, unsigned mask) conn_hashfn(struct cfs_hash *hs, const void *key, unsigned mask)
{ {
return cfs_hash_djb2_hash(key, sizeof(lnet_process_id_t), mask); return cfs_hash_djb2_hash(key, sizeof(lnet_process_id_t), mask);
} }
...@@ -195,7 +195,7 @@ conn_object(struct hlist_node *hnode) ...@@ -195,7 +195,7 @@ conn_object(struct hlist_node *hnode)
} }
static void static void
conn_get(cfs_hash_t *hs, struct hlist_node *hnode) conn_get(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct ptlrpc_connection *conn; struct ptlrpc_connection *conn;
...@@ -204,7 +204,7 @@ conn_get(cfs_hash_t *hs, struct hlist_node *hnode) ...@@ -204,7 +204,7 @@ conn_get(cfs_hash_t *hs, struct hlist_node *hnode)
} }
static void static void
conn_put_locked(cfs_hash_t *hs, struct hlist_node *hnode) conn_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct ptlrpc_connection *conn; struct ptlrpc_connection *conn;
...@@ -213,7 +213,7 @@ conn_put_locked(cfs_hash_t *hs, struct hlist_node *hnode) ...@@ -213,7 +213,7 @@ conn_put_locked(cfs_hash_t *hs, struct hlist_node *hnode)
} }
static void static void
conn_exit(cfs_hash_t *hs, struct hlist_node *hnode) conn_exit(struct cfs_hash *hs, struct hlist_node *hnode)
{ {
struct ptlrpc_connection *conn; struct ptlrpc_connection *conn;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment