From 1718fb73670a776d371aedfd80ac0d308a5ff6c3 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Thu, 9 Nov 2017 15:10:26 -0500 Subject: [PATCH] LU-6142 lnet: remove last of the typedefs from LNet core Change the remaining typedefs in LNet core to proper structures. Several other style changes to fix checkpatch issues with code impacted by typedef change. Test-Parameters: trivial Change-Id: Ic72b31698d1b1e7c612181a50aa7fa921fd417d7 Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/29847 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Doug Oucharek Reviewed-by: Sonia Sharma Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lnet/include/lnet/lib-lnet.h | 5 ++- lnet/include/lnet/lib-types.h | 70 +++++++++++++++---------------- lnet/include/uapi/linux/lnet/lnet-dlc.h | 4 +- lnet/include/uapi/linux/lnet/lnet-types.h | 68 +++++++++++++++--------------- lnet/lnet/api-ni.c | 22 +++++----- lnet/lnet/lib-move.c | 3 +- lnet/lnet/peer.c | 21 +++++----- lnet/lnet/router.c | 2 +- lnet/utils/lnetconfig/liblnetconfig.c | 12 +++--- lustre/osc/osc_request.c | 2 +- lustre/target/tgt_handler.c | 2 +- 11 files changed, 106 insertions(+), 105 deletions(-) diff --git a/lnet/include/lnet/lib-lnet.h b/lnet/include/lnet/lib-lnet.h index cfa00d6..66faeba 100644 --- a/lnet/include/lnet/lib-lnet.h +++ b/lnet/include/lnet/lib-lnet.h @@ -568,7 +568,7 @@ extern int libcfs_deregister_ioctl(struct libcfs_ioctl_handler *hand); extern int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp, struct libcfs_ioctl_hdr __user *uparam); extern int lnet_get_peer_list(__u32 *countp, __u32 *sizep, - lnet_process_id_t __user *ids); + struct lnet_process_id __user *ids); void lnet_router_debugfs_init(void); void lnet_router_debugfs_fini(void); @@ -982,7 +982,8 @@ lnet_peer_needs_push(struct lnet_peer *lp) return false; } -void lnet_incr_stats(struct lnet_element_stats *stats, lnet_msg_type_t msg_type, +void lnet_incr_stats(struct lnet_element_stats *stats, + enum lnet_msg_type msg_type, enum lnet_stats_type stats_type); __u32 lnet_sum_stats(struct lnet_element_stats *stats, diff --git a/lnet/include/lnet/lib-types.h b/lnet/include/lnet/lib-types.h index bd4cc5b..b9945dc 100644 --- a/lnet/include/lnet/lib-types.h +++ b/lnet/include/lnet/lib-types.h @@ -64,7 +64,7 @@ /* forward refs */ struct lnet_libmd; -typedef struct lnet_msg { +struct lnet_msg { struct list_head msg_activelist; struct list_head msg_list; /* Q for credits/MD */ @@ -128,17 +128,17 @@ typedef struct lnet_msg { struct lnet_event msg_ev; struct lnet_hdr msg_hdr; -} lnet_msg_t; +}; -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 lnet_eq { struct list_head eq_list; struct lnet_libhandle eq_lh; unsigned long eq_enq_seq; @@ -147,9 +147,9 @@ typedef struct lnet_eq { lnet_eq_handler_t eq_callback; struct lnet_event *eq_events; int **eq_refs; /* percpt refcount for EQ */ -} lnet_eq_t; +}; -typedef struct lnet_me { +struct lnet_me { struct list_head me_list; struct lnet_libhandle me_lh; struct lnet_process_id me_match_id; @@ -159,9 +159,9 @@ typedef struct lnet_me { __u64 me_ignore_bits; enum lnet_unlink me_unlink; struct lnet_libmd *me_md; -} lnet_me_t; +}; -typedef struct lnet_libmd { +struct lnet_libmd { struct list_head md_list; struct lnet_libhandle md_lh; struct lnet_me *md_me; @@ -181,18 +181,18 @@ typedef struct lnet_libmd { struct kvec iov[LNET_MAX_IOV]; lnet_kiov_t kiov[LNET_MAX_IOV]; } md_iov; -} lnet_libmd_t; +}; #define LNET_MD_FLAG_ZOMBIE (1 << 0) #define LNET_MD_FLAG_AUTO_UNLINK (1 << 1) #define LNET_MD_FLAG_ABORTED (1 << 2) -typedef struct lnet_test_peer { +struct lnet_test_peer { /* info about peers we are trying to fail */ struct list_head tp_list; /* ln_test_peers */ lnet_nid_t tp_nid; /* matching nid */ unsigned int tp_threshold; /* # failures to simulate */ -} lnet_test_peer_t; +}; #define LNET_COOKIE_TYPE_MD 1 #define LNET_COOKIE_TYPE_ME 2 @@ -203,7 +203,7 @@ typedef struct lnet_test_peer { struct lnet_ni; /* forward ref */ struct socket; -typedef struct lnet_lnd { +struct lnet_lnd { /* fields managed by portals */ struct list_head lnd_list; /* stash in the LND table */ int lnd_refcount; /* # active instances */ @@ -261,7 +261,7 @@ typedef struct lnet_lnd { /* accept a new connection */ int (*lnd_accept)(struct lnet_ni *ni, struct socket *sock); -} lnd_t; +}; struct lnet_tx_queue { int tq_credits; /* # tx credits free */ @@ -358,7 +358,7 @@ struct lnet_net { enum lnet_net_state net_state; }; -typedef struct lnet_ni { +struct lnet_ni { /* chain on the lnet_net structure */ struct list_head ni_netlist; @@ -421,7 +421,7 @@ typedef struct lnet_ni { */ char *ni_interfaces[LNET_INTERFACES_NUM]; struct net *ni_net_ns; /* original net namespace */ -} lnet_ni_t; +}; #define LNET_PROTO_PING_MATCHBITS 0x8000000000000000LL @@ -446,14 +446,14 @@ struct lnet_ping_buffer { container_of((PINFO), struct lnet_ping_buffer, pb_info) /* router checker data, per router */ -typedef struct lnet_rc_data { +struct lnet_rc_data { /* chain on the_lnet.ln_zombie_rcd or ln_deathrow_rcd */ struct list_head rcd_list; struct lnet_handle_md rcd_mdh; /* ping buffer MD */ struct lnet_peer_ni *rcd_gateway; /* reference to gateway */ struct lnet_ping_buffer *rcd_pingbuffer;/* ping buffer */ int rcd_nnis; /* desired size of buffer */ -} lnet_rc_data_t; +}; struct lnet_peer_ni { /* chain on lpn_peer_nis */ @@ -574,10 +574,10 @@ struct lnet_peer { struct lnet_ping_buffer *lp_data; /* MD handle for ping in progress */ - lnet_handle_md_t lp_ping_mdh; + struct lnet_handle_md lp_ping_mdh; /* MD handle for push in progress */ - lnet_handle_md_t lp_push_mdh; + struct lnet_handle_md lp_push_mdh; /* number of NIDs for sizing push data */ int lp_data_nnis; @@ -712,7 +712,7 @@ struct lnet_peer_table { ((lp)->lpni_net) && \ (lp)->lpni_net->net_tunables.lct_peer_timeout > 0) -typedef struct lnet_route { +struct lnet_route { struct list_head lr_list; /* chain on net */ struct list_head lr_gwlist; /* chain on gateway */ struct lnet_peer_ni *lr_gateway; /* router node */ @@ -721,20 +721,20 @@ typedef struct lnet_route { unsigned int lr_downis; /* number of down NIs */ __u32 lr_hops; /* how far I am */ unsigned int lr_priority; /* route priority */ -} lnet_route_t; +}; #define LNET_REMOTE_NETS_HASH_DEFAULT (1U << 7) #define LNET_REMOTE_NETS_HASH_MAX (1U << 16) #define LNET_REMOTE_NETS_HASH_SIZE (1 << the_lnet.ln_remote_nets_hbits) -typedef struct lnet_remotenet { +struct lnet_remotenet { /* chain on ln_remote_nets_hash */ struct list_head lrn_list; /* routes to me */ struct list_head lrn_routes; /* my net number */ __u32 lrn_net; -} lnet_remotenet_t; +}; /** lnet message has credit and can be submitted to lnd for send/receive */ #define LNET_CREDIT_OK 0 @@ -743,7 +743,7 @@ typedef struct lnet_remotenet { /** lnet message is waiting for discovery */ #define LNET_DC_WAIT 2 -typedef struct lnet_rtrbufpool { +struct lnet_rtrbufpool { /* my free buffer pool */ struct list_head rbp_bufs; /* messages blocking for a buffer */ @@ -758,13 +758,13 @@ typedef struct lnet_rtrbufpool { int rbp_credits; /* low water mark */ int rbp_mincredits; -} lnet_rtrbufpool_t; +}; -typedef struct lnet_rtrbuf { +struct lnet_rtrbuf { struct list_head rb_list; /* chain on rbp_bufs */ struct lnet_rtrbufpool *rb_pool; /* owning pool */ lnet_kiov_t rb_kiov[0]; /* the buffer space */ -} lnet_rtrbuf_t; +}; #define LNET_PEER_HASHSIZE 503 /* prime! */ @@ -834,7 +834,7 @@ struct lnet_match_table { /* dispatch routed PUT message by hashing source NID for wildcard portals */ #define LNET_PTL_ROTOR_HASH_RT 3 -typedef struct lnet_portal { +struct lnet_portal { spinlock_t ptl_lock; unsigned int ptl_index; /* portal ID, reserved */ /* flags on this portal: lazy, unique... */ @@ -851,7 +851,7 @@ typedef struct lnet_portal { int ptl_mt_nmaps; /* array of active entries' cpu-partition-id */ int ptl_mt_maps[0]; -} lnet_portal_t; +}; #define LNET_LH_HASH_BITS 12 #define LNET_LH_HASH_SIZE (1ULL << LNET_LH_HASH_BITS) @@ -892,7 +892,7 @@ struct lnet_msg_container { #define LNET_STATE_RUNNING 1 /* started up OK */ #define LNET_STATE_STOPPING 2 /* telling thread to stop */ -typedef struct lnet { +struct lnet { /* CPU partition table of LNet */ struct cfs_cpt_table *ln_cpt_table; /* number of CPTs in ln_cpt_table */ @@ -971,13 +971,13 @@ typedef struct lnet { * buffer may linger a while after it has been unlinked, in * which case the event handler cleans up. */ - lnet_handle_eq_t ln_push_target_eq; - lnet_handle_md_t ln_push_target_md; + struct lnet_handle_eq ln_push_target_eq; + struct lnet_handle_md ln_push_target_md; struct lnet_ping_buffer *ln_push_target; int ln_push_target_nnis; /* discovery event queue handle */ - lnet_handle_eq_t ln_dc_eqh; + struct lnet_handle_eq ln_dc_eqh; /* discovery requests */ struct list_head ln_dc_request; /* discovery working list */ @@ -1030,6 +1030,6 @@ typedef struct lnet { * the list, the router checker will sleep on this queue. when * routes are added the thread will wake up */ wait_queue_head_t ln_rc_waitq; -} lnet_t; +}; #endif diff --git a/lnet/include/uapi/linux/lnet/lnet-dlc.h b/lnet/include/uapi/linux/lnet/lnet-dlc.h index ff2eaf7..1e49f4e 100644 --- a/lnet/include/uapi/linux/lnet/lnet-dlc.h +++ b/lnet/include/uapi/linux/lnet/lnet-dlc.h @@ -120,8 +120,8 @@ struct lnet_ioctl_ping_data { __u32 ping_count; __u32 ping_flags; bool mr_info; - lnet_process_id_t ping_id; - lnet_process_id_t __user *ping_buf; + struct lnet_process_id ping_id; + struct lnet_process_id __user *ping_buf; }; struct lnet_ioctl_config_data { diff --git a/lnet/include/uapi/linux/lnet/lnet-types.h b/lnet/include/uapi/linux/lnet/lnet-types.h index 4d4c649..9898907 100644 --- a/lnet/include/uapi/linux/lnet/lnet-types.h +++ b/lnet/include/uapi/linux/lnet/lnet-types.h @@ -110,27 +110,27 @@ static inline __u32 LNET_MKNET(__u32 type, __u32 num) #define WIRE_ATTR __attribute__((packed)) /* Packed version of struct lnet_process_id to transfer via network */ -typedef struct lnet_process_id_packed { +struct lnet_process_id_packed { lnet_nid_t nid; lnet_pid_t pid; /* node id / process id */ -} WIRE_ATTR lnet_process_id_packed; +} WIRE_ATTR; /* The wire handle's interface cookie only matches one network interface in * one epoch (i.e. new cookie when the interface restarts or the node * reboots). The object cookie only matches one object on that interface * during that object's lifetime (i.e. no cookie re-use). */ -typedef struct lnet_handle_wire { +struct lnet_handle_wire { __u64 wh_interface_cookie; __u64 wh_object_cookie; -} WIRE_ATTR lnet_handle_wire_t; +} WIRE_ATTR; -typedef enum lnet_msg_type { +enum lnet_msg_type { LNET_MSG_ACK = 0, LNET_MSG_PUT, LNET_MSG_GET, LNET_MSG_REPLY, LNET_MSG_HELLO, -} lnet_msg_type_t; +}; /* The variant fields of the portals message header are aligned on an 8 * byte boundary in the message header. Note that all types used in these @@ -167,7 +167,7 @@ struct lnet_hello { __u32 type; } WIRE_ATTR; -typedef struct lnet_hdr { +struct lnet_hdr { lnet_nid_t dest_nid; lnet_nid_t src_nid; lnet_pid_t dest_pid; @@ -182,7 +182,7 @@ typedef struct lnet_hdr { struct lnet_reply reply; struct lnet_hello hello; } msg; -} WIRE_ATTR lnet_hdr_t; +} WIRE_ATTR; /* A HELLO message contains a magic number and protocol version * code in the header's dest_nid, the peer's NID in the src_nid, and @@ -193,11 +193,11 @@ typedef struct lnet_hdr { * exchange HELLO messages when a connection is first established. Individual * LNDs can put whatever else they fancy in lnet_hdr::msg. */ -typedef struct lnet_magicversion { +struct lnet_magicversion { __u32 magic; /* LNET_PROTO_TCP_MAGIC */ __u16 version_major; /* increment on incompatible change */ __u16 version_minor; /* increment on compatible change */ -} WIRE_ATTR lnet_magic_version_t; +} WIRE_ATTR; /* PROTO MAGIC for LNDs */ #define LNET_PROTO_IB_MAGIC 0x0be91b91 @@ -215,15 +215,15 @@ typedef struct lnet_magicversion { #define LNET_PROTO_TCP_VERSION_MINOR 0 /* Acceptor connection request */ -typedef struct lnet_acceptor_connreq { +struct lnet_acceptor_connreq { __u32 acr_magic; /* PTL_ACCEPTOR_PROTO_MAGIC */ __u32 acr_version; /* protocol version */ __u64 acr_nid; /* target NID */ -} WIRE_ATTR lnet_acceptor_connreq_t; +} WIRE_ATTR; #define LNET_PROTO_ACCEPTOR_VERSION 1 -typedef struct lnet_counters { +struct lnet_counters { __u32 msgs_alloc; __u32 msgs_max; __u32 errors; @@ -235,7 +235,7 @@ typedef struct lnet_counters { __u64 recv_length; __u64 route_length; __u64 drop_length; -} WIRE_ATTR lnet_counters_t; +} WIRE_ATTR; #define LNET_NI_STATUS_UP 0x15aac0de #define LNET_NI_STATUS_DOWN 0xdeadface @@ -307,9 +307,9 @@ struct lnet_ping_info { */ #define LNET_WIRE_HANDLE_COOKIE_NONE (-1) -typedef struct lnet_handle_eq { +struct lnet_handle_eq { __u64 cookie; -} lnet_handle_eq_t; +}; /** * Invalidate eq handle \a h. @@ -329,9 +329,9 @@ static inline int LNetEQHandleIsInvalid(struct lnet_handle_eq h) return (LNET_WIRE_HANDLE_COOKIE_NONE == h.cookie); } -typedef struct lnet_handle_md { +struct lnet_handle_md { __u64 cookie; -} lnet_handle_md_t; +}; /** * Invalidate md handle \a h. @@ -351,19 +351,19 @@ static inline int LNetMDHandleIsInvalid(struct lnet_handle_md h) return (LNET_WIRE_HANDLE_COOKIE_NONE == h.cookie); } -typedef struct lnet_handle_me { +struct lnet_handle_me { __u64 cookie; -} lnet_handle_me_t; +}; /** * Global process ID. */ -typedef struct lnet_process_id { +struct lnet_process_id { /** node id */ lnet_nid_t nid; /** process id */ lnet_pid_t pid; -} lnet_process_id_t; +}; /** @} lnet_addr */ /** \addtogroup lnet_me @@ -373,10 +373,10 @@ typedef struct lnet_process_id { * Specifies whether the match entry or memory descriptor should be unlinked * automatically (LNET_UNLINK) or not (LNET_RETAIN). */ -typedef enum lnet_unlink { +enum lnet_unlink { LNET_RETAIN = 0, LNET_UNLINK -} lnet_unlink_t; +}; /** * Values of the type enum lnet_ins_pos are used to control where a new match @@ -385,14 +385,14 @@ typedef enum lnet_unlink { * LNET_INS_AFTER is used to insert the new entry after the current entry * or after the last item in the list. */ -typedef enum lnet_ins_pos { +enum lnet_ins_pos { /** insert ME before current position or head of the list */ LNET_INS_BEFORE, /** insert ME after current position or tail of the list */ LNET_INS_AFTER, /** attach ME at tail of local CPU partition ME list */ LNET_INS_LOCAL -} lnet_ins_pos; +}; /** @} lnet_me */ @@ -403,7 +403,7 @@ typedef enum lnet_ins_pos { * Defines the visible parts of a memory descriptor. Values of this type * are used to initialize memory descriptors. */ -typedef struct lnet_md { +struct lnet_md { /** * Specify the memory region associated with the memory descriptor. * If the options field has: @@ -507,7 +507,7 @@ typedef struct lnet_md { * if the LNET_MD_BULK_HANDLE option is set. */ struct lnet_handle_md bulk_handle; -} lnet_md_t; +}; /* Max Transfer Unit (minimum supported everywhere). * CAVEAT EMPTOR, with multinet (i.e. routers forwarding between networks) @@ -569,7 +569,7 @@ typedef struct { /** * Six types of events can be logged in an event queue. */ -typedef enum lnet_event_kind { +enum lnet_event_kind { /** An incoming GET operation has completed on the MD. */ LNET_EVENT_GET = 1, /** @@ -605,14 +605,14 @@ typedef enum lnet_event_kind { * \see LNetMDUnlink */ LNET_EVENT_UNLINK, -} lnet_event_kind_t; +}; #define LNET_SEQ_GT(a, b) (((signed long)((a) - (b))) > 0) /** * Information about an event on a MD. */ -typedef struct lnet_event { +struct lnet_event { /** The identifier (nid, pid) of the target. */ struct lnet_process_id target; /** The identifier (nid, pid) of the initiator. */ @@ -686,7 +686,7 @@ typedef struct lnet_event { * to each event. */ volatile unsigned long sequence; -} lnet_event_t; +}; /** * Event queue handler function type. @@ -713,12 +713,12 @@ typedef void (*lnet_eq_handler_t)(struct lnet_event *event); * \see struct lnet_md::options for the discussion on LNET_MD_ACK_DISABLE * by which acknowledgments can be disabled for a MD. */ -typedef enum lnet_ack_req { +enum lnet_ack_req { /** Request an acknowledgment */ LNET_ACK_REQ, /** Request that no acknowledgment should be generated. */ LNET_NOACK_REQ -} lnet_ack_req_t; +}; /** @} lnet_data */ /** @} lnet */ diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index dbcc44a..bc0cef8 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -101,8 +101,8 @@ static atomic_t lnet_dlc_seq_no = ATOMIC_INIT(0); static int lnet_ping(struct lnet_process_id id, signed long timeout, struct lnet_process_id __user *ids, int n_ids); -static int lnet_discover(lnet_process_id_t id, __u32 force, - lnet_process_id_t __user *ids, int n_ids); +static int lnet_discover(struct lnet_process_id id, __u32 force, + struct lnet_process_id __user *ids, int n_ids); static int discovery_set(const char *val, struct kernel_param *kp) @@ -1389,11 +1389,11 @@ lnet_ping_target_fini(void) /* Resize the push target. */ int lnet_push_target_resize(void) { - lnet_process_id_t id = { LNET_NID_ANY, LNET_PID_ANY }; - lnet_md_t md = { NULL }; - lnet_handle_me_t meh; - lnet_handle_md_t mdh; - lnet_handle_md_t old_mdh; + struct lnet_process_id id = { LNET_NID_ANY, LNET_PID_ANY }; + struct lnet_md md = { NULL }; + struct lnet_handle_me meh; + struct lnet_handle_md mdh; + struct lnet_handle_md old_mdh; struct lnet_ping_buffer *pbuf; struct lnet_ping_buffer *old_pbuf; int nnis = the_lnet.ln_push_target_nnis; @@ -3267,7 +3267,7 @@ LNetCtl(unsigned int cmd, void *arg) mutex_lock(&the_lnet.ln_api_mutex); rc = lnet_get_peer_list(&cfg->prcfg_count, &cfg->prcfg_size, - (lnet_process_id_t __user *)cfg->prcfg_bulk); + (struct lnet_process_id __user *)cfg->prcfg_bulk); mutex_unlock(&the_lnet.ln_api_mutex); return rc; } @@ -3655,13 +3655,13 @@ static int lnet_ping(struct lnet_process_id id, signed long timeout, } static int -lnet_discover(lnet_process_id_t id, __u32 force, lnet_process_id_t __user *ids, - int n_ids) +lnet_discover(struct lnet_process_id id, __u32 force, + struct lnet_process_id __user *ids, int n_ids) { struct lnet_peer_ni *lpni; struct lnet_peer_ni *p; struct lnet_peer *lp; - lnet_process_id_t *buf; + struct lnet_process_id *buf; int cpt; int i; int rc; diff --git a/lnet/lnet/lib-move.c b/lnet/lnet/lib-move.c index d8a1464..963bec9 100644 --- a/lnet/lnet/lib-move.c +++ b/lnet/lnet/lib-move.c @@ -62,7 +62,8 @@ get_stats_counts(struct lnet_element_stats *stats, return NULL; } -void lnet_incr_stats(struct lnet_element_stats *stats, lnet_msg_type_t msg_type, +void lnet_incr_stats(struct lnet_element_stats *stats, + enum lnet_msg_type msg_type, enum lnet_stats_type stats_type) { struct lnet_comm_count *counts = get_stats_counts(stats, stats_type); diff --git a/lnet/lnet/peer.c b/lnet/lnet/peer.c index 1c34781..e4c4507 100644 --- a/lnet/lnet/peer.c +++ b/lnet/lnet/peer.c @@ -718,10 +718,9 @@ lnet_get_next_peer_ni_locked(struct lnet_peer *peer, } /* Call with the ln_api_mutex held */ -int -lnet_get_peer_list(__u32 *countp, __u32 *sizep, lnet_process_id_t __user *ids) +int lnet_get_peer_list(u32 *countp, u32 *sizep, struct lnet_process_id __user *ids) { - lnet_process_id_t id; + struct lnet_process_id id; struct lnet_peer_table *ptable; struct lnet_peer *lp; __u32 count = 0; @@ -2314,7 +2313,7 @@ lnet_discovery_event_unlink(struct lnet_peer *lp, struct lnet_event *ev) * Called with lnet_res_lock(cpt) held. The cpt is the * lnet_cpt_of_cookie() of the md handle cookie. */ -static void lnet_discovery_event_handler(lnet_event_t *event) +static void lnet_discovery_event_handler(struct lnet_event *event) { struct lnet_peer *lp = event->md.user_ptr; struct lnet_ping_buffer *pbuf; @@ -2489,7 +2488,7 @@ out: static int lnet_peer_set_primary_data(struct lnet_peer *lp, struct lnet_ping_buffer *pbuf) { - lnet_handle_md_t mdh; + struct lnet_handle_md mdh; /* Queue lp for discovery, and force it on the request queue. */ lnet_net_lock(LNET_LOCK_EX); @@ -2649,7 +2648,7 @@ out: static int lnet_peer_ping_failed(struct lnet_peer *lp) __must_hold(&lp->lp_lock) { - lnet_handle_md_t mdh; + struct lnet_handle_md mdh; int rc; mdh = lp->lp_ping_mdh; @@ -2708,8 +2707,8 @@ static lnet_nid_t lnet_peer_select_nid(struct lnet_peer *lp) static int lnet_peer_send_ping(struct lnet_peer *lp) __must_hold(&lp->lp_lock) { - lnet_md_t md = { NULL }; - lnet_process_id_t id; + struct lnet_md md = { NULL }; + struct lnet_process_id id; struct lnet_ping_buffer *pbuf; int nnis; int rc; @@ -2789,7 +2788,7 @@ fail_error: static int lnet_peer_push_failed(struct lnet_peer *lp) __must_hold(&lp->lp_lock) { - lnet_handle_md_t mdh; + struct lnet_handle_md mdh; int rc; mdh = lp->lp_push_mdh; @@ -2812,8 +2811,8 @@ static int lnet_peer_send_push(struct lnet_peer *lp) __must_hold(&lp->lp_lock) { struct lnet_ping_buffer *pbuf; - lnet_process_id_t id; - lnet_md_t md; + struct lnet_process_id id; + struct lnet_md md; int cpt; int rc; diff --git a/lnet/lnet/router.c b/lnet/lnet/router.c index 9c0ef36..68bb20a 100644 --- a/lnet/lnet/router.c +++ b/lnet/lnet/router.c @@ -942,7 +942,7 @@ lnet_destroy_rc_data(struct lnet_rc_data *rcd) LIBCFS_FREE(rcd, sizeof(*rcd)); } -static lnet_rc_data_t * +static struct lnet_rc_data * lnet_update_rc_data_locked(struct lnet_peer_ni *gateway) { struct lnet_handle_md mdh; diff --git a/lnet/utils/lnetconfig/liblnetconfig.c b/lnet/utils/lnetconfig/liblnetconfig.c index 2df6a36..f9ecf61 100644 --- a/lnet/utils/lnetconfig/liblnetconfig.c +++ b/lnet/utils/lnetconfig/liblnetconfig.c @@ -497,7 +497,7 @@ static int infra_ping_nid(char *ping_nids, char *oper, int param, int ioc_call, struct lnet_ioctl_ping_data ping; struct cYAML *root = NULL, *ping_node = NULL, *item = NULL, *first_seq = NULL, *tmp = NULL, *peer_ni = NULL; - lnet_process_id_t id; + struct lnet_process_id id; char err_str[LNET_MAX_STR_LEN] = {0}; char *sep, *token, *end; char buf[6]; @@ -506,7 +506,7 @@ static int infra_ping_nid(char *ping_nids, char *oper, int param, int ioc_call, int i; bool flag = false; - len = (sizeof(lnet_process_id_t) * LNET_INTERFACES_MAX_DEFAULT); + len = (sizeof(struct lnet_process_id) * LNET_INTERFACES_MAX_DEFAULT); data = calloc(1, len); if (data == NULL) @@ -2404,7 +2404,7 @@ int lustre_lnet_show_peer(char *knid, int detail, int seq_no, *first_seq = NULL, *peer_root = NULL, *tmp = NULL, *msg_statistics = NULL, *statistics = NULL; char err_str[LNET_MAX_STR_LEN]; - lnet_process_id_t *list = NULL; + struct lnet_process_id *list = NULL; void *data = NULL; void *lpni_data; @@ -2421,7 +2421,7 @@ int lustre_lnet_show_peer(char *knid, int detail, int seq_no, goto out; count = 1000; - size = count * sizeof(lnet_process_id_t); + size = count * sizeof(struct lnet_process_id); list = malloc(size); if (list == NULL) { l_errno = ENOMEM; @@ -2684,7 +2684,7 @@ int lustre_lnet_list_peer(int seq_no, int l_errno = 0; struct cYAML *root = NULL, *list_root = NULL, *first_seq = NULL; char err_str[LNET_MAX_STR_LEN]; - lnet_process_id_t *list = NULL; + struct lnet_process_id *list = NULL; snprintf(err_str, sizeof(err_str), "\"out of memory\""); @@ -2701,7 +2701,7 @@ int lustre_lnet_list_peer(int seq_no, goto out; count = 1000; - size = count * sizeof(lnet_process_id_t); + size = count * sizeof(struct lnet_process_id); list = malloc(size); if (list == NULL) { l_errno = ENOMEM; diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 5c6438c..6dfdfde 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1411,7 +1411,7 @@ static void dump_all_bulk_pages(struct obdo *oa, __u32 page_count, } static int -check_write_checksum(struct obdo *oa, const lnet_process_id_t *peer, +check_write_checksum(struct obdo *oa, const struct lnet_process_id *peer, __u32 client_cksum, __u32 server_cksum, struct osc_brw_async_args *aa) { diff --git a/lustre/target/tgt_handler.c b/lustre/target/tgt_handler.c index b81882c..b2c3bec 100644 --- a/lustre/target/tgt_handler.c +++ b/lustre/target/tgt_handler.c @@ -1865,7 +1865,7 @@ static void dump_all_bulk_pages(struct obdo *oa, int count, static int check_read_checksum(struct niobuf_local *local_nb, int npages, struct obd_export *exp, struct obdo *oa, - const lnet_process_id_t *peer, + const struct lnet_process_id *peer, __u32 client_cksum, __u32 server_cksum, enum cksum_types server_cksum_type) { -- 1.8.3.1