aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Simmons <uja.ornl@yahoo.com>2015-10-28 12:54:24 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-28 19:02:24 -0400
commitdb9fc06bae1fdaae129b2bf8d86d85e746e757fc (patch)
tree188e3aed62d7cb5e43ccbed0ec3bdfc6eb70f133
parentccb006a5e453706cd077bbc6893eaa97ae3f81f0 (diff)
staging: lustre: change cfs_hash_ops_t to struct
Change cfs_hash_ops_t to struct cfs_hash_ops. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h21
-rw-r--r--drivers/staging/lustre/lustre/ldlm/ldlm_resource.c18
-rw-r--r--drivers/staging/lustre/lustre/libcfs/hash.c2
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_internal.h2
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_pool.c6
-rw-r--r--drivers/staging/lustre/lustre/obdclass/cl_object.c6
-rw-r--r--drivers/staging/lustre/lustre/obdclass/lu_object.c6
-rw-r--r--drivers/staging/lustre/lustre/obdclass/obd_config.c8
-rw-r--r--drivers/staging/lustre/lustre/osc/osc_quota.c2
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/connection.c8
10 files changed, 40 insertions, 39 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
index 6ac54a0afe35..200b76005a8a 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
@@ -211,13 +211,13 @@ enum cfs_hash_tag {
211struct cfs_hash { 211struct cfs_hash {
212 /** serialize with rehash, or serialize all operations if 212 /** serialize with rehash, or serialize all operations if
213 * the hash-table has CFS_HASH_NO_BKTLOCK */ 213 * the hash-table has CFS_HASH_NO_BKTLOCK */
214 union cfs_hash_lock hs_lock; 214 union cfs_hash_lock hs_lock;
215 /** hash operations */ 215 /** hash operations */
216 struct cfs_hash_ops *hs_ops; 216 struct cfs_hash_ops *hs_ops;
217 /** hash lock operations */ 217 /** hash lock operations */
218 struct cfs_hash_lock_ops *hs_lops; 218 struct cfs_hash_lock_ops *hs_lops;
219 /** hash list operations */ 219 /** hash list operations */
220 struct cfs_hash_hlist_ops *hs_hops; 220 struct cfs_hash_hlist_ops *hs_hops;
221 /** hash buckets-table */ 221 /** hash buckets-table */
222 struct cfs_hash_bucket **hs_buckets; 222 struct cfs_hash_bucket **hs_buckets;
223 /** total number of items on this hash-table */ 223 /** total number of items on this hash-table */
@@ -296,7 +296,7 @@ struct cfs_hash_hlist_ops {
296 struct cfs_hash_bd *bd, struct hlist_node *hnode); 296 struct cfs_hash_bd *bd, struct hlist_node *hnode);
297}; 297};
298 298
299typedef struct cfs_hash_ops { 299struct cfs_hash_ops {
300 /** return hashed value from @key */ 300 /** return hashed value from @key */
301 unsigned (*hs_hash)(struct cfs_hash *hs, const void *key, unsigned mask); 301 unsigned (*hs_hash)(struct cfs_hash *hs, const void *key, unsigned mask);
302 /** return key address of @hnode */ 302 /** return key address of @hnode */
@@ -318,7 +318,7 @@ typedef struct cfs_hash_ops {
318 void (*hs_put_locked)(struct cfs_hash *hs, struct hlist_node *hnode); 318 void (*hs_put_locked)(struct cfs_hash *hs, struct hlist_node *hnode);
319 /** it's called before removing of @hnode */ 319 /** it's called before removing of @hnode */
320 void (*hs_exit)(struct cfs_hash *hs, struct hlist_node *hnode); 320 void (*hs_exit)(struct cfs_hash *hs, struct hlist_node *hnode);
321} cfs_hash_ops_t; 321};
322 322
323/** total number of buckets in @hs */ 323/** total number of buckets in @hs */
324#define CFS_HASH_NBKT(hs) \ 324#define CFS_HASH_NBKT(hs) \
@@ -668,10 +668,11 @@ struct hlist_node *cfs_hash_dual_bd_finddel_locked(struct cfs_hash *hs,
668 struct hlist_node *hnode); 668 struct hlist_node *hnode);
669 669
670/* Hash init/cleanup functions */ 670/* Hash init/cleanup functions */
671struct cfs_hash *cfs_hash_create(char *name, unsigned cur_bits, unsigned max_bits, 671struct cfs_hash *cfs_hash_create(char *name, unsigned cur_bits,
672 unsigned bkt_bits, unsigned extra_bytes, 672 unsigned max_bits, unsigned bkt_bits,
673 unsigned min_theta, unsigned max_theta, 673 unsigned extra_bytes, unsigned min_theta,
674 cfs_hash_ops_t *ops, unsigned flags); 674 unsigned max_theta, struct cfs_hash_ops *ops,
675 unsigned flags);
675 676
676struct cfs_hash *cfs_hash_getref(struct cfs_hash *hs); 677struct cfs_hash *cfs_hash_getref(struct cfs_hash *hs);
677void cfs_hash_putref(struct cfs_hash *hs); 678void cfs_hash_putref(struct cfs_hash *hs);
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
index 342c465ed9b2..c0a54bf406ca 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
@@ -531,26 +531,26 @@ static void ldlm_res_hop_put(struct cfs_hash *hs, struct hlist_node *hnode)
531 ldlm_resource_putref(res); 531 ldlm_resource_putref(res);
532} 532}
533 533
534static cfs_hash_ops_t ldlm_ns_hash_ops = { 534static struct cfs_hash_ops ldlm_ns_hash_ops = {
535 .hs_hash = ldlm_res_hop_hash, 535 .hs_hash = ldlm_res_hop_hash,
536 .hs_key = ldlm_res_hop_key, 536 .hs_key = ldlm_res_hop_key,
537 .hs_keycmp = ldlm_res_hop_keycmp, 537 .hs_keycmp = ldlm_res_hop_keycmp,
538 .hs_keycpy = NULL, 538 .hs_keycpy = NULL,
539 .hs_object = ldlm_res_hop_object, 539 .hs_object = ldlm_res_hop_object,
540 .hs_get = ldlm_res_hop_get_locked, 540 .hs_get = ldlm_res_hop_get_locked,
541 .hs_put_locked = ldlm_res_hop_put_locked, 541 .hs_put_locked = ldlm_res_hop_put_locked,
542 .hs_put = ldlm_res_hop_put 542 .hs_put = ldlm_res_hop_put
543}; 543};
544 544
545static cfs_hash_ops_t ldlm_ns_fid_hash_ops = { 545static struct cfs_hash_ops ldlm_ns_fid_hash_ops = {
546 .hs_hash = ldlm_res_hop_fid_hash, 546 .hs_hash = ldlm_res_hop_fid_hash,
547 .hs_key = ldlm_res_hop_key, 547 .hs_key = ldlm_res_hop_key,
548 .hs_keycmp = ldlm_res_hop_keycmp, 548 .hs_keycmp = ldlm_res_hop_keycmp,
549 .hs_keycpy = NULL, 549 .hs_keycpy = NULL,
550 .hs_object = ldlm_res_hop_object, 550 .hs_object = ldlm_res_hop_object,
551 .hs_get = ldlm_res_hop_get_locked, 551 .hs_get = ldlm_res_hop_get_locked,
552 .hs_put_locked = ldlm_res_hop_put_locked, 552 .hs_put_locked = ldlm_res_hop_put_locked,
553 .hs_put = ldlm_res_hop_put 553 .hs_put = ldlm_res_hop_put
554}; 554};
555 555
556struct ldlm_ns_hash_def { 556struct ldlm_ns_hash_def {
@@ -560,7 +560,7 @@ struct ldlm_ns_hash_def {
560 /** hash bits */ 560 /** hash bits */
561 unsigned nsd_all_bits; 561 unsigned nsd_all_bits;
562 /** hash operations */ 562 /** hash operations */
563 cfs_hash_ops_t *nsd_hops; 563 struct cfs_hash_ops *nsd_hops;
564}; 564};
565 565
566static struct ldlm_ns_hash_def ldlm_ns_hash_defs[] = { 566static struct ldlm_ns_hash_def ldlm_ns_hash_defs[] = {
diff --git a/drivers/staging/lustre/lustre/libcfs/hash.c b/drivers/staging/lustre/lustre/libcfs/hash.c
index 63c44345cbac..f8026e1b3be5 100644
--- a/drivers/staging/lustre/lustre/libcfs/hash.c
+++ b/drivers/staging/lustre/lustre/libcfs/hash.c
@@ -1019,7 +1019,7 @@ struct cfs_hash *
1019cfs_hash_create(char *name, unsigned cur_bits, unsigned max_bits, 1019cfs_hash_create(char *name, unsigned cur_bits, unsigned max_bits,
1020 unsigned bkt_bits, unsigned extra_bytes, 1020 unsigned bkt_bits, unsigned extra_bytes,
1021 unsigned min_theta, unsigned max_theta, 1021 unsigned min_theta, unsigned max_theta,
1022 cfs_hash_ops_t *ops, unsigned flags) 1022 struct cfs_hash_ops *ops, unsigned flags)
1023{ 1023{
1024 struct cfs_hash *hs; 1024 struct cfs_hash *hs;
1025 int len; 1025 int len;
diff --git a/drivers/staging/lustre/lustre/lov/lov_internal.h b/drivers/staging/lustre/lustre/lov/lov_internal.h
index bdee0a6f3d4e..515a5c147827 100644
--- a/drivers/staging/lustre/lustre/lov/lov_internal.h
+++ b/drivers/staging/lustre/lustre/lov/lov_internal.h
@@ -234,7 +234,7 @@ void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars);
234extern struct lu_device_type lov_device_type; 234extern struct lu_device_type lov_device_type;
235 235
236/* pools */ 236/* pools */
237extern cfs_hash_ops_t pool_hash_operations; 237extern struct cfs_hash_ops pool_hash_operations;
238/* ost_pool methods */ 238/* ost_pool methods */
239int lov_ost_pool_init(struct ost_pool *op, unsigned int count); 239int lov_ost_pool_init(struct ost_pool *op, unsigned int count);
240int lov_ost_pool_extend(struct ost_pool *op, unsigned int min_count); 240int lov_ost_pool_extend(struct ost_pool *op, unsigned int min_count);
diff --git a/drivers/staging/lustre/lustre/lov/lov_pool.c b/drivers/staging/lustre/lustre/lov/lov_pool.c
index 2234321025d5..b03827ef6514 100644
--- a/drivers/staging/lustre/lustre/lov/lov_pool.c
+++ b/drivers/staging/lustre/lustre/lov/lov_pool.c
@@ -142,12 +142,12 @@ static void pool_hashrefcount_put_locked(struct cfs_hash *hs,
142 lov_pool_putref_locked(pool); 142 lov_pool_putref_locked(pool);
143} 143}
144 144
145cfs_hash_ops_t pool_hash_operations = { 145struct cfs_hash_ops pool_hash_operations = {
146 .hs_hash = pool_hashfn, 146 .hs_hash = pool_hashfn,
147 .hs_key = pool_key, 147 .hs_key = pool_key,
148 .hs_keycmp = pool_hashkey_keycmp, 148 .hs_keycmp = pool_hashkey_keycmp,
149 .hs_object = pool_hashobject, 149 .hs_object = pool_hashobject,
150 .hs_get = pool_hashrefcount_get, 150 .hs_get = pool_hashrefcount_get,
151 .hs_put_locked = pool_hashrefcount_put_locked, 151 .hs_put_locked = pool_hashrefcount_put_locked,
152 152
153}; 153};
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c b/drivers/staging/lustre/lustre/obdclass/cl_object.c
index f59c03cd4705..a1a6024220ff 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c
@@ -586,12 +586,12 @@ static void cl_env_hops_noop(struct cfs_hash *hs, struct hlist_node *hn)
586 LASSERT(cle->ce_magic == &cl_env_init0); 586 LASSERT(cle->ce_magic == &cl_env_init0);
587} 587}
588 588
589static cfs_hash_ops_t cl_env_hops = { 589static struct cfs_hash_ops cl_env_hops = {
590 .hs_hash = cl_env_hops_hash, 590 .hs_hash = cl_env_hops_hash,
591 .hs_key = cl_env_hops_obj, 591 .hs_key = cl_env_hops_obj,
592 .hs_keycmp = cl_env_hops_keycmp, 592 .hs_keycmp = cl_env_hops_keycmp,
593 .hs_object = cl_env_hops_obj, 593 .hs_object = cl_env_hops_obj,
594 .hs_get = cl_env_hops_noop, 594 .hs_get = cl_env_hops_noop,
595 .hs_put_locked = cl_env_hops_noop, 595 .hs_put_locked = cl_env_hops_noop,
596}; 596};
597 597
diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c
index 0d15bd5b05b7..0193608a930a 100644
--- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
@@ -916,12 +916,12 @@ static void lu_obj_hop_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
916 LBUG(); /* we should never called it */ 916 LBUG(); /* we should never called it */
917} 917}
918 918
919cfs_hash_ops_t lu_site_hash_ops = { 919struct cfs_hash_ops lu_site_hash_ops = {
920 .hs_hash = lu_obj_hop_hash, 920 .hs_hash = lu_obj_hop_hash,
921 .hs_key = lu_obj_hop_key, 921 .hs_key = lu_obj_hop_key,
922 .hs_keycmp = lu_obj_hop_keycmp, 922 .hs_keycmp = lu_obj_hop_keycmp,
923 .hs_object = lu_obj_hop_object, 923 .hs_object = lu_obj_hop_object,
924 .hs_get = lu_obj_hop_get, 924 .hs_get = lu_obj_hop_get,
925 .hs_put_locked = lu_obj_hop_put_locked, 925 .hs_put_locked = lu_obj_hop_put_locked,
926}; 926};
927 927
diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c
index 64753b39faf5..c231e0da0e2a 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_config.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c
@@ -47,7 +47,7 @@
47 47
48#include "llog_internal.h" 48#include "llog_internal.h"
49 49
50static cfs_hash_ops_t uuid_hash_ops; 50static struct cfs_hash_ops uuid_hash_ops;
51 51
52/*********** string parsing utils *********/ 52/*********** string parsing utils *********/
53 53
@@ -1473,11 +1473,11 @@ uuid_export_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
1473 class_export_put(exp); 1473 class_export_put(exp);
1474} 1474}
1475 1475
1476static cfs_hash_ops_t uuid_hash_ops = { 1476static struct cfs_hash_ops uuid_hash_ops = {
1477 .hs_hash = uuid_hash, 1477 .hs_hash = uuid_hash,
1478 .hs_key = uuid_key, 1478 .hs_key = uuid_key,
1479 .hs_keycmp = uuid_keycmp, 1479 .hs_keycmp = uuid_keycmp,
1480 .hs_object = uuid_export_object, 1480 .hs_object = uuid_export_object,
1481 .hs_get = uuid_export_get, 1481 .hs_get = uuid_export_get,
1482 .hs_put_locked = uuid_export_put_locked, 1482 .hs_put_locked = uuid_export_put_locked,
1483}; 1483};
diff --git a/drivers/staging/lustre/lustre/osc/osc_quota.c b/drivers/staging/lustre/lustre/osc/osc_quota.c
index df8cfb4fde28..199783103f71 100644
--- a/drivers/staging/lustre/lustre/osc/osc_quota.c
+++ b/drivers/staging/lustre/lustre/osc/osc_quota.c
@@ -193,7 +193,7 @@ oqi_exit(struct cfs_hash *hs, struct hlist_node *hnode)
193#define HASH_QUOTA_CUR_BITS 5 193#define HASH_QUOTA_CUR_BITS 5
194#define HASH_QUOTA_MAX_BITS 15 194#define HASH_QUOTA_MAX_BITS 15
195 195
196static cfs_hash_ops_t quota_hash_ops = { 196static struct cfs_hash_ops quota_hash_ops = {
197 .hs_hash = oqi_hashfn, 197 .hs_hash = oqi_hashfn,
198 .hs_keycmp = oqi_keycmp, 198 .hs_keycmp = oqi_keycmp,
199 .hs_key = oqi_key, 199 .hs_key = oqi_key,
diff --git a/drivers/staging/lustre/lustre/ptlrpc/connection.c b/drivers/staging/lustre/lustre/ptlrpc/connection.c
index 1ba1f5f2eeaa..da1f0b1ac3e3 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/connection.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/connection.c
@@ -42,7 +42,7 @@
42#include "ptlrpc_internal.h" 42#include "ptlrpc_internal.h"
43 43
44static struct cfs_hash *conn_hash; 44static struct cfs_hash *conn_hash;
45static cfs_hash_ops_t conn_hash_ops; 45static struct cfs_hash_ops conn_hash_ops;
46 46
47struct ptlrpc_connection * 47struct ptlrpc_connection *
48ptlrpc_connection_get(lnet_process_id_t peer, lnet_nid_t self, 48ptlrpc_connection_get(lnet_process_id_t peer, lnet_nid_t self,
@@ -230,12 +230,12 @@ conn_exit(struct cfs_hash *hs, struct hlist_node *hnode)
230 kfree(conn); 230 kfree(conn);
231} 231}
232 232
233static cfs_hash_ops_t conn_hash_ops = { 233static struct cfs_hash_ops conn_hash_ops = {
234 .hs_hash = conn_hashfn, 234 .hs_hash = conn_hashfn,
235 .hs_keycmp = conn_keycmp, 235 .hs_keycmp = conn_keycmp,
236 .hs_key = conn_key, 236 .hs_key = conn_key,
237 .hs_object = conn_object, 237 .hs_object = conn_object,
238 .hs_get = conn_get, 238 .hs_get = conn_get,
239 .hs_put_locked = conn_put_locked, 239 .hs_put_locked = conn_put_locked,
240 .hs_exit = conn_exit, 240 .hs_exit = conn_exit,
241}; 241};