Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db9fc06b authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman
Browse files

staging: lustre: change cfs_hash_ops_t to struct



Change cfs_hash_ops_t to struct cfs_hash_ops.

Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ccb006a5
Loading
Loading
Loading
Loading
+11 −10
Original line number Original line Diff line number Diff line
@@ -296,7 +296,7 @@ struct cfs_hash_hlist_ops {
			     struct cfs_hash_bd *bd, struct hlist_node *hnode);
			     struct cfs_hash_bd *bd, struct hlist_node *hnode);
};
};


typedef struct cfs_hash_ops {
struct cfs_hash_ops {
	/** return hashed value from @key */
	/** return hashed value from @key */
	unsigned (*hs_hash)(struct cfs_hash *hs, const void *key, unsigned mask);
	unsigned (*hs_hash)(struct cfs_hash *hs, const void *key, unsigned mask);
	/** return key address of @hnode */
	/** return key address of @hnode */
@@ -318,7 +318,7 @@ typedef struct cfs_hash_ops {
	void     (*hs_put_locked)(struct cfs_hash *hs, struct hlist_node *hnode);
	void     (*hs_put_locked)(struct cfs_hash *hs, struct hlist_node *hnode);
	/** it's called before removing of @hnode */
	/** it's called before removing of @hnode */
	void     (*hs_exit)(struct cfs_hash *hs, struct hlist_node *hnode);
	void     (*hs_exit)(struct cfs_hash *hs, struct hlist_node *hnode);
} cfs_hash_ops_t;
};


/** total number of buckets in @hs */
/** total number of buckets in @hs */
#define CFS_HASH_NBKT(hs)       \
#define CFS_HASH_NBKT(hs)       \
@@ -668,10 +668,11 @@ struct hlist_node *cfs_hash_dual_bd_finddel_locked(struct cfs_hash *hs,
						  struct hlist_node *hnode);
						  struct hlist_node *hnode);


/* Hash init/cleanup functions */
/* Hash init/cleanup functions */
struct cfs_hash *cfs_hash_create(char *name, unsigned cur_bits, unsigned max_bits,
struct cfs_hash *cfs_hash_create(char *name, unsigned cur_bits,
				 unsigned bkt_bits, unsigned extra_bytes,
				 unsigned max_bits, unsigned bkt_bits,
			    unsigned min_theta, unsigned max_theta,
				 unsigned extra_bytes, unsigned min_theta,
			    cfs_hash_ops_t *ops, unsigned flags);
				 unsigned max_theta, struct cfs_hash_ops *ops,
				 unsigned flags);


struct cfs_hash *cfs_hash_getref(struct cfs_hash *hs);
struct cfs_hash *cfs_hash_getref(struct cfs_hash *hs);
void cfs_hash_putref(struct cfs_hash *hs);
void cfs_hash_putref(struct cfs_hash *hs);
+9 −9
Original line number Original line Diff line number Diff line
@@ -531,7 +531,7 @@ static void ldlm_res_hop_put(struct cfs_hash *hs, struct hlist_node *hnode)
	ldlm_resource_putref(res);
	ldlm_resource_putref(res);
}
}


static cfs_hash_ops_t ldlm_ns_hash_ops = {
static struct cfs_hash_ops ldlm_ns_hash_ops = {
	.hs_hash	= ldlm_res_hop_hash,
	.hs_hash	= ldlm_res_hop_hash,
	.hs_key		= ldlm_res_hop_key,
	.hs_key		= ldlm_res_hop_key,
	.hs_keycmp      = ldlm_res_hop_keycmp,
	.hs_keycmp      = ldlm_res_hop_keycmp,
@@ -542,7 +542,7 @@ static cfs_hash_ops_t ldlm_ns_hash_ops = {
	.hs_put		= ldlm_res_hop_put
	.hs_put		= ldlm_res_hop_put
};
};


static cfs_hash_ops_t ldlm_ns_fid_hash_ops = {
static struct cfs_hash_ops ldlm_ns_fid_hash_ops = {
	.hs_hash	= ldlm_res_hop_fid_hash,
	.hs_hash	= ldlm_res_hop_fid_hash,
	.hs_key		= ldlm_res_hop_key,
	.hs_key		= ldlm_res_hop_key,
	.hs_keycmp      = ldlm_res_hop_keycmp,
	.hs_keycmp      = ldlm_res_hop_keycmp,
@@ -560,7 +560,7 @@ struct ldlm_ns_hash_def {
	/** hash bits */
	/** hash bits */
	unsigned	nsd_all_bits;
	unsigned	nsd_all_bits;
	/** hash operations */
	/** hash operations */
	cfs_hash_ops_t *nsd_hops;
	struct cfs_hash_ops *nsd_hops;
};
};


static struct ldlm_ns_hash_def ldlm_ns_hash_defs[] = {
static struct ldlm_ns_hash_def ldlm_ns_hash_defs[] = {
+1 −1
Original line number Original line Diff line number Diff line
@@ -1019,7 +1019,7 @@ struct cfs_hash *
cfs_hash_create(char *name, unsigned cur_bits, unsigned max_bits,
cfs_hash_create(char *name, unsigned cur_bits, unsigned max_bits,
		unsigned bkt_bits, unsigned extra_bytes,
		unsigned bkt_bits, unsigned extra_bytes,
		unsigned min_theta, unsigned max_theta,
		unsigned min_theta, unsigned max_theta,
		cfs_hash_ops_t *ops, unsigned flags)
		struct cfs_hash_ops *ops, unsigned flags)
{
{
	struct cfs_hash *hs;
	struct cfs_hash *hs;
	int	 len;
	int	 len;
+1 −1
Original line number Original line Diff line number Diff line
@@ -234,7 +234,7 @@ void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars);
extern struct lu_device_type lov_device_type;
extern struct lu_device_type lov_device_type;


/* pools */
/* pools */
extern cfs_hash_ops_t pool_hash_operations;
extern struct cfs_hash_ops pool_hash_operations;
/* ost_pool methods */
/* ost_pool methods */
int lov_ost_pool_init(struct ost_pool *op, unsigned int count);
int lov_ost_pool_init(struct ost_pool *op, unsigned int count);
int lov_ost_pool_extend(struct ost_pool *op, unsigned int min_count);
int lov_ost_pool_extend(struct ost_pool *op, unsigned int min_count);
+3 −3
Original line number Original line Diff line number Diff line
@@ -142,7 +142,7 @@ static void pool_hashrefcount_put_locked(struct cfs_hash *hs,
	lov_pool_putref_locked(pool);
	lov_pool_putref_locked(pool);
}
}


cfs_hash_ops_t pool_hash_operations = {
struct cfs_hash_ops pool_hash_operations = {
	.hs_hash	= pool_hashfn,
	.hs_hash	= pool_hashfn,
	.hs_key		= pool_key,
	.hs_key		= pool_key,
	.hs_keycmp      = pool_hashkey_keycmp,
	.hs_keycmp      = pool_hashkey_keycmp,
Loading