Commit 9bcb80cb authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman

staging: lustre: lnet: change lnet_handle_md_t to proper struct

Change lnet_handle_md_t from a typedef of another typedef into
a proper stand alone structure. Create the inline functions
LNetInvalidateMDHandle and LNetMDHandleIsInvalid to handle this
new piece of data.
Signed-off-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/20831Reviewed-by: default avatarOlaf Weber <olaf@sgi.com>
Reviewed-by: default avatarDoug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 48be378d
...@@ -128,13 +128,13 @@ int LNetMEUnlink(lnet_handle_me_t current_in); ...@@ -128,13 +128,13 @@ int LNetMEUnlink(lnet_handle_me_t current_in);
int LNetMDAttach(lnet_handle_me_t current_in, int LNetMDAttach(lnet_handle_me_t current_in,
lnet_md_t md_in, lnet_md_t md_in,
lnet_unlink_t unlink_in, lnet_unlink_t unlink_in,
lnet_handle_md_t *handle_out); struct lnet_handle_md *md_handle_out);
int LNetMDBind(lnet_md_t md_in, int LNetMDBind(lnet_md_t md_in,
lnet_unlink_t unlink_in, lnet_unlink_t unlink_in,
lnet_handle_md_t *handle_out); struct lnet_handle_md *md_handle_out);
int LNetMDUnlink(lnet_handle_md_t md_in); int LNetMDUnlink(struct lnet_handle_md md_in);
/** @} lnet_md */ /** @} lnet_md */
/** \defgroup lnet_eq Events and event queues /** \defgroup lnet_eq Events and event queues
...@@ -180,7 +180,7 @@ int LNetEQPoll(struct lnet_handle_eq *eventqs_in, ...@@ -180,7 +180,7 @@ int LNetEQPoll(struct lnet_handle_eq *eventqs_in,
* @{ * @{
*/ */
int LNetPut(lnet_nid_t self, int LNetPut(lnet_nid_t self,
lnet_handle_md_t md_in, struct lnet_handle_md md_in,
lnet_ack_req_t ack_req_in, lnet_ack_req_t ack_req_in,
lnet_process_id_t target_in, lnet_process_id_t target_in,
unsigned int portal_in, unsigned int portal_in,
...@@ -189,7 +189,7 @@ int LNetPut(lnet_nid_t self, ...@@ -189,7 +189,7 @@ int LNetPut(lnet_nid_t self,
__u64 hdr_data_in); __u64 hdr_data_in);
int LNetGet(lnet_nid_t self, int LNetGet(lnet_nid_t self,
lnet_handle_md_t md_in, struct lnet_handle_md md_in,
lnet_process_id_t target_in, lnet_process_id_t target_in,
unsigned int portal_in, unsigned int portal_in,
__u64 match_bits_in, __u64 match_bits_in,
......
...@@ -301,13 +301,13 @@ lnet_handle2eq(struct lnet_handle_eq *handle) ...@@ -301,13 +301,13 @@ lnet_handle2eq(struct lnet_handle_eq *handle)
} }
static inline void static inline void
lnet_md2handle(lnet_handle_md_t *handle, lnet_libmd_t *md) lnet_md2handle(struct lnet_handle_md *handle, lnet_libmd_t *md)
{ {
handle->cookie = md->md_lh.lh_cookie; handle->cookie = md->md_lh.lh_cookie;
} }
static inline lnet_libmd_t * static inline lnet_libmd_t *
lnet_handle2md(lnet_handle_md_t *handle) lnet_handle2md(struct lnet_handle_md *handle)
{ {
/* ALWAYS called with resource lock held */ /* ALWAYS called with resource lock held */
lnet_libhandle_t *lh; lnet_libhandle_t *lh;
......
...@@ -299,7 +299,7 @@ typedef struct lnet_ni { ...@@ -299,7 +299,7 @@ typedef struct lnet_ni {
typedef struct { typedef struct {
/* chain on the_lnet.ln_zombie_rcd or ln_deathrow_rcd */ /* chain on the_lnet.ln_zombie_rcd or ln_deathrow_rcd */
struct list_head rcd_list; struct list_head rcd_list;
lnet_handle_md_t rcd_mdh; /* ping buffer MD */ struct lnet_handle_md rcd_mdh; /* ping buffer MD */
struct lnet_peer *rcd_gateway; /* reference to gateway */ struct lnet_peer *rcd_gateway; /* reference to gateway */
struct lnet_ping_info *rcd_pinginfo; /* ping buffer */ struct lnet_ping_info *rcd_pinginfo; /* ping buffer */
} lnet_rc_data_t; } lnet_rc_data_t;
...@@ -597,7 +597,7 @@ typedef struct { ...@@ -597,7 +597,7 @@ typedef struct {
/* percpt router buffer pools */ /* percpt router buffer pools */
lnet_rtrbufpool_t **ln_rtrpools; lnet_rtrbufpool_t **ln_rtrpools;
lnet_handle_md_t ln_ping_target_md; struct lnet_handle_md ln_ping_target_md;
struct lnet_handle_eq ln_ping_target_eq; struct lnet_handle_eq ln_ping_target_eq;
struct lnet_ping_info *ln_ping_info; struct lnet_ping_info *ln_ping_info;
......
...@@ -284,7 +284,6 @@ typedef struct { ...@@ -284,7 +284,6 @@ typedef struct {
__u64 cookie; __u64 cookie;
} lnet_handle_any_t; } lnet_handle_any_t;
typedef lnet_handle_any_t lnet_handle_md_t;
typedef lnet_handle_any_t lnet_handle_me_t; typedef lnet_handle_any_t lnet_handle_me_t;
#define LNET_WIRE_HANDLE_COOKIE_NONE (-1) #define LNET_WIRE_HANDLE_COOKIE_NONE (-1)
...@@ -339,6 +338,28 @@ static inline int LNetEQHandleIsInvalid(struct lnet_handle_eq h) ...@@ -339,6 +338,28 @@ static inline int LNetEQHandleIsInvalid(struct lnet_handle_eq h)
return (LNET_WIRE_HANDLE_COOKIE_NONE == h.cookie); return (LNET_WIRE_HANDLE_COOKIE_NONE == h.cookie);
} }
struct lnet_handle_md {
u64 cookie;
};
/**
* Invalidate md handle @h.
*/
static inline void LNetInvalidateMDHandle(struct lnet_handle_md *h)
{
h->cookie = LNET_WIRE_HANDLE_COOKIE_NONE;
}
/**
* Check whether eq handle @h is invalid.
*
* @return 1 if handle is invalid, 0 if valid.
*/
static inline int LNetMDHandleIsInvalid(struct lnet_handle_md h)
{
return (LNET_WIRE_HANDLE_COOKIE_NONE == h.cookie);
}
/** /**
* Global process ID. * Global process ID.
*/ */
...@@ -611,7 +632,7 @@ typedef struct { ...@@ -611,7 +632,7 @@ typedef struct {
* The handle to the MD associated with the event. The handle may be * The handle to the MD associated with the event. The handle may be
* invalid if the MD has been unlinked. * invalid if the MD has been unlinked.
*/ */
lnet_handle_md_t md_handle; struct lnet_handle_md md_handle;
/** /**
* A snapshot of the state of the MD immediately after the event has * A snapshot of the state of the MD immediately after the event has
* been processed. In particular, the threshold field in md will * been processed. In particular, the threshold field in md will
......
...@@ -896,7 +896,8 @@ lnet_ping_event_handler(lnet_event_t *event) ...@@ -896,7 +896,8 @@ lnet_ping_event_handler(lnet_event_t *event)
} }
static int static int
lnet_ping_info_setup(struct lnet_ping_info **ppinfo, lnet_handle_md_t *md_handle, lnet_ping_info_setup(struct lnet_ping_info **ppinfo,
struct lnet_handle_md *md_handle,
int ni_count, bool set_eq) int ni_count, bool set_eq)
{ {
lnet_process_id_t id = {LNET_NID_ANY, LNET_PID_ANY}; lnet_process_id_t id = {LNET_NID_ANY, LNET_PID_ANY};
...@@ -961,12 +962,13 @@ lnet_ping_info_setup(struct lnet_ping_info **ppinfo, lnet_handle_md_t *md_handle ...@@ -961,12 +962,13 @@ lnet_ping_info_setup(struct lnet_ping_info **ppinfo, lnet_handle_md_t *md_handle
} }
static void static void
lnet_ping_md_unlink(struct lnet_ping_info *pinfo, lnet_handle_md_t *md_handle) lnet_ping_md_unlink(struct lnet_ping_info *pinfo,
struct lnet_handle_md *md_handle)
{ {
sigset_t blocked = cfs_block_allsigs(); sigset_t blocked = cfs_block_allsigs();
LNetMDUnlink(*md_handle); LNetMDUnlink(*md_handle);
LNetInvalidateHandle(md_handle); LNetInvalidateMDHandle(md_handle);
/* NB md could be busy; this just starts the unlink */ /* NB md could be busy; this just starts the unlink */
while (pinfo->pi_features != LNET_PING_FEAT_INVAL) { while (pinfo->pi_features != LNET_PING_FEAT_INVAL) {
...@@ -1003,10 +1005,11 @@ lnet_ping_info_install_locked(struct lnet_ping_info *ping_info) ...@@ -1003,10 +1005,11 @@ lnet_ping_info_install_locked(struct lnet_ping_info *ping_info)
} }
static void static void
lnet_ping_target_update(struct lnet_ping_info *pinfo, lnet_handle_md_t md_handle) lnet_ping_target_update(struct lnet_ping_info *pinfo,
struct lnet_handle_md md_handle)
{ {
struct lnet_ping_info *old_pinfo = NULL; struct lnet_ping_info *old_pinfo = NULL;
lnet_handle_md_t old_md; struct lnet_handle_md old_md;
/* switch the NIs to point to the new ping info created */ /* switch the NIs to point to the new ping info created */
lnet_net_lock(LNET_LOCK_EX); lnet_net_lock(LNET_LOCK_EX);
...@@ -1497,7 +1500,7 @@ LNetNIInit(lnet_pid_t requested_pid) ...@@ -1497,7 +1500,7 @@ LNetNIInit(lnet_pid_t requested_pid)
int rc; int rc;
int ni_count; int ni_count;
struct lnet_ping_info *pinfo; struct lnet_ping_info *pinfo;
lnet_handle_md_t md_handle; struct lnet_handle_md md_handle;
struct list_head net_head; struct list_head net_head;
INIT_LIST_HEAD(&net_head); INIT_LIST_HEAD(&net_head);
...@@ -1755,7 +1758,7 @@ lnet_dyn_add_ni(lnet_pid_t requested_pid, struct lnet_ioctl_config_data *conf) ...@@ -1755,7 +1758,7 @@ lnet_dyn_add_ni(lnet_pid_t requested_pid, struct lnet_ioctl_config_data *conf)
{ {
char *nets = conf->cfg_config_u.cfg_net.net_intf; char *nets = conf->cfg_config_u.cfg_net.net_intf;
struct lnet_ping_info *pinfo; struct lnet_ping_info *pinfo;
lnet_handle_md_t md_handle; struct lnet_handle_md md_handle;
struct lnet_ni *ni; struct lnet_ni *ni;
struct list_head net_head; struct list_head net_head;
lnet_remotenet_t *rnet; lnet_remotenet_t *rnet;
...@@ -1835,7 +1838,7 @@ lnet_dyn_del_ni(__u32 net) ...@@ -1835,7 +1838,7 @@ lnet_dyn_del_ni(__u32 net)
{ {
lnet_ni_t *ni; lnet_ni_t *ni;
struct lnet_ping_info *pinfo; struct lnet_ping_info *pinfo;
lnet_handle_md_t md_handle; struct lnet_handle_md md_handle;
int rc; int rc;
/* don't allow userspace to shutdown the LOLND */ /* don't allow userspace to shutdown the LOLND */
...@@ -2139,7 +2142,7 @@ static int lnet_ping(lnet_process_id_t id, int timeout_ms, ...@@ -2139,7 +2142,7 @@ static int lnet_ping(lnet_process_id_t id, int timeout_ms,
lnet_process_id_t __user *ids, int n_ids) lnet_process_id_t __user *ids, int n_ids)
{ {
struct lnet_handle_eq eqh; struct lnet_handle_eq eqh;
lnet_handle_md_t mdh; struct lnet_handle_md mdh;
lnet_event_t event; lnet_event_t event;
lnet_md_t md = { NULL }; lnet_md_t md = { NULL };
int which; int which;
......
...@@ -268,7 +268,7 @@ lnet_md_validate(lnet_md_t *umd) ...@@ -268,7 +268,7 @@ lnet_md_validate(lnet_md_t *umd)
*/ */
int int
LNetMDAttach(lnet_handle_me_t meh, lnet_md_t umd, LNetMDAttach(lnet_handle_me_t meh, lnet_md_t umd,
lnet_unlink_t unlink, lnet_handle_md_t *handle) lnet_unlink_t unlink, struct lnet_handle_md *handle)
{ {
LIST_HEAD(matches); LIST_HEAD(matches);
LIST_HEAD(drops); LIST_HEAD(drops);
...@@ -350,7 +350,8 @@ EXPORT_SYMBOL(LNetMDAttach); ...@@ -350,7 +350,8 @@ EXPORT_SYMBOL(LNetMDAttach);
* LNetInvalidateHandle() on it. * LNetInvalidateHandle() on it.
*/ */
int int
LNetMDBind(lnet_md_t umd, lnet_unlink_t unlink, lnet_handle_md_t *handle) LNetMDBind(lnet_md_t umd, lnet_unlink_t unlink,
struct lnet_handle_md *handle)
{ {
lnet_libmd_t *md; lnet_libmd_t *md;
int cpt; int cpt;
...@@ -425,7 +426,7 @@ EXPORT_SYMBOL(LNetMDBind); ...@@ -425,7 +426,7 @@ EXPORT_SYMBOL(LNetMDBind);
* \retval -ENOENT If \a mdh does not point to a valid MD object. * \retval -ENOENT If \a mdh does not point to a valid MD object.
*/ */
int int
LNetMDUnlink(lnet_handle_md_t mdh) LNetMDUnlink(struct lnet_handle_md mdh)
{ {
lnet_event_t ev; lnet_event_t ev;
lnet_libmd_t *md; lnet_libmd_t *md;
......
...@@ -1988,7 +1988,7 @@ lnet_recv_delayed_msg_list(struct list_head *head) ...@@ -1988,7 +1988,7 @@ lnet_recv_delayed_msg_list(struct list_head *head)
* \see lnet_event_t::hdr_data and lnet_event_kind_t. * \see lnet_event_t::hdr_data and lnet_event_kind_t.
*/ */
int int
LNetPut(lnet_nid_t self, lnet_handle_md_t mdh, lnet_ack_req_t ack, LNetPut(lnet_nid_t self, struct lnet_handle_md mdh, lnet_ack_req_t ack,
lnet_process_id_t target, unsigned int portal, lnet_process_id_t target, unsigned int portal,
__u64 match_bits, unsigned int offset, __u64 match_bits, unsigned int offset,
__u64 hdr_data) __u64 hdr_data)
...@@ -2193,7 +2193,7 @@ EXPORT_SYMBOL(lnet_set_reply_msg_len); ...@@ -2193,7 +2193,7 @@ EXPORT_SYMBOL(lnet_set_reply_msg_len);
* \retval -ENOENT Invalid MD object. * \retval -ENOENT Invalid MD object.
*/ */
int int
LNetGet(lnet_nid_t self, lnet_handle_md_t mdh, LNetGet(lnet_nid_t self, struct lnet_handle_md mdh,
lnet_process_id_t target, unsigned int portal, lnet_process_id_t target, unsigned int portal,
__u64 match_bits, unsigned int offset) __u64 match_bits, unsigned int offset)
{ {
......
...@@ -739,7 +739,7 @@ lnet_router_checker_event(lnet_event_t *event) ...@@ -739,7 +739,7 @@ lnet_router_checker_event(lnet_event_t *event)
LASSERT(rcd); LASSERT(rcd);
if (event->unlinked) { if (event->unlinked) {
LNetInvalidateHandle(&rcd->rcd_mdh); LNetInvalidateMDHandle(&rcd->rcd_mdh);
return; return;
} }
...@@ -882,7 +882,7 @@ lnet_destroy_rc_data(lnet_rc_data_t *rcd) ...@@ -882,7 +882,7 @@ lnet_destroy_rc_data(lnet_rc_data_t *rcd)
{ {
LASSERT(list_empty(&rcd->rcd_list)); LASSERT(list_empty(&rcd->rcd_list));
/* detached from network */ /* detached from network */
LASSERT(LNetHandleIsInvalid(rcd->rcd_mdh)); LASSERT(LNetMDHandleIsInvalid(rcd->rcd_mdh));
if (rcd->rcd_gateway) { if (rcd->rcd_gateway) {
int cpt = rcd->rcd_gateway->lp_cpt; int cpt = rcd->rcd_gateway->lp_cpt;
...@@ -913,7 +913,7 @@ lnet_create_rc_data_locked(lnet_peer_t *gateway) ...@@ -913,7 +913,7 @@ lnet_create_rc_data_locked(lnet_peer_t *gateway)
if (!rcd) if (!rcd)
goto out; goto out;
LNetInvalidateHandle(&rcd->rcd_mdh); LNetInvalidateMDHandle(&rcd->rcd_mdh);
INIT_LIST_HEAD(&rcd->rcd_list); INIT_LIST_HEAD(&rcd->rcd_list);
LIBCFS_ALLOC(pi, LNET_PINGINFO_SIZE); LIBCFS_ALLOC(pi, LNET_PINGINFO_SIZE);
...@@ -957,7 +957,7 @@ lnet_create_rc_data_locked(lnet_peer_t *gateway) ...@@ -957,7 +957,7 @@ lnet_create_rc_data_locked(lnet_peer_t *gateway)
out: out:
if (rcd) { if (rcd) {
if (!LNetHandleIsInvalid(rcd->rcd_mdh)) { if (!LNetMDHandleIsInvalid(rcd->rcd_mdh)) {
rc = LNetMDUnlink(rcd->rcd_mdh); rc = LNetMDUnlink(rcd->rcd_mdh);
LASSERT(!rc); LASSERT(!rc);
} }
...@@ -1023,7 +1023,7 @@ lnet_ping_router_locked(lnet_peer_t *rtr) ...@@ -1023,7 +1023,7 @@ lnet_ping_router_locked(lnet_peer_t *rtr)
cfs_time_seconds(secs)))) { cfs_time_seconds(secs)))) {
int rc; int rc;
lnet_process_id_t id; lnet_process_id_t id;
lnet_handle_md_t mdh; struct lnet_handle_md mdh;
id.nid = rtr->lp_nid; id.nid = rtr->lp_nid;
id.pid = LNET_PID_LUSTRE; id.pid = LNET_PID_LUSTRE;
...@@ -1171,7 +1171,7 @@ lnet_prune_rc_data(int wait_unlink) ...@@ -1171,7 +1171,7 @@ lnet_prune_rc_data(int wait_unlink)
while (!list_empty(&the_lnet.ln_rcd_zombie)) { while (!list_empty(&the_lnet.ln_rcd_zombie)) {
list_for_each_entry_safe(rcd, tmp, &the_lnet.ln_rcd_zombie, list_for_each_entry_safe(rcd, tmp, &the_lnet.ln_rcd_zombie,
rcd_list) { rcd_list) {
if (LNetHandleIsInvalid(rcd->rcd_mdh)) if (LNetMDHandleIsInvalid(rcd->rcd_mdh))
list_move(&rcd->rcd_list, &head); list_move(&rcd->rcd_list, &head);
} }
......
...@@ -185,7 +185,7 @@ srpc_init_server_rpc(struct srpc_server_rpc *rpc, ...@@ -185,7 +185,7 @@ srpc_init_server_rpc(struct srpc_server_rpc *rpc,
rpc->srpc_reqstbuf = buffer; rpc->srpc_reqstbuf = buffer;
rpc->srpc_peer = buffer->buf_peer; rpc->srpc_peer = buffer->buf_peer;
rpc->srpc_self = buffer->buf_self; rpc->srpc_self = buffer->buf_self;
LNetInvalidateHandle(&rpc->srpc_replymdh); LNetInvalidateMDHandle(&rpc->srpc_replymdh);
} }
static void static void
...@@ -356,7 +356,7 @@ srpc_remove_service(struct srpc_service *sv) ...@@ -356,7 +356,7 @@ srpc_remove_service(struct srpc_service *sv)
static int static int
srpc_post_passive_rdma(int portal, int local, __u64 matchbits, void *buf, srpc_post_passive_rdma(int portal, int local, __u64 matchbits, void *buf,
int len, int options, lnet_process_id_t peer, int len, int options, lnet_process_id_t peer,
lnet_handle_md_t *mdh, struct srpc_event *ev) struct lnet_handle_md *mdh, struct srpc_event *ev)
{ {
int rc; int rc;
lnet_md_t md; lnet_md_t md;
...@@ -395,7 +395,7 @@ srpc_post_passive_rdma(int portal, int local, __u64 matchbits, void *buf, ...@@ -395,7 +395,7 @@ srpc_post_passive_rdma(int portal, int local, __u64 matchbits, void *buf,
static int static int
srpc_post_active_rdma(int portal, __u64 matchbits, void *buf, int len, srpc_post_active_rdma(int portal, __u64 matchbits, void *buf, int len,
int options, lnet_process_id_t peer, lnet_nid_t self, int options, lnet_process_id_t peer, lnet_nid_t self,
lnet_handle_md_t *mdh, struct srpc_event *ev) struct lnet_handle_md *mdh, struct srpc_event *ev)
{ {
int rc; int rc;
lnet_md_t md; lnet_md_t md;
...@@ -448,7 +448,7 @@ srpc_post_active_rdma(int portal, __u64 matchbits, void *buf, int len, ...@@ -448,7 +448,7 @@ srpc_post_active_rdma(int portal, __u64 matchbits, void *buf, int len,
static int static int
srpc_post_passive_rqtbuf(int service, int local, void *buf, int len, srpc_post_passive_rqtbuf(int service, int local, void *buf, int len,
lnet_handle_md_t *mdh, struct srpc_event *ev) struct lnet_handle_md *mdh, struct srpc_event *ev)
{ {
lnet_process_id_t any = { 0 }; lnet_process_id_t any = { 0 };
...@@ -468,7 +468,7 @@ __must_hold(&scd->scd_lock) ...@@ -468,7 +468,7 @@ __must_hold(&scd->scd_lock)
struct srpc_msg *msg = &buf->buf_msg; struct srpc_msg *msg = &buf->buf_msg;
int rc; int rc;
LNetInvalidateHandle(&buf->buf_mdh); LNetInvalidateMDHandle(&buf->buf_mdh);
list_add(&buf->buf_list, &scd->scd_buf_posted); list_add(&buf->buf_list, &scd->scd_buf_posted);
scd->scd_buf_nposted++; scd->scd_buf_nposted++;
spin_unlock(&scd->scd_lock); spin_unlock(&scd->scd_lock);
......
...@@ -153,7 +153,7 @@ struct srpc_event { ...@@ -153,7 +153,7 @@ struct srpc_event {
/* bulk descriptor */ /* bulk descriptor */
struct srpc_bulk { struct srpc_bulk {
int bk_len; /* len of bulk data */ int bk_len; /* len of bulk data */
lnet_handle_md_t bk_mdh; struct lnet_handle_md bk_mdh;
int bk_sink; /* sink/source */ int bk_sink; /* sink/source */
int bk_niov; /* # iov in bk_iovs */ int bk_niov; /* # iov in bk_iovs */
lnet_kiov_t bk_iovs[0]; lnet_kiov_t bk_iovs[0];
...@@ -163,7 +163,7 @@ struct srpc_bulk { ...@@ -163,7 +163,7 @@ struct srpc_bulk {
struct srpc_buffer { struct srpc_buffer {
struct list_head buf_list; /* chain on srpc_service::*_msgq */ struct list_head buf_list; /* chain on srpc_service::*_msgq */
struct srpc_msg buf_msg; struct srpc_msg buf_msg;
lnet_handle_md_t buf_mdh; struct lnet_handle_md buf_mdh;
lnet_nid_t buf_self; lnet_nid_t buf_self;
lnet_process_id_t buf_peer; lnet_process_id_t buf_peer;
}; };
...@@ -188,7 +188,7 @@ struct srpc_server_rpc { ...@@ -188,7 +188,7 @@ struct srpc_server_rpc {
lnet_nid_t srpc_self; lnet_nid_t srpc_self;
lnet_process_id_t srpc_peer; lnet_process_id_t srpc_peer;
struct srpc_msg srpc_replymsg; struct srpc_msg srpc_replymsg;
lnet_handle_md_t srpc_replymdh; struct lnet_handle_md srpc_replymdh;
struct srpc_buffer *srpc_reqstbuf; struct srpc_buffer *srpc_reqstbuf;
struct srpc_bulk *srpc_bulk; struct srpc_bulk *srpc_bulk;
...@@ -225,8 +225,8 @@ struct srpc_client_rpc { ...@@ -225,8 +225,8 @@ struct srpc_client_rpc {
/* bulk, request(reqst), and reply exchanged on wire */ /* bulk, request(reqst), and reply exchanged on wire */
struct srpc_msg crpc_reqstmsg; struct srpc_msg crpc_reqstmsg;
struct srpc_msg crpc_replymsg; struct srpc_msg crpc_replymsg;
lnet_handle_md_t crpc_reqstmdh; struct lnet_handle_md crpc_reqstmdh;
lnet_handle_md_t crpc_replymdh; struct lnet_handle_md crpc_replymdh;
struct srpc_bulk crpc_bulk; struct srpc_bulk crpc_bulk;
}; };
...@@ -545,9 +545,9 @@ srpc_init_client_rpc(struct srpc_client_rpc *rpc, lnet_process_id_t peer, ...@@ -545,9 +545,9 @@ srpc_init_client_rpc(struct srpc_client_rpc *rpc, lnet_process_id_t peer,
rpc->crpc_bulk.bk_niov = nbulkiov; rpc->crpc_bulk.bk_niov = nbulkiov;
rpc->crpc_done = rpc_done; rpc->crpc_done = rpc_done;
rpc->crpc_fini = rpc_fini; rpc->crpc_fini = rpc_fini;
LNetInvalidateHandle(&rpc->crpc_reqstmdh); LNetInvalidateMDHandle(&rpc->crpc_reqstmdh);
LNetInvalidateHandle(&rpc->crpc_replymdh); LNetInvalidateMDHandle(&rpc->crpc_replymdh);
LNetInvalidateHandle(&rpc->crpc_bulk.bk_mdh); LNetInvalidateMDHandle(&rpc->crpc_bulk.bk_mdh);
/* no event is expected at this point */ /* no event is expected at this point */
rpc->crpc_bulkev.ev_fired = 1; rpc->crpc_bulkev.ev_fired = 1;
......
...@@ -457,7 +457,7 @@ struct ptlrpc_reply_state { ...@@ -457,7 +457,7 @@ struct ptlrpc_reply_state {
struct obd_export *rs_export; struct obd_export *rs_export;
struct ptlrpc_service_part *rs_svcpt; struct ptlrpc_service_part *rs_svcpt;
/** Lnet metadata handle for the reply */ /** Lnet metadata handle for the reply */
lnet_handle_md_t rs_md_h; struct lnet_handle_md rs_md_h;
/** Context for the service thread */ /** Context for the service thread */
struct ptlrpc_svc_ctx *rs_svc_ctx; struct ptlrpc_svc_ctx *rs_svc_ctx;
...@@ -586,11 +586,11 @@ struct ptlrpc_cli_req { ...@@ -586,11 +586,11 @@ struct ptlrpc_cli_req {
/** Link back to the request set */ /** Link back to the request set */
struct ptlrpc_request_set *cr_set; struct ptlrpc_request_set *cr_set;
/** outgoing request MD handle */ /** outgoing request MD handle */
lnet_handle_md_t cr_req_md_h; struct lnet_handle_md cr_req_md_h;
/** request-out callback parameter */ /** request-out callback parameter */
struct ptlrpc_cb_id cr_req_cbid; struct ptlrpc_cb_id cr_req_cbid;
/** incoming reply MD handle */ /** incoming reply MD handle */
lnet_handle_md_t cr_reply_md_h; struct lnet_handle_md cr_reply_md_h;
wait_queue_head_t cr_reply_waitq; wait_queue_head_t cr_reply_waitq;
/** reply callback parameter */ /** reply callback parameter */
struct ptlrpc_cb_id cr_reply_cbid; struct ptlrpc_cb_id cr_reply_cbid;
...@@ -1225,7 +1225,7 @@ struct ptlrpc_bulk_desc { ...@@ -1225,7 +1225,7 @@ struct ptlrpc_bulk_desc {
int bd_md_count; /* # valid entries in bd_mds */ int bd_md_count; /* # valid entries in bd_mds */
int bd_md_max_brw; /* max entries in bd_mds */ int bd_md_max_brw; /* max entries in bd_mds */
/** array of associated MDs */ /** array of associated MDs */
lnet_handle_md_t bd_mds[PTLRPC_BULK_OPS_COUNT]; struct lnet_handle_md bd_mds[PTLRPC_BULK_OPS_COUNT];
union { union {
struct { struct {
...@@ -1376,7 +1376,7 @@ struct ptlrpc_request_buffer_desc { ...@@ -1376,7 +1376,7 @@ struct ptlrpc_request_buffer_desc {
/** Back pointer to service for which this buffer is registered */ /** Back pointer to service for which this buffer is registered */
struct ptlrpc_service_part *rqbd_svcpt; struct ptlrpc_service_part *rqbd_svcpt;
/** LNet descriptor */ /** LNet descriptor */
lnet_handle_md_t rqbd_md_h; struct lnet_handle_md rqbd_md_h;
int rqbd_refcount; int rqbd_refcount;
/** The buffer itself */ /** The buffer itself */
char *rqbd_buffer; char *rqbd_buffer;
......
...@@ -151,7 +151,7 @@ struct ptlrpc_bulk_desc *ptlrpc_new_bulk(unsigned int nfrags, ...@@ -151,7 +151,7 @@ struct ptlrpc_bulk_desc *ptlrpc_new_bulk(unsigned int nfrags,
* node. Negotiated ocd_brw_size will always be <= this number. * node. Negotiated ocd_brw_size will always be <= this number.
*/ */
for (i = 0; i < PTLRPC_BULK_OPS_COUNT; i++) for (i = 0; i < PTLRPC_BULK_OPS_COUNT; i++)
LNetInvalidateHandle(&desc->bd_mds[i]); LNetInvalidateMDHandle(&desc->bd_mds[i]);
return desc; return desc;
free_desc: free_desc:
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
* over \a conn connection to portal \a portal. * over \a conn connection to portal \a portal.
* Returns 0 on success or error code. * Returns 0 on success or error code.
*/ */
static int ptl_send_buf(lnet_handle_md_t *mdh, void *base, int len, static int ptl_send_buf(struct lnet_handle_md *mdh, void *base, int len,
lnet_ack_req_t ack, struct ptlrpc_cb_id *cbid, lnet_ack_req_t ack, struct ptlrpc_cb_id *cbid,
struct ptlrpc_connection *conn, int portal, __u64 xid, struct ptlrpc_connection *conn, int portal, __u64 xid,
unsigned int offset) unsigned int offset)
...@@ -94,7 +94,7 @@ static int ptl_send_buf(lnet_handle_md_t *mdh, void *base, int len, ...@@ -94,7 +94,7 @@ static int ptl_send_buf(lnet_handle_md_t *mdh, void *base, int len,
return 0; return 0;
} }
static void mdunlink_iterate_helper(lnet_handle_md_t *bd_mds, int count) static void mdunlink_iterate_helper(struct lnet_handle_md *bd_mds, int count)
{ {
int i; int i;
......
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