mirror of
https://github.com/torvalds/linux.git
synced 2024-12-25 20:32:22 +00:00
staging: lustre: lnet: change lnet_libhandle_t to proper structure
Change lnet_libhandle_t from typedef to proper structure. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/20831 Reviewed-by: Olaf Weber <olaf@sgi.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a9a5ac68c5
commit
3589a05570
@ -266,12 +266,12 @@ lnet_msg_free(struct lnet_msg *msg)
|
||||
LIBCFS_FREE(msg, sizeof(*msg));
|
||||
}
|
||||
|
||||
lnet_libhandle_t *lnet_res_lh_lookup(struct lnet_res_container *rec,
|
||||
__u64 cookie);
|
||||
struct lnet_libhandle *lnet_res_lh_lookup(struct lnet_res_container *rec,
|
||||
__u64 cookie);
|
||||
void lnet_res_lh_initialize(struct lnet_res_container *rec,
|
||||
lnet_libhandle_t *lh);
|
||||
struct lnet_libhandle *lh);
|
||||
static inline void
|
||||
lnet_res_lh_invalidate(lnet_libhandle_t *lh)
|
||||
lnet_res_lh_invalidate(struct lnet_libhandle *lh)
|
||||
{
|
||||
/* NB: cookie is still useful, don't reset it */
|
||||
list_del(&lh->lh_hash_chain);
|
||||
@ -291,7 +291,7 @@ lnet_eq2handle(struct lnet_handle_eq *handle, lnet_eq_t *eq)
|
||||
static inline lnet_eq_t *
|
||||
lnet_handle2eq(struct lnet_handle_eq *handle)
|
||||
{
|
||||
lnet_libhandle_t *lh;
|
||||
struct lnet_libhandle *lh;
|
||||
|
||||
lh = lnet_res_lh_lookup(&the_lnet.ln_eq_container, handle->cookie);
|
||||
if (!lh)
|
||||
@ -310,7 +310,7 @@ static inline lnet_libmd_t *
|
||||
lnet_handle2md(struct lnet_handle_md *handle)
|
||||
{
|
||||
/* ALWAYS called with resource lock held */
|
||||
lnet_libhandle_t *lh;
|
||||
struct lnet_libhandle *lh;
|
||||
int cpt;
|
||||
|
||||
cpt = lnet_cpt_of_cookie(handle->cookie);
|
||||
@ -326,7 +326,7 @@ static inline lnet_libmd_t *
|
||||
lnet_wire_handle2md(struct lnet_handle_wire *wh)
|
||||
{
|
||||
/* ALWAYS called with resource lock held */
|
||||
lnet_libhandle_t *lh;
|
||||
struct lnet_libhandle *lh;
|
||||
int cpt;
|
||||
|
||||
if (wh->wh_interface_cookie != the_lnet.ln_interface_cookie)
|
||||
@ -351,7 +351,7 @@ static inline lnet_me_t *
|
||||
lnet_handle2me(struct lnet_handle_me *handle)
|
||||
{
|
||||
/* ALWAYS called with resource lock held */
|
||||
lnet_libhandle_t *lh;
|
||||
struct lnet_libhandle *lh;
|
||||
int cpt;
|
||||
|
||||
cpt = lnet_cpt_of_cookie(handle->cookie);
|
||||
|
@ -108,17 +108,17 @@ struct lnet_msg {
|
||||
struct lnet_hdr msg_hdr;
|
||||
};
|
||||
|
||||
typedef struct lnet_libhandle {
|
||||
struct lnet_libhandle {
|
||||
struct list_head lh_hash_chain;
|
||||
__u64 lh_cookie;
|
||||
} lnet_libhandle_t;
|
||||
};
|
||||
|
||||
#define lh_entry(ptr, type, member) \
|
||||
((type *)((char *)(ptr) - (char *)(&((type *)0)->member)))
|
||||
|
||||
typedef struct lnet_eq {
|
||||
struct list_head eq_list;
|
||||
lnet_libhandle_t eq_lh;
|
||||
struct lnet_libhandle eq_lh;
|
||||
lnet_seq_t eq_enq_seq;
|
||||
lnet_seq_t eq_deq_seq;
|
||||
unsigned int eq_size;
|
||||
@ -129,7 +129,7 @@ typedef struct lnet_eq {
|
||||
|
||||
typedef struct lnet_me {
|
||||
struct list_head me_list;
|
||||
lnet_libhandle_t me_lh;
|
||||
struct lnet_libhandle me_lh;
|
||||
lnet_process_id_t me_match_id;
|
||||
unsigned int me_portal;
|
||||
unsigned int me_pos; /* hash offset in mt_hash */
|
||||
@ -141,7 +141,7 @@ typedef struct lnet_me {
|
||||
|
||||
typedef struct lnet_libmd {
|
||||
struct list_head md_list;
|
||||
lnet_libhandle_t md_lh;
|
||||
struct lnet_libhandle md_lh;
|
||||
lnet_me_t *md_me;
|
||||
char *md_start;
|
||||
unsigned int md_offset;
|
||||
|
@ -483,12 +483,12 @@ lnet_res_containers_create(int type)
|
||||
return recs;
|
||||
}
|
||||
|
||||
lnet_libhandle_t *
|
||||
struct lnet_libhandle *
|
||||
lnet_res_lh_lookup(struct lnet_res_container *rec, __u64 cookie)
|
||||
{
|
||||
/* ALWAYS called with lnet_res_lock held */
|
||||
struct list_head *head;
|
||||
lnet_libhandle_t *lh;
|
||||
struct lnet_libhandle *lh;
|
||||
unsigned int hash;
|
||||
|
||||
if ((cookie & LNET_COOKIE_MASK) != rec->rec_type)
|
||||
@ -506,7 +506,8 @@ lnet_res_lh_lookup(struct lnet_res_container *rec, __u64 cookie)
|
||||
}
|
||||
|
||||
void
|
||||
lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh)
|
||||
lnet_res_lh_initialize(struct lnet_res_container *rec,
|
||||
struct lnet_libhandle *lh)
|
||||
{
|
||||
/* ALWAYS called with lnet_res_lock held */
|
||||
unsigned int ibits = LNET_COOKIE_TYPE_BITS + LNET_CPT_BITS;
|
||||
|
Loading…
Reference in New Issue
Block a user