diff options
author | James Simmons <jsimmons@infradead.org> | 2017-02-26 19:41:51 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-06 09:17:05 +0100 |
commit | 06ef1af8b48455d17e26732bbcdc685d6b319a02 (patch) | |
tree | ee85a8fb85b9d4524e968eec9efc69c3db7399ed /drivers/staging/lustre/lnet | |
parent | 16b9ab7f527b294e08f166e640baf7f3ed4c5c98 (diff) |
staging: lustre: lnet: change lnet_process_id_t to proper structure
Change lnet_process_id_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>
Diffstat (limited to 'drivers/staging/lustre/lnet')
18 files changed, 109 insertions, 103 deletions
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c index 0c9b40f77a07..e850f4c5fb4c 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -1482,7 +1482,7 @@ kiblnd_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg) { struct lnet_hdr *hdr = &lntmsg->msg_hdr; int type = lntmsg->msg_type; - lnet_process_id_t target = lntmsg->msg_target; + struct lnet_process_id target = lntmsg->msg_target; int target_is_router = lntmsg->msg_target_is_router; int routing = lntmsg->msg_routing; unsigned int payload_niov = lntmsg->msg_niov; @@ -1653,7 +1653,7 @@ kiblnd_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg) static void kiblnd_reply(struct lnet_ni *ni, struct kib_rx *rx, struct lnet_msg *lntmsg) { - lnet_process_id_t target = lntmsg->msg_target; + struct lnet_process_id target = lntmsg->msg_target; unsigned int niov = lntmsg->msg_niov; struct kvec *iov = lntmsg->msg_iov; lnet_kiov_t *kiov = lntmsg->msg_kiov; diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c index f92fa4be06fa..fbbd8a5489e9 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c @@ -97,7 +97,7 @@ ksocknal_destroy_route(struct ksock_route *route) static int ksocknal_create_peer(struct ksock_peer **peerp, struct lnet_ni *ni, - lnet_process_id_t id) + struct lnet_process_id id) { int cpt = lnet_cpt_of_nid(id.nid); struct ksock_net *net = ni->ni_data; @@ -173,7 +173,7 @@ ksocknal_destroy_peer(struct ksock_peer *peer) } struct ksock_peer * -ksocknal_find_peer_locked(struct lnet_ni *ni, lnet_process_id_t id) +ksocknal_find_peer_locked(struct lnet_ni *ni, struct lnet_process_id id) { struct list_head *peer_list = ksocknal_nid2peerlist(id.nid); struct list_head *tmp; @@ -200,7 +200,7 @@ ksocknal_find_peer_locked(struct lnet_ni *ni, lnet_process_id_t id) } struct ksock_peer * -ksocknal_find_peer(struct lnet_ni *ni, lnet_process_id_t id) +ksocknal_find_peer(struct lnet_ni *ni, struct lnet_process_id id) { struct ksock_peer *peer; @@ -247,7 +247,7 @@ ksocknal_unlink_peer_locked(struct ksock_peer *peer) static int ksocknal_get_peer_info(struct lnet_ni *ni, int index, - lnet_process_id_t *id, __u32 *myip, __u32 *peer_ip, + struct lnet_process_id *id, __u32 *myip, __u32 *peer_ip, int *port, int *conn_count, int *share_count) { struct ksock_peer *peer; @@ -450,7 +450,7 @@ ksocknal_del_route_locked(struct ksock_route *route) } int -ksocknal_add_peer(struct lnet_ni *ni, lnet_process_id_t id, __u32 ipaddr, +ksocknal_add_peer(struct lnet_ni *ni, struct lnet_process_id id, __u32 ipaddr, int port) { struct list_head *tmp; @@ -569,7 +569,7 @@ ksocknal_del_peer_locked(struct ksock_peer *peer, __u32 ip) } static int -ksocknal_del_peer(struct lnet_ni *ni, lnet_process_id_t id, __u32 ip) +ksocknal_del_peer(struct lnet_ni *ni, struct lnet_process_id id, __u32 ip) { LIST_HEAD(zombies); struct list_head *ptmp; @@ -1031,7 +1031,7 @@ ksocknal_create_conn(struct lnet_ni *ni, struct ksock_route *route, { rwlock_t *global_lock = &ksocknal_data.ksnd_global_lock; LIST_HEAD(zombies); - lnet_process_id_t peerid; + struct lnet_process_id peerid; struct list_head *tmp; __u64 incarnation; struct ksock_conn *conn; @@ -1764,7 +1764,7 @@ ksocknal_close_conn_and_siblings(struct ksock_conn *conn, int why) } int -ksocknal_close_matching_conns(lnet_process_id_t id, __u32 ipaddr) +ksocknal_close_matching_conns(struct lnet_process_id id, __u32 ipaddr) { struct ksock_peer *peer; struct list_head *ptmp; @@ -1817,7 +1817,7 @@ ksocknal_notify(struct lnet_ni *ni, lnet_nid_t gw_nid, int alive) * The router is telling me she's been notified of a change in * gateway state.... */ - lnet_process_id_t id = {0}; + struct lnet_process_id id = {0}; id.nid = gw_nid; id.pid = LNET_PID_ANY; @@ -1845,7 +1845,7 @@ ksocknal_query(struct lnet_ni *ni, lnet_nid_t nid, unsigned long *when) unsigned long now = cfs_time_current(); struct ksock_peer *peer = NULL; rwlock_t *glock = &ksocknal_data.ksnd_global_lock; - lnet_process_id_t id = { + struct lnet_process_id id = { .nid = nid, .pid = LNET_PID_LUSTRE, }; @@ -1933,7 +1933,7 @@ ksocknal_push_peer(struct ksock_peer *peer) } } -static int ksocknal_push(struct lnet_ni *ni, lnet_process_id_t id) +static int ksocknal_push(struct lnet_ni *ni, struct lnet_process_id id) { struct list_head *start; struct list_head *end; @@ -2135,7 +2135,7 @@ ksocknal_del_interface(struct lnet_ni *ni, __u32 ipaddress) int ksocknal_ctl(struct lnet_ni *ni, unsigned int cmd, void *arg) { - lnet_process_id_t id = {0}; + struct lnet_process_id id = {0}; struct libcfs_ioctl_data *data = arg; int rc; @@ -2592,7 +2592,7 @@ ksocknal_shutdown(struct lnet_ni *ni) { struct ksock_net *net = ni->ni_data; int i; - lnet_process_id_t anyid = {0}; + struct lnet_process_id anyid = {0}; anyid.nid = LNET_NID_ANY; anyid.pid = LNET_PID_ANY; diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h index 99fec18bc273..3f48b6003f7e 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h @@ -428,7 +428,7 @@ struct ksock_peer { unsigned long ksnp_last_alive; /* when (in jiffies) I was last * alive */ - lnet_process_id_t ksnp_id; /* who's on the other end(s) */ + struct lnet_process_id ksnp_id; /* who's on the other end(s) */ atomic_t ksnp_refcount; /* # users */ int ksnp_sharecount; /* lconf usage counter */ int ksnp_closing; /* being closed */ @@ -655,12 +655,12 @@ int ksocknal_recv(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg, int delayed, struct iov_iter *to, unsigned int rlen); int ksocknal_accept(struct lnet_ni *ni, struct socket *sock); -int ksocknal_add_peer(struct lnet_ni *ni, lnet_process_id_t id, __u32 ip, +int ksocknal_add_peer(struct lnet_ni *ni, struct lnet_process_id id, __u32 ip, int port); struct ksock_peer *ksocknal_find_peer_locked(struct lnet_ni *ni, - lnet_process_id_t id); + struct lnet_process_id id); struct ksock_peer *ksocknal_find_peer(struct lnet_ni *ni, - lnet_process_id_t id); + struct lnet_process_id id); void ksocknal_peer_failed(struct ksock_peer *peer); int ksocknal_create_conn(struct lnet_ni *ni, struct ksock_route *route, struct socket *sock, int type); @@ -670,12 +670,12 @@ void ksocknal_destroy_conn(struct ksock_conn *conn); int ksocknal_close_peer_conns_locked(struct ksock_peer *peer, __u32 ipaddr, int why); int ksocknal_close_conn_and_siblings(struct ksock_conn *conn, int why); -int ksocknal_close_matching_conns(lnet_process_id_t id, __u32 ipaddr); +int ksocknal_close_matching_conns(struct lnet_process_id id, __u32 ipaddr); struct ksock_conn *ksocknal_find_conn_locked(struct ksock_peer *peer, struct ksock_tx *tx, int nonblk); int ksocknal_launch_packet(struct lnet_ni *ni, struct ksock_tx *tx, - lnet_process_id_t id); + struct lnet_process_id id); struct ksock_tx *ksocknal_alloc_tx(int type, int size); void ksocknal_free_tx(struct ksock_tx *tx); struct ksock_tx *ksocknal_alloc_tx_noop(__u64 cookie, int nonblk); @@ -696,7 +696,8 @@ int ksocknal_reaper(void *arg); int ksocknal_send_hello(struct lnet_ni *ni, struct ksock_conn *conn, lnet_nid_t peer_nid, struct ksock_hello_msg *hello); int ksocknal_recv_hello(struct lnet_ni *ni, struct ksock_conn *conn, - struct ksock_hello_msg *hello, lnet_process_id_t *id, + struct ksock_hello_msg *hello, + struct lnet_process_id *id, __u64 *incarnation); void ksocknal_read_callback(struct ksock_conn *conn); void ksocknal_write_callback(struct ksock_conn *conn); diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c index 8cea4f6ddc66..695b586e378a 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c @@ -846,7 +846,7 @@ ksocknal_find_connecting_route_locked(struct ksock_peer *peer) int ksocknal_launch_packet(struct lnet_ni *ni, struct ksock_tx *tx, - lnet_process_id_t id) + struct lnet_process_id id) { struct ksock_peer *peer; struct ksock_conn *conn; @@ -943,7 +943,7 @@ ksocknal_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg) { int mpflag = 1; int type = lntmsg->msg_type; - lnet_process_id_t target = lntmsg->msg_target; + struct lnet_process_id target = lntmsg->msg_target; unsigned int payload_niov = lntmsg->msg_niov; struct kvec *payload_iov = lntmsg->msg_iov; lnet_kiov_t *payload_kiov = lntmsg->msg_kiov; @@ -1133,7 +1133,7 @@ static int ksocknal_process_receive(struct ksock_conn *conn) { struct lnet_hdr *lhdr; - lnet_process_id_t *id; + struct lnet_process_id *id; int rc; LASSERT(atomic_read(&conn->ksnc_conn_refcount) > 0); @@ -1715,7 +1715,8 @@ ksocknal_invert_type(int type) int ksocknal_recv_hello(struct lnet_ni *ni, struct ksock_conn *conn, - struct ksock_hello_msg *hello, lnet_process_id_t *peerid, + struct ksock_hello_msg *hello, + struct lnet_process_id *peerid, __u64 *incarnation) { /* Return < 0 fatal error @@ -1729,7 +1730,7 @@ ksocknal_recv_hello(struct lnet_ni *ni, struct ksock_conn *conn, int proto_match; int rc; struct ksock_proto *proto; - lnet_process_id_t recv_id; + struct lnet_process_id recv_id; /* socket type set on active connections - not set on passive */ LASSERT(!active == !(conn->ksnc_type != SOCKLND_CONN_NONE)); diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c index 1d2004ff818b..0b91d1809cb1 100644 --- a/drivers/staging/lustre/lnet/lnet/api-ni.c +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c @@ -58,8 +58,8 @@ static int rnet_htable_size = LNET_REMOTE_NETS_HASH_DEFAULT; module_param(rnet_htable_size, int, 0444); MODULE_PARM_DESC(rnet_htable_size, "size of remote network hash table"); -static int lnet_ping(lnet_process_id_t id, int timeout_ms, - lnet_process_id_t __user *ids, int n_ids); +static int lnet_ping(struct lnet_process_id id, int timeout_ms, + struct lnet_process_id __user *ids, int n_ids); static char * lnet_get_routes(void) @@ -901,7 +901,7 @@ lnet_ping_info_setup(struct lnet_ping_info **ppinfo, struct lnet_handle_md *md_handle, int ni_count, bool set_eq) { - lnet_process_id_t id = {LNET_NID_ANY, LNET_PID_ANY}; + struct lnet_process_id id = {LNET_NID_ANY, LNET_PID_ANY}; struct lnet_handle_me me_handle; struct lnet_md md = { NULL }; int rc, rc2; @@ -1887,7 +1887,7 @@ LNetCtl(unsigned int cmd, void *arg) { struct libcfs_ioctl_data *data = arg; struct lnet_ioctl_config_data *config; - lnet_process_id_t id = {0}; + struct lnet_process_id id = {0}; struct lnet_ni *ni; int rc; unsigned long secs_passed; @@ -2059,7 +2059,7 @@ LNetCtl(unsigned int cmd, void *arg) id.pid = data->ioc_u32[0]; rc = lnet_ping(id, data->ioc_u32[1], /* timeout */ data->ioc_pbuf1, - data->ioc_plen1 / sizeof(lnet_process_id_t)); + data->ioc_plen1 / sizeof(struct lnet_process_id)); if (rc < 0) return rc; data->ioc_count = rc; @@ -2082,25 +2082,25 @@ LNetCtl(unsigned int cmd, void *arg) } EXPORT_SYMBOL(LNetCtl); -void LNetDebugPeer(lnet_process_id_t id) +void LNetDebugPeer(struct lnet_process_id id) { lnet_debug_peer(id.nid); } EXPORT_SYMBOL(LNetDebugPeer); /** - * Retrieve the lnet_process_id_t ID of LNet interface at \a index. Note that + * Retrieve the lnet_process_id ID of LNet interface at \a index. Note that * all interfaces share a same PID, as requested by LNetNIInit(). * * \param index Index of the interface to look up. * \param id On successful return, this location will hold the - * lnet_process_id_t ID of the interface. + * lnet_process_id ID of the interface. * * \retval 0 If an interface exists at \a index. * \retval -ENOENT If no interface has been found. */ int -LNetGetId(unsigned int index, lnet_process_id_t *id) +LNetGetId(unsigned int index, struct lnet_process_id *id) { struct lnet_ni *ni; struct list_head *tmp; @@ -2128,8 +2128,8 @@ LNetGetId(unsigned int index, lnet_process_id_t *id) } EXPORT_SYMBOL(LNetGetId); -static int lnet_ping(lnet_process_id_t id, int timeout_ms, - lnet_process_id_t __user *ids, int n_ids) +static int lnet_ping(struct lnet_process_id id, int timeout_ms, + struct lnet_process_id __user *ids, int n_ids) { struct lnet_handle_eq eqh; struct lnet_handle_md mdh; @@ -2141,7 +2141,7 @@ static int lnet_ping(lnet_process_id_t id, int timeout_ms, const int a_long_time = 60000; /* mS */ int infosz; struct lnet_ping_info *info; - lnet_process_id_t tmpid; + struct lnet_process_id tmpid; int i; int nob; int rc; diff --git a/drivers/staging/lustre/lnet/lnet/lib-me.c b/drivers/staging/lustre/lnet/lnet/lib-me.c index 7614088fbf18..d8f40de6fbf9 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-me.c +++ b/drivers/staging/lustre/lnet/lnet/lib-me.c @@ -46,7 +46,7 @@ * \param portal The portal table index where the ME should be attached. * \param match_id Specifies the match criteria for the process ID of * the requester. The constants LNET_PID_ANY and LNET_NID_ANY can be - * used to wildcard either of the identifiers in the lnet_process_id_t + * used to wildcard either of the identifiers in the lnet_process_id * structure. * \param match_bits,ignore_bits Specify the match criteria to apply * to the match bits in the incoming request. The ignore bits are used @@ -70,7 +70,7 @@ */ int LNetMEAttach(unsigned int portal, - lnet_process_id_t match_id, + struct lnet_process_id match_id, __u64 match_bits, __u64 ignore_bits, lnet_unlink_t unlink, lnet_ins_pos_t pos, struct lnet_handle_me *handle) @@ -141,7 +141,7 @@ EXPORT_SYMBOL(LNetMEAttach); */ int LNetMEInsert(struct lnet_handle_me current_meh, - lnet_process_id_t match_id, + struct lnet_process_id match_id, __u64 match_bits, __u64 ignore_bits, lnet_unlink_t unlink, lnet_ins_pos_t pos, struct lnet_handle_me *handle) diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c b/drivers/staging/lustre/lnet/lnet/lib-move.c index 96fb7fc38c13..3c54a3dc39c3 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-move.c +++ b/drivers/staging/lustre/lnet/lnet/lib-move.c @@ -429,7 +429,7 @@ lnet_setpayloadbuffer(struct lnet_msg *msg) } void -lnet_prep_send(struct lnet_msg *msg, int type, lnet_process_id_t target, +lnet_prep_send(struct lnet_msg *msg, int type, struct lnet_process_id target, unsigned int offset, unsigned int len) { msg->msg_type = type; @@ -1392,7 +1392,7 @@ lnet_parse_reply(struct lnet_ni *ni, struct lnet_msg *msg) { void *private = msg->msg_private; struct lnet_hdr *hdr = &msg->msg_hdr; - lnet_process_id_t src = {0}; + struct lnet_process_id src = {0}; struct lnet_libmd *md; int rlength; int mlength; @@ -1456,7 +1456,7 @@ static int lnet_parse_ack(struct lnet_ni *ni, struct lnet_msg *msg) { struct lnet_hdr *hdr = &msg->msg_hdr; - lnet_process_id_t src = {0}; + struct lnet_process_id src = {0}; struct lnet_libmd *md; int cpt; @@ -1580,8 +1580,8 @@ lnet_msgtyp2str(int type) void lnet_print_hdr(struct lnet_hdr *hdr) { - lnet_process_id_t src = {0}; - lnet_process_id_t dst = {0}; + struct lnet_process_id src = {0}; + struct lnet_process_id dst = {0}; char *type_str = lnet_msgtyp2str(hdr->type); src.nid = hdr->src_nid; @@ -1875,7 +1875,7 @@ void lnet_drop_delayed_msg_list(struct list_head *head, char *reason) { while (!list_empty(head)) { - lnet_process_id_t id = {0}; + struct lnet_process_id id = {0}; struct lnet_msg *msg; msg = list_entry(head->next, struct lnet_msg, msg_list); @@ -1918,7 +1918,7 @@ lnet_recv_delayed_msg_list(struct list_head *head) { while (!list_empty(head)) { struct lnet_msg *msg; - lnet_process_id_t id; + struct lnet_process_id id; msg = list_entry(head->next, struct lnet_msg, msg_list); list_del(&msg->msg_list); @@ -1991,7 +1991,7 @@ lnet_recv_delayed_msg_list(struct list_head *head) */ int LNetPut(lnet_nid_t self, struct lnet_handle_md mdh, lnet_ack_req_t ack, - lnet_process_id_t target, unsigned int portal, + struct lnet_process_id target, unsigned int portal, __u64 match_bits, unsigned int offset, __u64 hdr_data) { @@ -2087,7 +2087,7 @@ lnet_create_reply_msg(struct lnet_ni *ni, struct lnet_msg *getmsg) */ struct lnet_msg *msg = lnet_msg_alloc(); struct lnet_libmd *getmd = getmsg->msg_md; - lnet_process_id_t peer_id = getmsg->msg_target; + struct lnet_process_id peer_id = getmsg->msg_target; int cpt; LASSERT(!getmsg->msg_target_is_router); @@ -2197,7 +2197,7 @@ EXPORT_SYMBOL(lnet_set_reply_msg_len); */ int LNetGet(lnet_nid_t self, struct lnet_handle_md mdh, - lnet_process_id_t target, unsigned int portal, + struct lnet_process_id target, unsigned int portal, __u64 match_bits, unsigned int offset) { struct lnet_msg *msg; diff --git a/drivers/staging/lustre/lnet/lnet/lib-ptl.c b/drivers/staging/lustre/lnet/lnet/lib-ptl.c index 9ea3c08b0472..fc67af04edab 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-ptl.c +++ b/drivers/staging/lustre/lnet/lnet/lib-ptl.c @@ -39,7 +39,7 @@ module_param(portal_rotor, int, 0644); MODULE_PARM_DESC(portal_rotor, "redirect PUTs to different cpu-partitions"); static int -lnet_ptl_match_type(unsigned int index, lnet_process_id_t match_id, +lnet_ptl_match_type(unsigned int index, struct lnet_process_id match_id, __u64 mbits, __u64 ignore_bits) { struct lnet_portal *ptl = the_lnet.ln_portals[index]; @@ -212,7 +212,7 @@ lnet_try_match_md(struct lnet_libmd *md, } static struct lnet_match_table * -lnet_match2mt(struct lnet_portal *ptl, lnet_process_id_t id, __u64 mbits) +lnet_match2mt(struct lnet_portal *ptl, struct lnet_process_id id, __u64 mbits) { if (LNET_CPT_NUMBER == 1) return ptl->ptl_mtables[0]; /* the only one */ @@ -223,7 +223,7 @@ lnet_match2mt(struct lnet_portal *ptl, lnet_process_id_t id, __u64 mbits) } struct lnet_match_table * -lnet_mt_of_attach(unsigned int index, lnet_process_id_t id, +lnet_mt_of_attach(unsigned int index, struct lnet_process_id id, __u64 mbits, __u64 ignore_bits, lnet_ins_pos_t pos) { struct lnet_portal *ptl; @@ -357,7 +357,7 @@ lnet_mt_set_exhausted(struct lnet_match_table *mtable, int pos, int exhausted) struct list_head * lnet_mt_match_head(struct lnet_match_table *mtable, - lnet_process_id_t id, __u64 mbits) + struct lnet_process_id id, __u64 mbits) { struct lnet_portal *ptl = the_lnet.ln_portals[mtable->mt_portal]; unsigned long hash = mbits; diff --git a/drivers/staging/lustre/lnet/lnet/nidstrings.c b/drivers/staging/lustre/lnet/lnet/nidstrings.c index a9fe3e69daae..298533d7b04c 100644 --- a/drivers/staging/lustre/lnet/lnet/nidstrings.c +++ b/drivers/staging/lustre/lnet/lnet/nidstrings.c @@ -1226,7 +1226,7 @@ libcfs_str2nid(const char *str) EXPORT_SYMBOL(libcfs_str2nid); char * -libcfs_id2str(lnet_process_id_t id) +libcfs_id2str(struct lnet_process_id id) { char *str = libcfs_next_nidstring(); diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c index 84092ad411be..194a220b7830 100644 --- a/drivers/staging/lustre/lnet/lnet/router.c +++ b/drivers/staging/lustre/lnet/lnet/router.c @@ -1024,7 +1024,7 @@ lnet_ping_router_locked(struct lnet_peer *rtr) cfs_time_after(now, cfs_time_add(rtr->lp_ping_timestamp, cfs_time_seconds(secs)))) { int rc; - lnet_process_id_t id; + struct lnet_process_id id; struct lnet_handle_md mdh; id.nid = rtr->lp_nid; diff --git a/drivers/staging/lustre/lnet/selftest/brw_test.c b/drivers/staging/lustre/lnet/selftest/brw_test.c index b9ac34ecbd53..f8b9175f08d4 100644 --- a/drivers/staging/lustre/lnet/selftest/brw_test.c +++ b/drivers/staging/lustre/lnet/selftest/brw_test.c @@ -267,8 +267,8 @@ brw_check_bulk(struct srpc_bulk *bk, int pattern, __u64 magic) } static int -brw_client_prep_rpc(struct sfw_test_unit *tsu, - lnet_process_id_t dest, struct srpc_client_rpc **rpcpp) +brw_client_prep_rpc(struct sfw_test_unit *tsu, struct lnet_process_id dest, + struct srpc_client_rpc **rpcpp) { struct srpc_bulk *bulk = tsu->tsu_private; struct sfw_test_instance *tsi = tsu->tsu_instance; diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c b/drivers/staging/lustre/lnet/selftest/conrpc.c index 680a5595f3b6..7985b091a46b 100644 --- a/drivers/staging/lustre/lnet/selftest/conrpc.c +++ b/drivers/staging/lustre/lnet/selftest/conrpc.c @@ -505,7 +505,7 @@ lstcon_rpc_trans_interpreter(struct lstcon_rpc_trans *trans, jiffies_to_timeval(dur, &tv); if (copy_to_user(&ent->rpe_peer, &nd->nd_id, - sizeof(lnet_process_id_t)) || + sizeof(struct lnet_process_id)) || copy_to_user(&ent->rpe_stamp, &tv, sizeof(tv)) || copy_to_user(&ent->rpe_state, &nd->nd_state, sizeof(nd->nd_state)) || diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c index 358cae8515ed..d62c448ecf8a 100644 --- a/drivers/staging/lustre/lnet/selftest/console.c +++ b/drivers/staging/lustre/lnet/selftest/console.c @@ -65,7 +65,8 @@ lstcon_node_get(struct lstcon_node *nd) } static int -lstcon_node_find(lnet_process_id_t id, struct lstcon_node **ndpp, int create) +lstcon_node_find(struct lnet_process_id id, struct lstcon_node **ndpp, + int create) { struct lstcon_ndlink *ndl; unsigned int idx = LNET_NIDADDR(id.nid) % LST_GLOBAL_HASHSIZE; @@ -135,7 +136,7 @@ lstcon_node_put(struct lstcon_node *nd) } static int -lstcon_ndlink_find(struct list_head *hash, lnet_process_id_t id, +lstcon_ndlink_find(struct list_head *hash, struct lnet_process_id id, struct lstcon_ndlink **ndlpp, int create) { unsigned int idx = LNET_NIDADDR(id.nid) % LST_NODE_HASHSIZE; @@ -283,7 +284,7 @@ lstcon_group_find(const char *name, struct lstcon_group **grpp) } static int -lstcon_group_ndlink_find(struct lstcon_group *grp, lnet_process_id_t id, +lstcon_group_ndlink_find(struct lstcon_group *grp, struct lnet_process_id id, struct lstcon_ndlink **ndlpp, int create) { int rc; @@ -397,14 +398,14 @@ lstcon_sesrpc_readent(int transop, struct srpc_msg *msg, static int lstcon_group_nodes_add(struct lstcon_group *grp, - int count, lnet_process_id_t __user *ids_up, + int count, struct lnet_process_id __user *ids_up, unsigned int *featp, struct list_head __user *result_up) { struct lstcon_rpc_trans *trans; struct lstcon_ndlink *ndl; struct lstcon_group *tmp; - lnet_process_id_t id; + struct lnet_process_id id; int i; int rc; @@ -465,13 +466,13 @@ lstcon_group_nodes_add(struct lstcon_group *grp, static int lstcon_group_nodes_remove(struct lstcon_group *grp, - int count, lnet_process_id_t __user *ids_up, + int count, struct lnet_process_id __user *ids_up, struct list_head __user *result_up) { struct lstcon_rpc_trans *trans; struct lstcon_ndlink *ndl; struct lstcon_group *tmp; - lnet_process_id_t id; + struct lnet_process_id id; int rc; int i; @@ -543,9 +544,8 @@ lstcon_group_add(char *name) } int -lstcon_nodes_add(char *name, int count, lnet_process_id_t __user *ids_up, - unsigned int *featp, - struct list_head __user *result_up) +lstcon_nodes_add(char *name, int count, struct lnet_process_id __user *ids_up, + unsigned int *featp, struct list_head __user *result_up) { struct lstcon_group *grp; int rc; @@ -650,7 +650,8 @@ lstcon_group_clean(char *name, int args) } int -lstcon_nodes_remove(char *name, int count, lnet_process_id_t __user *ids_up, +lstcon_nodes_remove(char *name, int count, + struct lnet_process_id __user *ids_up, struct list_head __user *result_up) { struct lstcon_group *grp = NULL; @@ -1533,12 +1534,12 @@ lstcon_group_stat(char *grp_name, int timeout, } int -lstcon_nodes_stat(int count, lnet_process_id_t __user *ids_up, +lstcon_nodes_stat(int count, struct lnet_process_id __user *ids_up, int timeout, struct list_head __user *result_up) { struct lstcon_ndlink *ndl; struct lstcon_group *tmp; - lnet_process_id_t id; + struct lnet_process_id id; int i; int rc; @@ -1644,11 +1645,11 @@ lstcon_group_debug(int timeout, char *name, } int -lstcon_nodes_debug(int timeout, - int count, lnet_process_id_t __user *ids_up, +lstcon_nodes_debug(int timeout, int count, + struct lnet_process_id __user *ids_up, struct list_head __user *result_up) { - lnet_process_id_t id; + struct lnet_process_id id; struct lstcon_ndlink *ndl; struct lstcon_group *grp; int i; @@ -1697,7 +1698,7 @@ lstcon_session_match(struct lst_sid sid) static void lstcon_new_session_id(struct lst_sid *sid) { - lnet_process_id_t id; + struct lnet_process_id id; LASSERT(console_session.ses_state == LST_SESSION_NONE); diff --git a/drivers/staging/lustre/lnet/selftest/console.h b/drivers/staging/lustre/lnet/selftest/console.h index 05b4b7013d2e..e3e11aa52526 100644 --- a/drivers/staging/lustre/lnet/selftest/console.h +++ b/drivers/staging/lustre/lnet/selftest/console.h @@ -48,7 +48,7 @@ /* node descriptor */ struct lstcon_node { - lnet_process_id_t nd_id; /* id of the node */ + struct lnet_process_id nd_id; /* id of the node */ int nd_ref; /* reference count */ int nd_state; /* state of the node */ int nd_timeout; /* session timeout */ @@ -180,7 +180,7 @@ lstcon_trans_stat(void) } static inline struct list_head * -lstcon_id2hash(lnet_process_id_t id, struct list_head *hash) +lstcon_id2hash(struct lnet_process_id id, struct list_head *hash) { unsigned int idx = LNET_NIDADDR(id.nid) % LST_NODE_HASHSIZE; @@ -203,15 +203,17 @@ int lstcon_batch_debug(int timeout, char *name, int client, struct list_head __user *result_up); int lstcon_group_debug(int timeout, char *name, struct list_head __user *result_up); -int lstcon_nodes_debug(int timeout, int nnd, lnet_process_id_t __user *nds_up, +int lstcon_nodes_debug(int timeout, int nnd, + struct lnet_process_id __user *nds_up, struct list_head __user *result_up); int lstcon_group_add(char *name); int lstcon_group_del(char *name); int lstcon_group_clean(char *name, int args); int lstcon_group_refresh(char *name, struct list_head __user *result_up); -int lstcon_nodes_add(char *name, int nnd, lnet_process_id_t __user *nds_up, +int lstcon_nodes_add(char *name, int nnd, struct lnet_process_id __user *nds_up, unsigned int *featp, struct list_head __user *result_up); -int lstcon_nodes_remove(char *name, int nnd, lnet_process_id_t __user *nds_up, +int lstcon_nodes_remove(char *name, int nnd, + struct lnet_process_id __user *nds_up, struct list_head __user *result_up); int lstcon_group_info(char *name, struct lstcon_ndlist_ent __user *gent_up, int *index_p, int *ndent_p, @@ -232,7 +234,7 @@ int lstcon_batch_info(char *name, struct lstcon_test_batch_ent __user *ent_up, int *ndent_p, struct lstcon_node_ent __user *dents_up); int lstcon_group_stat(char *grp_name, int timeout, struct list_head __user *result_up); -int lstcon_nodes_stat(int count, lnet_process_id_t __user *ids_up, +int lstcon_nodes_stat(int count, struct lnet_process_id __user *ids_up, int timeout, struct list_head __user *result_up); int lstcon_test_add(char *batch_name, int type, int loop, int concur, int dist, int span, diff --git a/drivers/staging/lustre/lnet/selftest/framework.c b/drivers/staging/lustre/lnet/selftest/framework.c index 9dd4e1a70329..ef27bfffc230 100644 --- a/drivers/staging/lustre/lnet/selftest/framework.c +++ b/drivers/staging/lustre/lnet/selftest/framework.c @@ -899,7 +899,7 @@ sfw_test_rpc_done(struct srpc_client_rpc *rpc) } int -sfw_create_test_rpc(struct sfw_test_unit *tsu, lnet_process_id_t peer, +sfw_create_test_rpc(struct sfw_test_unit *tsu, struct lnet_process_id peer, unsigned int features, int nblk, int blklen, struct srpc_client_rpc **rpcpp) { @@ -1379,7 +1379,7 @@ sfw_bulk_ready(struct srpc_server_rpc *rpc, int status) } struct srpc_client_rpc * -sfw_create_rpc(lnet_process_id_t peer, int service, +sfw_create_rpc(struct lnet_process_id peer, int service, unsigned int features, int nbulkiov, int bulklen, void (*done)(struct srpc_client_rpc *), void *priv) { diff --git a/drivers/staging/lustre/lnet/selftest/ping_test.c b/drivers/staging/lustre/lnet/selftest/ping_test.c index b9601b00a273..9653ac6fd619 100644 --- a/drivers/staging/lustre/lnet/selftest/ping_test.c +++ b/drivers/staging/lustre/lnet/selftest/ping_test.c @@ -82,7 +82,7 @@ ping_client_fini(struct sfw_test_instance *tsi) } static int -ping_client_prep_rpc(struct sfw_test_unit *tsu, lnet_process_id_t dest, +ping_client_prep_rpc(struct sfw_test_unit *tsu, struct lnet_process_id dest, struct srpc_client_rpc **rpc) { struct srpc_ping_reqst *req; diff --git a/drivers/staging/lustre/lnet/selftest/rpc.c b/drivers/staging/lustre/lnet/selftest/rpc.c index 81d08425c1f0..77c222cca230 100644 --- a/drivers/staging/lustre/lnet/selftest/rpc.c +++ b/drivers/staging/lustre/lnet/selftest/rpc.c @@ -355,7 +355,7 @@ srpc_remove_service(struct srpc_service *sv) static int 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, struct lnet_process_id peer, struct lnet_handle_md *mdh, struct srpc_event *ev) { int rc; @@ -394,8 +394,9 @@ srpc_post_passive_rdma(int portal, int local, __u64 matchbits, void *buf, static int srpc_post_active_rdma(int portal, __u64 matchbits, void *buf, int len, - int options, lnet_process_id_t peer, lnet_nid_t self, - struct lnet_handle_md *mdh, struct srpc_event *ev) + int options, struct lnet_process_id peer, + lnet_nid_t self, struct lnet_handle_md *mdh, + struct srpc_event *ev) { int rc; struct lnet_md md; @@ -450,7 +451,7 @@ static int srpc_post_passive_rqtbuf(int service, int local, void *buf, int len, struct lnet_handle_md *mdh, struct srpc_event *ev) { - lnet_process_id_t any = { 0 }; + struct lnet_process_id any = { 0 }; any.nid = LNET_NID_ANY; any.pid = LNET_PID_ANY; @@ -1310,7 +1311,7 @@ abort: } struct srpc_client_rpc * -srpc_create_client_rpc(lnet_process_id_t peer, int service, +srpc_create_client_rpc(struct lnet_process_id peer, int service, int nbulkiov, int bulklen, void (*rpc_done)(struct srpc_client_rpc *), void (*rpc_fini)(struct srpc_client_rpc *), void *priv) diff --git a/drivers/staging/lustre/lnet/selftest/selftest.h b/drivers/staging/lustre/lnet/selftest/selftest.h index 91088c685d05..2e2c215a83af 100644 --- a/drivers/staging/lustre/lnet/selftest/selftest.h +++ b/drivers/staging/lustre/lnet/selftest/selftest.h @@ -165,7 +165,7 @@ struct srpc_buffer { struct srpc_msg buf_msg; struct lnet_handle_md buf_mdh; lnet_nid_t buf_self; - lnet_process_id_t buf_peer; + struct lnet_process_id buf_peer; }; struct swi_workitem; @@ -186,7 +186,7 @@ struct srpc_server_rpc { struct swi_workitem srpc_wi; struct srpc_event srpc_ev; /* bulk/reply event */ lnet_nid_t srpc_self; - lnet_process_id_t srpc_peer; + struct lnet_process_id srpc_peer; struct srpc_msg srpc_replymsg; struct lnet_handle_md srpc_replymdh; struct srpc_buffer *srpc_reqstbuf; @@ -206,7 +206,7 @@ struct srpc_client_rpc { int crpc_timeout; /* # seconds to wait for reply */ struct stt_timer crpc_timer; struct swi_workitem crpc_wi; - lnet_process_id_t crpc_dest; + struct lnet_process_id crpc_dest; void (*crpc_done)(struct srpc_client_rpc *); void (*crpc_fini)(struct srpc_client_rpc *); @@ -355,7 +355,7 @@ struct sfw_test_client_ops { * client */ int (*tso_prep_rpc)(struct sfw_test_unit *tsu, - lnet_process_id_t dest, + struct lnet_process_id dest, struct srpc_client_rpc **rpc); /* prep a tests rpc */ void (*tso_done_rpc)(struct sfw_test_unit *tsu, struct srpc_client_rpc *rpc); /* done a test rpc */ @@ -392,8 +392,8 @@ struct sfw_test_instance { }; /* - * XXX: trailing (PAGE_SIZE % sizeof(lnet_process_id_t)) bytes at the end of - * pages are not used + * XXX: trailing (PAGE_SIZE % sizeof(struct lnet_process_id)) bytes at the end + * of pages are not used */ #define SFW_MAX_CONCUR LST_MAX_CONCUR #define SFW_ID_PER_PAGE (PAGE_SIZE / sizeof(struct lnet_process_id_packed)) @@ -402,7 +402,7 @@ struct sfw_test_instance { struct sfw_test_unit { struct list_head tsu_list; /* chain on lst_test_instance */ - lnet_process_id_t tsu_dest; /* id of dest node */ + struct lnet_process_id tsu_dest; /* id of dest node */ int tsu_loop; /* loop count of the test */ struct sfw_test_instance *tsu_instance; /* pointer to test instance */ void *tsu_private; /* private data */ @@ -416,11 +416,11 @@ struct sfw_test_case { }; struct srpc_client_rpc * -sfw_create_rpc(lnet_process_id_t peer, int service, +sfw_create_rpc(struct lnet_process_id peer, int service, unsigned int features, int nbulkiov, int bulklen, void (*done)(struct srpc_client_rpc *), void *priv); int sfw_create_test_rpc(struct sfw_test_unit *tsu, - lnet_process_id_t peer, unsigned int features, + struct lnet_process_id peer, unsigned int features, int nblk, int blklen, struct srpc_client_rpc **rpc); void sfw_abort_rpc(struct srpc_client_rpc *rpc); void sfw_post_rpc(struct srpc_client_rpc *rpc); @@ -434,7 +434,7 @@ int sfw_make_session(struct srpc_mksn_reqst *request, struct srpc_mksn_reply *reply); struct srpc_client_rpc * -srpc_create_client_rpc(lnet_process_id_t peer, int service, +srpc_create_client_rpc(struct lnet_process_id peer, int service, int nbulkiov, int bulklen, void (*rpc_done)(struct srpc_client_rpc *), void (*rpc_fini)(struct srpc_client_rpc *), void *priv); @@ -522,7 +522,7 @@ srpc_destroy_client_rpc(struct srpc_client_rpc *rpc) } static inline void -srpc_init_client_rpc(struct srpc_client_rpc *rpc, lnet_process_id_t peer, +srpc_init_client_rpc(struct srpc_client_rpc *rpc, struct lnet_process_id peer, int service, int nbulkiov, int bulklen, void (*rpc_done)(struct srpc_client_rpc *), void (*rpc_fini)(struct srpc_client_rpc *), void *priv) |