Question about removing lustre typedefs.
Various bits of lustre code use a mix of struct foo and foo_t.
When would be an appropriate time to submit patches similar to
below that individually remove various typedefs from lustre code?
These are pretty trivial to produce and verify so there's no
particular hurry to do them now but applying them will require
resync points for active and actually useful developers.
A few scripted examples are done:
Joe Perches (3):
staging: lustre: Remove typedef lnet_peer_t
staging: lustre: Remove typedef lnd_t
staging: lustre: Remove typedef lnet_msg_t
.../staging/lustre/include/linux/lnet/lib-lnet.h | 62 +++++++--------
.../staging/lustre/include/linux/lnet/lib-types.h | 22 +++---
.../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 4 +-
.../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 6 +-
.../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 8 +-
.../staging/lustre/lnet/klnds/socklnd/socklnd.c | 2 +-
.../staging/lustre/lnet/klnds/socklnd/socklnd.h | 6 +-
.../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 6 +-
drivers/staging/lustre/lnet/lnet/api-ni.c | 16 ++--
drivers/staging/lustre/lnet/lnet/lib-move.c | 92 +++++++++++-----------
drivers/staging/lustre/lnet/lnet/lib-msg.c | 24 +++---
drivers/staging/lustre/lnet/lnet/lib-ptl.c | 4 +-
drivers/staging/lustre/lnet/lnet/lo.c | 8 +-
drivers/staging/lustre/lnet/lnet/peer.c | 30 +++----
drivers/staging/lustre/lnet/lnet/router.c | 28 +++----
drivers/staging/lustre/lnet/lnet/router_proc.c | 4 +-
16 files changed, 161 insertions(+), 161 deletions(-)
--
2.8.0.rc4.16.g56331f8
Just use struct lnet_peer instead.
Signed-off-by: Joe Perches <[email protected]>
---
.../staging/lustre/include/linux/lnet/lib-lnet.h | 18 ++++++-------
.../staging/lustre/include/linux/lnet/lib-types.h | 6 ++---
drivers/staging/lustre/lnet/lnet/lib-move.c | 20 +++++++--------
drivers/staging/lustre/lnet/lnet/peer.c | 30 +++++++++++-----------
drivers/staging/lustre/lnet/lnet/router.c | 28 ++++++++++----------
drivers/staging/lustre/lnet/lnet/router_proc.c | 4 +--
6 files changed, 53 insertions(+), 53 deletions(-)
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index dfc0208..ea29cb9 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -364,16 +364,16 @@ lnet_handle2me(lnet_handle_me_t *handle)
}
static inline void
-lnet_peer_addref_locked(lnet_peer_t *lp)
+lnet_peer_addref_locked(struct lnet_peer *lp)
{
LASSERT(lp->lp_refcount > 0);
lp->lp_refcount++;
}
-void lnet_destroy_peer_locked(lnet_peer_t *lp);
+void lnet_destroy_peer_locked(struct lnet_peer *lp);
static inline void
-lnet_peer_decref_locked(lnet_peer_t *lp)
+lnet_peer_decref_locked(struct lnet_peer *lp)
{
LASSERT(lp->lp_refcount > 0);
lp->lp_refcount--;
@@ -382,7 +382,7 @@ lnet_peer_decref_locked(lnet_peer_t *lp)
}
static inline int
-lnet_isrouter(lnet_peer_t *lp)
+lnet_isrouter(struct lnet_peer *lp)
{
return lp->lp_rtr_refcount ? 1 : 0;
}
@@ -454,7 +454,7 @@ int lnet_lib_init(void);
void lnet_lib_exit(void);
int lnet_notify(lnet_ni_t *ni, lnet_nid_t peer, int alive, unsigned long when);
-void lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive,
+void lnet_notify_locked(struct lnet_peer *lp, int notifylnd, int alive,
unsigned long when);
int lnet_add_route(__u32 net, __u32 hops, lnet_nid_t gateway_nid,
unsigned int priority);
@@ -721,7 +721,7 @@ int lnet_peer_buffer_credits(lnet_ni_t *ni);
int lnet_router_checker_start(void);
void lnet_router_checker_stop(void);
-void lnet_router_ni_update_locked(lnet_peer_t *gw, __u32 net);
+void lnet_router_ni_update_locked(struct lnet_peer *gw, __u32 net);
void lnet_swap_pinginfo(lnet_ping_info_t *info);
int lnet_parse_ip2nets(char **networksp, char *ip2nets);
@@ -729,8 +729,8 @@ int lnet_parse_routes(char *route_str, int *im_a_router);
int lnet_parse_networks(struct list_head *nilist, char *networks);
int lnet_net_unique(__u32 net, struct list_head *nilist);
-int lnet_nid2peer_locked(lnet_peer_t **lpp, lnet_nid_t nid, int cpt);
-lnet_peer_t *lnet_find_peer_locked(struct lnet_peer_table *ptable,
+int lnet_nid2peer_locked(struct lnet_peer **lpp, lnet_nid_t nid, int cpt);
+struct lnet_peer *lnet_find_peer_locked(struct lnet_peer_table *ptable,
lnet_nid_t nid);
void lnet_peer_tables_cleanup(lnet_ni_t *ni);
void lnet_peer_tables_destroy(void);
@@ -744,7 +744,7 @@ int lnet_get_peer_info(__u32 peer_index, __u64 *nid,
__u32 *peer_tx_qnob);
static inline void
-lnet_peer_set_alive(lnet_peer_t *lp)
+lnet_peer_set_alive(struct lnet_peer *lp)
{
lp->lp_last_query = jiffies;
lp->lp_last_alive = jiffies;
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h b/drivers/staging/lustre/include/linux/lnet/lib-types.h
index 29c72f8..d223de5 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-types.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-types.h
@@ -302,7 +302,7 @@ typedef struct {
lnet_ping_info_t *rcd_pinginfo; /* ping buffer */
} lnet_rc_data_t;
-typedef struct lnet_peer {
+struct lnet_peer {
struct list_head lp_hashlist; /* chain on peer hash */
struct list_head lp_txq; /* messages blocking for
tx credits */
@@ -343,7 +343,7 @@ typedef struct lnet_peer {
unsigned int lp_ping_feats;
struct list_head lp_routes; /* routers on this peer */
lnet_rc_data_t *lp_rcd; /* router checker state */
-} lnet_peer_t;
+};
/* peer hash size */
#define LNET_PEER_HASH_BITS 9
@@ -369,7 +369,7 @@ struct lnet_peer_table {
typedef struct {
struct list_head lr_list; /* chain on net */
struct list_head lr_gwlist; /* chain on gateway */
- lnet_peer_t *lr_gateway; /* router node */
+ struct lnet_peer *lr_gateway; /* router node */
__u32 lr_net; /* remote network number */
int lr_seq; /* sequence for round-robin */
unsigned int lr_downis; /* number of down NIs */
diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c b/drivers/staging/lustre/lnet/lnet/lib-move.c
index 44e2bd6..4ebf1b4 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -684,7 +684,7 @@ lnet_ni_eager_recv(lnet_ni_t *ni, lnet_msg_t *msg)
/* NB: caller shall hold a ref on 'lp' as I'd drop lnet_net_lock */
static void
-lnet_ni_query_locked(lnet_ni_t *ni, lnet_peer_t *lp)
+lnet_ni_query_locked(lnet_ni_t *ni, struct lnet_peer *lp)
{
unsigned long last_alive = 0;
@@ -703,7 +703,7 @@ lnet_ni_query_locked(lnet_ni_t *ni, lnet_peer_t *lp)
/* NB: always called with lnet_net_lock held */
static inline int
-lnet_peer_is_alive(lnet_peer_t *lp, unsigned long now)
+lnet_peer_is_alive(struct lnet_peer *lp, unsigned long now)
{
int alive;
unsigned long deadline;
@@ -737,7 +737,7 @@ lnet_peer_is_alive(lnet_peer_t *lp, unsigned long now)
* may drop the lnet_net_lock
*/
static int
-lnet_peer_alive_locked(lnet_peer_t *lp)
+lnet_peer_alive_locked(struct lnet_peer *lp)
{
unsigned long now = cfs_time_current();
@@ -793,7 +793,7 @@ lnet_peer_alive_locked(lnet_peer_t *lp)
static int
lnet_post_send_locked(lnet_msg_t *msg, int do_send)
{
- lnet_peer_t *lp = msg->msg_txpeer;
+ struct lnet_peer *lp = msg->msg_txpeer;
lnet_ni_t *ni = lp->lp_ni;
int cpt = msg->msg_tx_cpt;
struct lnet_tx_queue *tq = ni->ni_tx_queues[cpt];
@@ -904,7 +904,7 @@ lnet_post_routed_recv_locked(lnet_msg_t *msg, int do_recv)
* I return LNET_CREDIT_WAIT if msg blocked and LNET_CREDIT_OK if
* received or OK to receive
*/
- lnet_peer_t *lp = msg->msg_rxpeer;
+ struct lnet_peer *lp = msg->msg_rxpeer;
lnet_rtrbufpool_t *rbp;
lnet_rtrbuf_t *rb;
@@ -974,7 +974,7 @@ lnet_post_routed_recv_locked(lnet_msg_t *msg, int do_recv)
void
lnet_return_tx_credits_locked(lnet_msg_t *msg)
{
- lnet_peer_t *txpeer = msg->msg_txpeer;
+ struct lnet_peer *txpeer = msg->msg_txpeer;
lnet_msg_t *msg2;
if (msg->msg_txcredit) {
@@ -1069,7 +1069,7 @@ lnet_drop_routed_msgs_locked(struct list_head *list, int cpt)
void
lnet_return_rx_credits_locked(lnet_msg_t *msg)
{
- lnet_peer_t *rxpeer = msg->msg_rxpeer;
+ struct lnet_peer *rxpeer = msg->msg_rxpeer;
lnet_msg_t *msg2;
if (msg->msg_rtrcredit) {
@@ -1154,8 +1154,8 @@ routing_off:
static int
lnet_compare_routes(lnet_route_t *r1, lnet_route_t *r2)
{
- lnet_peer_t *p1 = r1->lr_gateway;
- lnet_peer_t *p2 = r2->lr_gateway;
+ struct lnet_peer *p1 = r1->lr_gateway;
+ struct lnet_peer *p2 = r2->lr_gateway;
int r1_hops = (r1->lr_hops == LNET_UNDEFINED_HOPS) ? 1 : r1->lr_hops;
int r2_hops = (r2->lr_hops == LNET_UNDEFINED_HOPS) ? 1 : r2->lr_hops;
@@ -1189,7 +1189,7 @@ lnet_compare_routes(lnet_route_t *r1, lnet_route_t *r2)
return -ERANGE;
}
-static lnet_peer_t *
+static struct lnet_peer *
lnet_find_route_locked(lnet_ni_t *ni, lnet_nid_t target, lnet_nid_t rtr_nid)
{
lnet_remotenet_t *rnet;
diff --git a/drivers/staging/lustre/lnet/lnet/peer.c b/drivers/staging/lustre/lnet/lnet/peer.c
index b026fee..3bb4142 100644
--- a/drivers/staging/lustre/lnet/lnet/peer.c
+++ b/drivers/staging/lustre/lnet/lnet/peer.c
@@ -108,8 +108,8 @@ static void
lnet_peer_table_cleanup_locked(lnet_ni_t *ni, struct lnet_peer_table *ptable)
{
int i;
- lnet_peer_t *lp;
- lnet_peer_t *tmp;
+ struct lnet_peer *lp;
+ struct lnet_peer *tmp;
for (i = 0; i < LNET_PEER_HASH_SIZE; i++) {
list_for_each_entry_safe(lp, tmp, &ptable->pt_hash[i],
@@ -148,8 +148,8 @@ static void
lnet_peer_table_del_rtrs_locked(lnet_ni_t *ni, struct lnet_peer_table *ptable,
int cpt_locked)
{
- lnet_peer_t *lp;
- lnet_peer_t *tmp;
+ struct lnet_peer *lp;
+ struct lnet_peer *tmp;
lnet_nid_t lp_nid;
int i;
@@ -176,8 +176,8 @@ lnet_peer_tables_cleanup(lnet_ni_t *ni)
{
struct lnet_peer_table *ptable;
struct list_head deathrow;
- lnet_peer_t *lp;
- lnet_peer_t *temp;
+ struct lnet_peer *lp;
+ struct lnet_peer *temp;
int i;
INIT_LIST_HEAD(&deathrow);
@@ -218,7 +218,7 @@ lnet_peer_tables_cleanup(lnet_ni_t *ni)
}
void
-lnet_destroy_peer_locked(lnet_peer_t *lp)
+lnet_destroy_peer_locked(struct lnet_peer *lp)
{
struct lnet_peer_table *ptable;
@@ -240,11 +240,11 @@ lnet_destroy_peer_locked(lnet_peer_t *lp)
ptable->pt_zombies--;
}
-lnet_peer_t *
+struct lnet_peer *
lnet_find_peer_locked(struct lnet_peer_table *ptable, lnet_nid_t nid)
{
struct list_head *peers;
- lnet_peer_t *lp;
+ struct lnet_peer *lp;
LASSERT(!the_lnet.ln_shutdown);
@@ -260,11 +260,11 @@ lnet_find_peer_locked(struct lnet_peer_table *ptable, lnet_nid_t nid)
}
int
-lnet_nid2peer_locked(lnet_peer_t **lpp, lnet_nid_t nid, int cpt)
+lnet_nid2peer_locked(struct lnet_peer **lpp, lnet_nid_t nid, int cpt)
{
struct lnet_peer_table *ptable;
- lnet_peer_t *lp = NULL;
- lnet_peer_t *lp2;
+ struct lnet_peer *lp = NULL;
+ struct lnet_peer *lp2;
int cpt2;
int rc = 0;
@@ -284,7 +284,7 @@ lnet_nid2peer_locked(lnet_peer_t **lpp, lnet_nid_t nid, int cpt)
if (!list_empty(&ptable->pt_deathrow)) {
lp = list_entry(ptable->pt_deathrow.next,
- lnet_peer_t, lp_hashlist);
+ struct lnet_peer, lp_hashlist);
list_del(&lp->lp_hashlist);
}
@@ -366,7 +366,7 @@ void
lnet_debug_peer(lnet_nid_t nid)
{
char *aliveness = "NA";
- lnet_peer_t *lp;
+ struct lnet_peer *lp;
int rc;
int cpt;
@@ -403,7 +403,7 @@ lnet_get_peer_info(__u32 peer_index, __u64 *nid,
__u32 *peer_tx_qnob)
{
struct lnet_peer_table *peer_table;
- lnet_peer_t *lp;
+ struct lnet_peer *lp;
bool found = false;
int lncpt, j;
diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c
index 61459cf..3506cd47 100644
--- a/drivers/staging/lustre/lnet/lnet/router.c
+++ b/drivers/staging/lustre/lnet/lnet/router.c
@@ -97,7 +97,7 @@ lnet_peers_start_down(void)
}
void
-lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive,
+lnet_notify_locked(struct lnet_peer *lp, int notifylnd, int alive,
unsigned long when)
{
if (time_before(when, lp->lp_timestamp)) { /* out of date information */
@@ -127,7 +127,7 @@ lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive,
}
static void
-lnet_ni_notify_locked(lnet_ni_t *ni, lnet_peer_t *lp)
+lnet_ni_notify_locked(lnet_ni_t *ni, struct lnet_peer *lp)
{
int alive;
int notifylnd;
@@ -166,7 +166,7 @@ lnet_ni_notify_locked(lnet_ni_t *ni, lnet_peer_t *lp)
}
static void
-lnet_rtr_addref_locked(lnet_peer_t *lp)
+lnet_rtr_addref_locked(struct lnet_peer *lp)
{
LASSERT(lp->lp_refcount > 0);
LASSERT(lp->lp_rtr_refcount >= 0);
@@ -178,7 +178,7 @@ lnet_rtr_addref_locked(lnet_peer_t *lp)
/* a simple insertion sort */
list_for_each_prev(pos, &the_lnet.ln_routers) {
- lnet_peer_t *rtr = list_entry(pos, lnet_peer_t,
+ struct lnet_peer *rtr = list_entry(pos, struct lnet_peer,
lp_rtr_list);
if (rtr->lp_nid < lp->lp_nid)
@@ -193,7 +193,7 @@ lnet_rtr_addref_locked(lnet_peer_t *lp)
}
static void
-lnet_rtr_decref_locked(lnet_peer_t *lp)
+lnet_rtr_decref_locked(struct lnet_peer *lp)
{
LASSERT(lp->lp_refcount > 0);
LASSERT(lp->lp_rtr_refcount > 0);
@@ -790,7 +790,7 @@ lnet_router_checker_event(lnet_event_t *event)
static void
lnet_wait_known_routerstate(void)
{
- lnet_peer_t *rtr;
+ struct lnet_peer *rtr;
struct list_head *entry;
int all_known;
@@ -801,7 +801,7 @@ lnet_wait_known_routerstate(void)
all_known = 1;
list_for_each(entry, &the_lnet.ln_routers) {
- rtr = list_entry(entry, lnet_peer_t, lp_rtr_list);
+ rtr = list_entry(entry, struct lnet_peer, lp_rtr_list);
if (!rtr->lp_alive_count) {
all_known = 0;
@@ -820,7 +820,7 @@ lnet_wait_known_routerstate(void)
}
void
-lnet_router_ni_update_locked(lnet_peer_t *gw, __u32 net)
+lnet_router_ni_update_locked(struct lnet_peer *gw, __u32 net)
{
lnet_route_t *rte;
@@ -898,7 +898,7 @@ lnet_destroy_rc_data(lnet_rc_data_t *rcd)
}
static lnet_rc_data_t *
-lnet_create_rc_data_locked(lnet_peer_t *gateway)
+lnet_create_rc_data_locked(struct lnet_peer *gateway)
{
lnet_rc_data_t *rcd = NULL;
lnet_ping_info_t *pi;
@@ -967,7 +967,7 @@ lnet_create_rc_data_locked(lnet_peer_t *gateway)
}
static int
-lnet_router_check_interval(lnet_peer_t *rtr)
+lnet_router_check_interval(struct lnet_peer *rtr)
{
int secs;
@@ -980,7 +980,7 @@ lnet_router_check_interval(lnet_peer_t *rtr)
}
static void
-lnet_ping_router_locked(lnet_peer_t *rtr)
+lnet_ping_router_locked(struct lnet_peer *rtr)
{
lnet_rc_data_t *rcd = NULL;
unsigned long now = cfs_time_current();
@@ -1124,7 +1124,7 @@ lnet_prune_rc_data(int wait_unlink)
{
lnet_rc_data_t *rcd;
lnet_rc_data_t *tmp;
- lnet_peer_t *lp;
+ struct lnet_peer *lp;
struct list_head head;
int i = 2;
@@ -1230,7 +1230,7 @@ lnet_router_checker_active(void)
static int
lnet_router_checker(void *arg)
{
- lnet_peer_t *rtr;
+ struct lnet_peer *rtr;
struct list_head *entry;
cfs_block_allsigs();
@@ -1245,7 +1245,7 @@ rescan:
version = the_lnet.ln_routers_version;
list_for_each(entry, &the_lnet.ln_routers) {
- rtr = list_entry(entry, lnet_peer_t, lp_rtr_list);
+ rtr = list_entry(entry, struct lnet_peer, lp_rtr_list);
cpt2 = lnet_cpt_of_nid_locked(rtr->lp_nid);
if (cpt != cpt2) {
diff --git a/drivers/staging/lustre/lnet/lnet/router_proc.c b/drivers/staging/lustre/lnet/lnet/router_proc.c
index 65f65a3..2d10238 100644
--- a/drivers/staging/lustre/lnet/lnet/router_proc.c
+++ b/drivers/staging/lustre/lnet/lnet/router_proc.c
@@ -307,7 +307,7 @@ static int proc_lnet_routers(struct ctl_table *table, int write,
r = the_lnet.ln_routers.next;
while (r != &the_lnet.ln_routers) {
- lnet_peer_t *lp = list_entry(r, lnet_peer_t,
+ struct lnet_peer *lp = list_entry(r, struct lnet_peer,
lp_rtr_list);
if (!skip) {
@@ -454,7 +454,7 @@ static int proc_lnet_peers(struct ctl_table *table, int write,
p = ptable->pt_hash[hash].next;
while (p != &ptable->pt_hash[hash]) {
- lnet_peer_t *lp = list_entry(p, lnet_peer_t,
+ struct lnet_peer *lp = list_entry(p, struct lnet_peer,
lp_hashlist);
if (!skip) {
peer = lp;
--
2.8.0.rc4.16.g56331f8
Just use struct lnet_lnd instead.
Signed-off-by: Joe Perches <[email protected]>
---
drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 6 +++---
drivers/staging/lustre/include/linux/lnet/lib-types.h | 6 +++---
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 4 ++--
drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 2 +-
drivers/staging/lustre/lnet/lnet/api-ni.c | 14 +++++++-------
drivers/staging/lustre/lnet/lnet/lo.c | 2 +-
6 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index ea29cb9..2390d94 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -439,7 +439,7 @@ lnet_net2rnethash(__u32 net)
((1U << the_lnet.ln_remote_nets_hbits) - 1)];
}
-extern lnd_t the_lolnd;
+extern struct lnet_lnd the_lolnd;
extern int avoid_asym_router_failure;
int lnet_cpt_of_nid_locked(lnet_nid_t nid);
@@ -683,8 +683,8 @@ void lnet_me_unlink(lnet_me_t *me);
void lnet_md_unlink(lnet_libmd_t *md);
void lnet_md_deconstruct(lnet_libmd_t *lmd, lnet_md_t *umd);
-void lnet_register_lnd(lnd_t *lnd);
-void lnet_unregister_lnd(lnd_t *lnd);
+void lnet_register_lnd(struct lnet_lnd *lnd);
+void lnet_unregister_lnd(struct lnet_lnd *lnd);
int lnet_connect(struct socket **sockp, lnet_nid_t peer_nid,
__u32 local_ip, __u32 peer_ip, int peer_port);
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h b/drivers/staging/lustre/include/linux/lnet/lib-types.h
index d223de5..62baaca 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-types.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-types.h
@@ -178,7 +178,7 @@ typedef struct {
struct lnet_ni; /* forward ref */
-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 */
@@ -244,7 +244,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 */
@@ -268,7 +268,7 @@ typedef struct lnet_ni {
__u32 *ni_cpts; /* bond NI on some CPTs */
lnet_nid_t ni_nid; /* interface's NID */
void *ni_data; /* instance-specific data */
- lnd_t *ni_lnd; /* procedural interface */
+ struct lnet_lnd *ni_lnd; /* procedural interface */
struct lnet_tx_queue **ni_tx_queues; /* percpt TX queues */
int **ni_refs; /* percpt reference count */
time64_t ni_last_alive;/* when I was last alive */
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
index e89c2a1..3e3d92c 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
@@ -42,7 +42,7 @@
#include <asm/page.h>
#include "o2iblnd.h"
-static lnd_t the_o2iblnd;
+static struct lnet_lnd the_o2iblnd;
kib_data_t kiblnd_data;
@@ -2770,7 +2770,7 @@ net_failed:
return -ENETDOWN;
}
-static lnd_t the_o2iblnd = {
+static struct lnet_lnd the_o2iblnd = {
.lnd_type = O2IBLND,
.lnd_startup = kiblnd_startup,
.lnd_shutdown = kiblnd_shutdown,
diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
index 406c0e7..3cfdc17 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
@@ -43,7 +43,7 @@
#include "socklnd.h"
-static lnd_t the_ksocklnd;
+static struct lnet_lnd the_ksocklnd;
ksock_nal_data_t ksocknal_data;
static ksock_interface_t *
diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c
index f825784..19ad5a3 100644
--- a/drivers/staging/lustre/lnet/lnet/api-ni.c
+++ b/drivers/staging/lustre/lnet/lnet/api-ni.c
@@ -269,15 +269,15 @@ static void lnet_assert_wire_constants(void)
CLASSERT((int)sizeof(((lnet_hdr_t *)0)->msg.hello.type) == 4);
}
-static lnd_t *
+static struct lnet_lnd *
lnet_find_lnd_by_type(__u32 type)
{
- lnd_t *lnd;
+ struct lnet_lnd *lnd;
struct list_head *tmp;
/* holding lnd mutex */
list_for_each(tmp, &the_lnet.ln_lnds) {
- lnd = list_entry(tmp, lnd_t, lnd_list);
+ lnd = list_entry(tmp, struct lnet_lnd, lnd_list);
if (lnd->lnd_type == type)
return lnd;
@@ -287,7 +287,7 @@ lnet_find_lnd_by_type(__u32 type)
}
void
-lnet_register_lnd(lnd_t *lnd)
+lnet_register_lnd(struct lnet_lnd *lnd)
{
mutex_lock(&the_lnet.ln_lnd_mutex);
@@ -304,7 +304,7 @@ lnet_register_lnd(lnd_t *lnd)
EXPORT_SYMBOL(lnet_register_lnd);
void
-lnet_unregister_lnd(lnd_t *lnd)
+lnet_unregister_lnd(struct lnet_lnd *lnd)
{
mutex_lock(&the_lnet.ln_lnd_mutex);
@@ -1220,7 +1220,7 @@ lnet_startup_lndni(struct lnet_ni *ni, __s32 peer_timeout,
{
int rc = -EINVAL;
int lnd_type;
- lnd_t *lnd;
+ struct lnet_lnd *lnd;
struct lnet_tx_queue *tq;
int i;
@@ -1460,7 +1460,7 @@ void lnet_lib_exit(void)
while (!list_empty(&the_lnet.ln_lnds))
lnet_unregister_lnd(list_entry(the_lnet.ln_lnds.next,
- lnd_t, lnd_list));
+ struct lnet_lnd, lnd_list));
lnet_destroy_locks();
}
diff --git a/drivers/staging/lustre/lnet/lnet/lo.c b/drivers/staging/lustre/lnet/lnet/lo.c
index 468eda6..2216301 100644
--- a/drivers/staging/lustre/lnet/lnet/lo.c
+++ b/drivers/staging/lustre/lnet/lnet/lo.c
@@ -105,7 +105,7 @@ lolnd_startup(lnet_ni_t *ni)
return 0;
}
-lnd_t the_lolnd = {
+struct lnet_lnd the_lolnd = {
/* .lnd_list = */ {&the_lolnd.lnd_list, &the_lolnd.lnd_list},
/* .lnd_refcount = */ 0,
/* .lnd_type = */ LOLND,
--
2.8.0.rc4.16.g56331f8
Just use struct lnet_msg instead.
Signed-off-by: Joe Perches <[email protected]>
---
.../staging/lustre/include/linux/lnet/lib-lnet.h | 38 ++++++------
.../staging/lustre/include/linux/lnet/lib-types.h | 10 +--
.../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 6 +-
.../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 8 +--
.../staging/lustre/lnet/klnds/socklnd/socklnd.h | 6 +-
.../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 6 +-
drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +-
drivers/staging/lustre/lnet/lnet/lib-move.c | 72 +++++++++++-----------
drivers/staging/lustre/lnet/lnet/lib-msg.c | 24 ++++----
drivers/staging/lustre/lnet/lnet/lib-ptl.c | 4 +-
drivers/staging/lustre/lnet/lnet/lo.c | 6 +-
11 files changed, 91 insertions(+), 91 deletions(-)
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 2390d94..827afe6 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -248,10 +248,10 @@ lnet_me_free(lnet_me_t *me)
LIBCFS_FREE(me, sizeof(*me));
}
-static inline lnet_msg_t *
+static inline struct lnet_msg *
lnet_msg_alloc(void)
{
- lnet_msg_t *msg;
+ struct lnet_msg *msg;
LIBCFS_ALLOC(msg, sizeof(*msg));
@@ -260,7 +260,7 @@ lnet_msg_alloc(void)
}
static inline void
-lnet_msg_free(lnet_msg_t *msg)
+lnet_msg_free(struct lnet_msg *msg)
{
LASSERT(!msg->msg_onactivelist);
LIBCFS_FREE(msg, sizeof(*msg));
@@ -487,20 +487,20 @@ int lnet_clear_lazy_portal(struct lnet_ni *ni, int portal, char *reason);
int lnet_islocalnid(lnet_nid_t nid);
int lnet_islocalnet(__u32 net);
-void lnet_msg_attach_md(lnet_msg_t *msg, lnet_libmd_t *md,
+void lnet_msg_attach_md(struct lnet_msg *msg, lnet_libmd_t *md,
unsigned int offset, unsigned int mlen);
-void lnet_msg_detach_md(lnet_msg_t *msg, int status);
+void lnet_msg_detach_md(struct lnet_msg *msg, int status);
void lnet_build_unlink_event(lnet_libmd_t *md, lnet_event_t *ev);
-void lnet_build_msg_event(lnet_msg_t *msg, lnet_event_kind_t ev_type);
-void lnet_msg_commit(lnet_msg_t *msg, int cpt);
-void lnet_msg_decommit(lnet_msg_t *msg, int cpt, int status);
+void lnet_build_msg_event(struct lnet_msg *msg, lnet_event_kind_t ev_type);
+void lnet_msg_commit(struct lnet_msg *msg, int cpt);
+void lnet_msg_decommit(struct lnet_msg *msg, int cpt, int status);
void lnet_eq_enqueue_event(lnet_eq_t *eq, lnet_event_t *ev);
-void lnet_prep_send(lnet_msg_t *msg, int type, lnet_process_id_t target,
+void lnet_prep_send(struct lnet_msg *msg, int type, lnet_process_id_t target,
unsigned int offset, unsigned int len);
-int lnet_send(lnet_nid_t nid, lnet_msg_t *msg, lnet_nid_t rtr_nid);
-void lnet_return_tx_credits_locked(lnet_msg_t *msg);
-void lnet_return_rx_credits_locked(lnet_msg_t *msg);
+int lnet_send(lnet_nid_t nid, struct lnet_msg *msg, lnet_nid_t rtr_nid);
+void lnet_return_tx_credits_locked(struct lnet_msg *msg);
+void lnet_return_rx_credits_locked(struct lnet_msg *msg);
void lnet_schedule_blocked_locked(lnet_rtrbufpool_t *rbp);
void lnet_drop_routed_msgs_locked(struct list_head *list, int cpt);
@@ -559,19 +559,19 @@ void lnet_portals_destroy(void);
/* message functions */
int lnet_parse(lnet_ni_t *ni, lnet_hdr_t *hdr,
lnet_nid_t fromnid, void *private, int rdma_req);
-int lnet_parse_local(lnet_ni_t *ni, lnet_msg_t *msg);
-int lnet_parse_forward_locked(lnet_ni_t *ni, lnet_msg_t *msg);
+int lnet_parse_local(lnet_ni_t *ni, struct lnet_msg *msg);
+int lnet_parse_forward_locked(lnet_ni_t *ni, struct lnet_msg *msg);
-void lnet_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed,
+void lnet_recv(lnet_ni_t *ni, void *private, struct lnet_msg *msg, int delayed,
unsigned int offset, unsigned int mlen, unsigned int rlen);
-void lnet_ni_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg,
+void lnet_ni_recv(lnet_ni_t *ni, void *private, struct lnet_msg *msg,
int delayed, unsigned int offset,
unsigned int mlen, unsigned int rlen);
-lnet_msg_t *lnet_create_reply_msg(lnet_ni_t *ni, lnet_msg_t *get_msg);
-void lnet_set_reply_msg_len(lnet_ni_t *ni, lnet_msg_t *msg, unsigned int len);
+struct lnet_msg *lnet_create_reply_msg(lnet_ni_t *ni, struct lnet_msg *get_msg);
+void lnet_set_reply_msg_len(lnet_ni_t *ni, struct lnet_msg *msg, unsigned int len);
-void lnet_finalize(lnet_ni_t *ni, lnet_msg_t *msg, int rc);
+void lnet_finalize(lnet_ni_t *ni, struct lnet_msg *msg, int rc);
void lnet_drop_message(lnet_ni_t *ni, int cpt, void *private,
unsigned int nob);
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h b/drivers/staging/lustre/include/linux/lnet/lib-types.h
index 62baaca..33729f2 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-types.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-types.h
@@ -53,7 +53,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 */
@@ -105,7 +105,7 @@ typedef struct lnet_msg {
lnet_event_t msg_ev;
lnet_hdr_t msg_hdr;
-} lnet_msg_t;
+};
typedef struct lnet_libhandle {
struct list_head lh_hash_chain;
@@ -209,7 +209,7 @@ struct lnet_lnd {
* non-zero for immediate failure, otherwise complete later with
* lnet_finalize()
*/
- int (*lnd_send)(struct lnet_ni *ni, void *private, lnet_msg_t *msg);
+ int (*lnd_send)(struct lnet_ni *ni, void *private, struct lnet_msg *msg);
/*
* Start receiving 'mlen' bytes of payload data, skipping the following
@@ -218,7 +218,7 @@ struct lnet_lnd {
* complete later with lnet_finalize(). This also gives back a receive
* credit if the LND does flow control.
*/
- int (*lnd_recv)(struct lnet_ni *ni, void *private, lnet_msg_t *msg,
+ int (*lnd_recv)(struct lnet_ni *ni, void *private, struct lnet_msg *msg,
int delayed, unsigned int niov,
struct kvec *iov, lnet_kiov_t *kiov,
unsigned int offset, unsigned int mlen,
@@ -233,7 +233,7 @@ struct lnet_lnd {
* release resources; lnd_recv() will not be called.
*/
int (*lnd_eager_recv)(struct lnet_ni *ni, void *private,
- lnet_msg_t *msg, void **new_privatep);
+ struct lnet_msg *msg, void **new_privatep);
/* notification of peer health */
void (*lnd_notify)(struct lnet_ni *ni, lnet_nid_t peer, int alive);
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
index bfcbdd1..988b727 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
@@ -509,7 +509,7 @@ typedef struct kib_tx /* transmit message */
int tx_status; /* LNET completion status */
unsigned long tx_deadline; /* completion deadline */
__u64 tx_cookie; /* completion cookie */
- lnet_msg_t *tx_lntmsg[2]; /* lnet msgs to finalize on completion */
+ struct lnet_msg *tx_lntmsg[2]; /* lnet msgs to finalize on completion */
kib_msg_t *tx_msg; /* message buffer (host vaddr) */
__u64 tx_msgaddr; /* message buffer (I/O addr) */
DECLARE_PCI_UNMAP_ADDR(tx_msgunmap); /* for dma_unmap_single() */
@@ -1003,7 +1003,7 @@ void kiblnd_pack_msg(lnet_ni_t *ni, kib_msg_t *msg, int version,
int kiblnd_unpack_msg(kib_msg_t *msg, int nob);
int kiblnd_post_rx(kib_rx_t *rx, int credit);
-int kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg);
-int kiblnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed,
+int kiblnd_send(lnet_ni_t *ni, void *private, struct lnet_msg *lntmsg);
+int kiblnd_recv(lnet_ni_t *ni, void *private, struct lnet_msg *lntmsg, int delayed,
unsigned int niov, struct kvec *iov, lnet_kiov_t *kiov,
unsigned int offset, unsigned int mlen, unsigned int rlen);
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
index cd3fde7..6f00bba 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
@@ -54,7 +54,7 @@ static void kiblnd_unmap_tx(lnet_ni_t *ni, kib_tx_t *tx);
static void
kiblnd_tx_done(lnet_ni_t *ni, kib_tx_t *tx)
{
- lnet_msg_t *lntmsg[2];
+ struct lnet_msg *lntmsg[2];
kib_net_t *net = ni->ni_data;
int rc;
int i;
@@ -1486,7 +1486,7 @@ kiblnd_launch_tx(lnet_ni_t *ni, kib_tx_t *tx, lnet_nid_t nid)
}
int
-kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg)
+kiblnd_send(lnet_ni_t *ni, void *private, struct lnet_msg *lntmsg)
{
lnet_hdr_t *hdr = &lntmsg->msg_hdr;
int type = lntmsg->msg_type;
@@ -1656,7 +1656,7 @@ kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg)
}
static void
-kiblnd_reply(lnet_ni_t *ni, kib_rx_t *rx, lnet_msg_t *lntmsg)
+kiblnd_reply(lnet_ni_t *ni, kib_rx_t *rx, struct lnet_msg *lntmsg)
{
lnet_process_id_t target = lntmsg->msg_target;
unsigned int niov = lntmsg->msg_niov;
@@ -1717,7 +1717,7 @@ kiblnd_reply(lnet_ni_t *ni, kib_rx_t *rx, lnet_msg_t *lntmsg)
}
int
-kiblnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed,
+kiblnd_recv(lnet_ni_t *ni, void *private, struct lnet_msg *lntmsg, int delayed,
unsigned int niov, struct kvec *iov, lnet_kiov_t *kiov,
unsigned int offset, unsigned int mlen, unsigned int rlen)
{
diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
index a60d72f..13dc69e 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
@@ -267,7 +267,7 @@ typedef struct /* transmit packet */
unsigned short tx_nonblk:1; /* it's a non-blocking ACK */
lnet_kiov_t *tx_kiov; /* packet page frags */
struct ksock_conn *tx_conn; /* owning conn */
- lnet_msg_t *tx_lnetmsg; /* lnet message for lnet_finalize()
+ struct lnet_msg *tx_lnetmsg; /* lnet message for lnet_finalize()
*/
unsigned long tx_deadline; /* when (in jiffies) tx times out */
ksock_msg_t tx_msg; /* socklnd message buffer */
@@ -617,8 +617,8 @@ ksocknal_peer_decref(ksock_peer_t *peer)
int ksocknal_startup(lnet_ni_t *ni);
void ksocknal_shutdown(lnet_ni_t *ni);
int ksocknal_ctl(lnet_ni_t *ni, unsigned int cmd, void *arg);
-int ksocknal_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg);
-int ksocknal_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg,
+int ksocknal_send(lnet_ni_t *ni, void *private, struct lnet_msg *lntmsg);
+int ksocknal_recv(lnet_ni_t *ni, void *private, struct lnet_msg *lntmsg,
int delayed, unsigned int niov,
struct kvec *iov, lnet_kiov_t *kiov,
unsigned int offset, unsigned int mlen, unsigned int rlen);
diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
index 976fd78..228146c 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
@@ -393,7 +393,7 @@ ksocknal_receive(ksock_conn_t *conn)
void
ksocknal_tx_done(lnet_ni_t *ni, ksock_tx_t *tx)
{
- lnet_msg_t *lnetmsg = tx->tx_lnetmsg;
+ struct lnet_msg *lnetmsg = tx->tx_lnetmsg;
int rc = (!tx->tx_resid && !tx->tx_zc_aborted) ? 0 : -EIO;
LASSERT(ni || tx->tx_conn);
@@ -932,7 +932,7 @@ ksocknal_launch_packet(lnet_ni_t *ni, ksock_tx_t *tx, lnet_process_id_t id)
}
int
-ksocknal_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg)
+ksocknal_send(lnet_ni_t *ni, void *private, struct lnet_msg *lntmsg)
{
int mpflag = 1;
int type = lntmsg->msg_type;
@@ -1324,7 +1324,7 @@ ksocknal_process_receive(ksock_conn_t *conn)
}
int
-ksocknal_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed,
+ksocknal_recv(lnet_ni_t *ni, void *private, struct lnet_msg *msg, int delayed,
unsigned int niov, struct kvec *iov, lnet_kiov_t *kiov,
unsigned int offset, unsigned int mlen, unsigned int rlen)
{
diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c
index 19ad5a3..a5104b1 100644
--- a/drivers/staging/lustre/lnet/lnet/api-ni.c
+++ b/drivers/staging/lustre/lnet/lnet/api-ni.c
@@ -1174,7 +1174,7 @@ lnet_shutdown_lndnis(void)
/*
* Clear lazy portals and drop delayed messages which hold refs
- * on their lnet_msg_t::msg_rxpeer
+ * on their struct lnet_msg::msg_rxpeer
*/
for (i = 0; i < the_lnet.ln_nportals; i++)
LNetClearLazyPortal(i);
diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c b/drivers/staging/lustre/lnet/lnet/lib-move.c
index 4ebf1b4..d9389a9 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -567,7 +567,7 @@ lnet_extract_kiov(int dst_niov, lnet_kiov_t *dst,
EXPORT_SYMBOL(lnet_extract_kiov);
void
-lnet_ni_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed,
+lnet_ni_recv(lnet_ni_t *ni, void *private, struct lnet_msg *msg, int delayed,
unsigned int offset, unsigned int mlen, unsigned int rlen)
{
unsigned int niov = 0;
@@ -605,7 +605,7 @@ lnet_ni_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed,
}
static void
-lnet_setpayloadbuffer(lnet_msg_t *msg)
+lnet_setpayloadbuffer(struct lnet_msg *msg)
{
lnet_libmd_t *md = msg->msg_md;
@@ -624,7 +624,7 @@ lnet_setpayloadbuffer(lnet_msg_t *msg)
}
void
-lnet_prep_send(lnet_msg_t *msg, int type, lnet_process_id_t target,
+lnet_prep_send(struct lnet_msg *msg, int type, lnet_process_id_t target,
unsigned int offset, unsigned int len)
{
msg->msg_type = type;
@@ -645,7 +645,7 @@ lnet_prep_send(lnet_msg_t *msg, int type, lnet_process_id_t target,
}
static void
-lnet_ni_send(lnet_ni_t *ni, lnet_msg_t *msg)
+lnet_ni_send(lnet_ni_t *ni, struct lnet_msg *msg)
{
void *priv = msg->msg_private;
int rc;
@@ -660,7 +660,7 @@ lnet_ni_send(lnet_ni_t *ni, lnet_msg_t *msg)
}
static int
-lnet_ni_eager_recv(lnet_ni_t *ni, lnet_msg_t *msg)
+lnet_ni_eager_recv(lnet_ni_t *ni, struct lnet_msg *msg)
{
int rc;
@@ -791,7 +791,7 @@ lnet_peer_alive_locked(struct lnet_peer *lp)
* \retval -ECANCELED If the MD of the message has been unlinked.
*/
static int
-lnet_post_send_locked(lnet_msg_t *msg, int do_send)
+lnet_post_send_locked(struct lnet_msg *msg, int do_send)
{
struct lnet_peer *lp = msg->msg_txpeer;
lnet_ni_t *ni = lp->lp_ni;
@@ -876,7 +876,7 @@ lnet_post_send_locked(lnet_msg_t *msg, int do_send)
}
static lnet_rtrbufpool_t *
-lnet_msg2bufpool(lnet_msg_t *msg)
+lnet_msg2bufpool(struct lnet_msg *msg)
{
lnet_rtrbufpool_t *rbp;
int cpt;
@@ -896,7 +896,7 @@ lnet_msg2bufpool(lnet_msg_t *msg)
}
static int
-lnet_post_routed_recv_locked(lnet_msg_t *msg, int do_recv)
+lnet_post_routed_recv_locked(struct lnet_msg *msg, int do_recv)
{
/*
* lnet_parse is going to lnet_net_unlock immediately after this, so it
@@ -972,10 +972,10 @@ lnet_post_routed_recv_locked(lnet_msg_t *msg, int do_recv)
}
void
-lnet_return_tx_credits_locked(lnet_msg_t *msg)
+lnet_return_tx_credits_locked(struct lnet_msg *msg)
{
struct lnet_peer *txpeer = msg->msg_txpeer;
- lnet_msg_t *msg2;
+ struct lnet_msg *msg2;
if (msg->msg_txcredit) {
struct lnet_ni *ni = txpeer->lp_ni;
@@ -990,7 +990,7 @@ lnet_return_tx_credits_locked(lnet_msg_t *msg)
tq->tq_credits++;
if (tq->tq_credits <= 0) {
msg2 = list_entry(tq->tq_delayed.next,
- lnet_msg_t, msg_list);
+ struct lnet_msg, msg_list);
list_del(&msg2->msg_list);
LASSERT(msg2->msg_txpeer->lp_ni == ni);
@@ -1013,7 +1013,7 @@ lnet_return_tx_credits_locked(lnet_msg_t *msg)
txpeer->lp_txcredits++;
if (txpeer->lp_txcredits <= 0) {
msg2 = list_entry(txpeer->lp_txq.next,
- lnet_msg_t, msg_list);
+ struct lnet_msg, msg_list);
list_del(&msg2->msg_list);
LASSERT(msg2->msg_txpeer == txpeer);
@@ -1032,12 +1032,12 @@ lnet_return_tx_credits_locked(lnet_msg_t *msg)
void
lnet_schedule_blocked_locked(lnet_rtrbufpool_t *rbp)
{
- lnet_msg_t *msg;
+ struct lnet_msg *msg;
if (list_empty(&rbp->rbp_msgs))
return;
msg = list_entry(rbp->rbp_msgs.next,
- lnet_msg_t, msg_list);
+ struct lnet_msg, msg_list);
list_del(&msg->msg_list);
(void)lnet_post_routed_recv_locked(msg, 1);
@@ -1047,8 +1047,8 @@ void
lnet_drop_routed_msgs_locked(struct list_head *list, int cpt)
{
struct list_head drop;
- lnet_msg_t *msg;
- lnet_msg_t *tmp;
+ struct lnet_msg *msg;
+ struct lnet_msg *tmp;
INIT_LIST_HEAD(&drop);
@@ -1067,10 +1067,10 @@ lnet_drop_routed_msgs_locked(struct list_head *list, int cpt)
}
void
-lnet_return_rx_credits_locked(lnet_msg_t *msg)
+lnet_return_rx_credits_locked(struct lnet_msg *msg)
{
struct lnet_peer *rxpeer = msg->msg_rxpeer;
- lnet_msg_t *msg2;
+ struct lnet_msg *msg2;
if (msg->msg_rtrcredit) {
/* give back global router credits */
@@ -1139,7 +1139,7 @@ routing_off:
msg->msg_rx_cpt);
} else if (rxpeer->lp_rtrcredits <= 0) {
msg2 = list_entry(rxpeer->lp_rtrq.next,
- lnet_msg_t, msg_list);
+ struct lnet_msg, msg_list);
list_del(&msg2->msg_list);
(void)lnet_post_routed_recv_locked(msg2, 1);
@@ -1253,7 +1253,7 @@ lnet_find_route_locked(lnet_ni_t *ni, lnet_nid_t target, lnet_nid_t rtr_nid)
}
int
-lnet_send(lnet_nid_t src_nid, lnet_msg_t *msg, lnet_nid_t rtr_nid)
+lnet_send(lnet_nid_t src_nid, struct lnet_msg *msg, lnet_nid_t rtr_nid)
{
lnet_nid_t dst_nid = msg->msg_target.nid;
struct lnet_ni *src_ni;
@@ -1439,7 +1439,7 @@ lnet_drop_message(lnet_ni_t *ni, int cpt, void *private, unsigned int nob)
}
static void
-lnet_recv_put(lnet_ni_t *ni, lnet_msg_t *msg)
+lnet_recv_put(lnet_ni_t *ni, struct lnet_msg *msg)
{
lnet_hdr_t *hdr = &msg->msg_hdr;
@@ -1460,7 +1460,7 @@ lnet_recv_put(lnet_ni_t *ni, lnet_msg_t *msg)
}
static int
-lnet_parse_put(lnet_ni_t *ni, lnet_msg_t *msg)
+lnet_parse_put(lnet_ni_t *ni, struct lnet_msg *msg)
{
lnet_hdr_t *hdr = &msg->msg_hdr;
struct lnet_match_info info;
@@ -1518,7 +1518,7 @@ lnet_parse_put(lnet_ni_t *ni, lnet_msg_t *msg)
}
static int
-lnet_parse_get(lnet_ni_t *ni, lnet_msg_t *msg, int rdma_get)
+lnet_parse_get(lnet_ni_t *ni, struct lnet_msg *msg, int rdma_get)
{
struct lnet_match_info info;
lnet_hdr_t *hdr = &msg->msg_hdr;
@@ -1582,7 +1582,7 @@ lnet_parse_get(lnet_ni_t *ni, lnet_msg_t *msg, int rdma_get)
}
static int
-lnet_parse_reply(lnet_ni_t *ni, lnet_msg_t *msg)
+lnet_parse_reply(lnet_ni_t *ni, struct lnet_msg *msg)
{
void *private = msg->msg_private;
lnet_hdr_t *hdr = &msg->msg_hdr;
@@ -1647,7 +1647,7 @@ lnet_parse_reply(lnet_ni_t *ni, lnet_msg_t *msg)
}
static int
-lnet_parse_ack(lnet_ni_t *ni, lnet_msg_t *msg)
+lnet_parse_ack(lnet_ni_t *ni, struct lnet_msg *msg)
{
lnet_hdr_t *hdr = &msg->msg_hdr;
lnet_process_id_t src = {0};
@@ -1702,7 +1702,7 @@ lnet_parse_ack(lnet_ni_t *ni, lnet_msg_t *msg)
* \retval -ve error code
*/
int
-lnet_parse_forward_locked(lnet_ni_t *ni, lnet_msg_t *msg)
+lnet_parse_forward_locked(lnet_ni_t *ni, struct lnet_msg *msg)
{
int rc = 0;
@@ -1726,7 +1726,7 @@ lnet_parse_forward_locked(lnet_ni_t *ni, lnet_msg_t *msg)
}
int
-lnet_parse_local(lnet_ni_t *ni, lnet_msg_t *msg)
+lnet_parse_local(lnet_ni_t *ni, struct lnet_msg *msg)
{
int rc;
@@ -2067,9 +2067,9 @@ lnet_drop_delayed_msg_list(struct list_head *head, char *reason)
{
while (!list_empty(head)) {
lnet_process_id_t id = {0};
- lnet_msg_t *msg;
+ struct lnet_msg *msg;
- msg = list_entry(head->next, lnet_msg_t, msg_list);
+ msg = list_entry(head->next, struct lnet_msg, msg_list);
list_del(&msg->msg_list);
id.nid = msg->msg_hdr.src_nid;
@@ -2108,10 +2108,10 @@ void
lnet_recv_delayed_msg_list(struct list_head *head)
{
while (!list_empty(head)) {
- lnet_msg_t *msg;
+ struct lnet_msg *msg;
lnet_process_id_t id;
- msg = list_entry(head->next, lnet_msg_t, msg_list);
+ msg = list_entry(head->next, struct lnet_msg, msg_list);
list_del(&msg->msg_list);
/*
@@ -2202,7 +2202,7 @@ LNetPut(lnet_nid_t self, lnet_handle_md_t mdh, lnet_ack_req_t ack,
msg = lnet_msg_alloc();
if (!msg) {
- CERROR("Dropping PUT to %s: ENOMEM on lnet_msg_t\n",
+ CERROR("Dropping PUT to %s: ENOMEM on struct lnet_msg\n",
libcfs_id2str(target));
return -ENOMEM;
}
@@ -2265,8 +2265,8 @@ LNetPut(lnet_nid_t self, lnet_handle_md_t mdh, lnet_ack_req_t ack,
}
EXPORT_SYMBOL(LNetPut);
-lnet_msg_t *
-lnet_create_reply_msg(lnet_ni_t *ni, lnet_msg_t *getmsg)
+struct lnet_msg *
+lnet_create_reply_msg(lnet_ni_t *ni, struct lnet_msg *getmsg)
{
/*
* The LND can DMA direct to the GET md (i.e. no REPLY msg). This
@@ -2344,7 +2344,7 @@ lnet_create_reply_msg(lnet_ni_t *ni, lnet_msg_t *getmsg)
EXPORT_SYMBOL(lnet_create_reply_msg);
void
-lnet_set_reply_msg_len(lnet_ni_t *ni, lnet_msg_t *reply, unsigned int len)
+lnet_set_reply_msg_len(lnet_ni_t *ni, struct lnet_msg *reply, unsigned int len)
{
/*
* Set the REPLY length, now the RDMA that elides the REPLY message has
@@ -2406,7 +2406,7 @@ LNetGet(lnet_nid_t self, lnet_handle_md_t mdh,
msg = lnet_msg_alloc();
if (!msg) {
- CERROR("Dropping GET to %s: ENOMEM on lnet_msg_t\n",
+ CERROR("Dropping GET to %s: ENOMEM on struct lnet_msg\n",
libcfs_id2str(target));
return -ENOMEM;
}
diff --git a/drivers/staging/lustre/lnet/lnet/lib-msg.c b/drivers/staging/lustre/lnet/lnet/lib-msg.c
index f879d7f..fd31267 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-msg.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-msg.c
@@ -58,7 +58,7 @@ lnet_build_unlink_event(lnet_libmd_t *md, lnet_event_t *ev)
* Don't need any lock, must be called after lnet_commit_md
*/
void
-lnet_build_msg_event(lnet_msg_t *msg, lnet_event_kind_t ev_type)
+lnet_build_msg_event(struct lnet_msg *msg, lnet_event_kind_t ev_type)
{
lnet_hdr_t *hdr = &msg->msg_hdr;
lnet_event_t *ev = &msg->msg_ev;
@@ -133,7 +133,7 @@ lnet_build_msg_event(lnet_msg_t *msg, lnet_event_kind_t ev_type)
}
void
-lnet_msg_commit(lnet_msg_t *msg, int cpt)
+lnet_msg_commit(struct lnet_msg *msg, int cpt)
{
struct lnet_msg_container *container = the_lnet.ln_msg_containers[cpt];
lnet_counters_t *counters = the_lnet.ln_counters[cpt];
@@ -166,7 +166,7 @@ lnet_msg_commit(lnet_msg_t *msg, int cpt)
}
static void
-lnet_msg_decommit_tx(lnet_msg_t *msg, int status)
+lnet_msg_decommit_tx(struct lnet_msg *msg, int status)
{
lnet_counters_t *counters;
lnet_event_t *ev = &msg->msg_ev;
@@ -218,7 +218,7 @@ lnet_msg_decommit_tx(lnet_msg_t *msg, int status)
}
static void
-lnet_msg_decommit_rx(lnet_msg_t *msg, int status)
+lnet_msg_decommit_rx(struct lnet_msg *msg, int status)
{
lnet_counters_t *counters;
lnet_event_t *ev = &msg->msg_ev;
@@ -276,7 +276,7 @@ lnet_msg_decommit_rx(lnet_msg_t *msg, int status)
}
void
-lnet_msg_decommit(lnet_msg_t *msg, int cpt, int status)
+lnet_msg_decommit(struct lnet_msg *msg, int cpt, int status)
{
int cpt2 = cpt;
@@ -310,7 +310,7 @@ lnet_msg_decommit(lnet_msg_t *msg, int cpt, int status)
}
void
-lnet_msg_attach_md(lnet_msg_t *msg, lnet_libmd_t *md,
+lnet_msg_attach_md(struct lnet_msg *msg, lnet_libmd_t *md,
unsigned int offset, unsigned int mlen)
{
/* NB: @offset and @len are only useful for receiving */
@@ -340,7 +340,7 @@ lnet_msg_attach_md(lnet_msg_t *msg, lnet_libmd_t *md,
}
void
-lnet_msg_detach_md(lnet_msg_t *msg, int status)
+lnet_msg_detach_md(struct lnet_msg *msg, int status)
{
lnet_libmd_t *md = msg->msg_md;
int unlink;
@@ -363,7 +363,7 @@ lnet_msg_detach_md(lnet_msg_t *msg, int status)
}
static int
-lnet_complete_msg_locked(lnet_msg_t *msg, int cpt)
+lnet_complete_msg_locked(struct lnet_msg *msg, int cpt)
{
lnet_handle_wire_t ack_wmd;
int rc;
@@ -441,7 +441,7 @@ lnet_complete_msg_locked(lnet_msg_t *msg, int cpt)
}
void
-lnet_finalize(lnet_ni_t *ni, lnet_msg_t *msg, int status)
+lnet_finalize(lnet_ni_t *ni, struct lnet_msg *msg, int status)
{
struct lnet_msg_container *container;
int my_slot;
@@ -522,7 +522,7 @@ lnet_finalize(lnet_ni_t *ni, lnet_msg_t *msg, int status)
while (!list_empty(&container->msc_finalizing)) {
msg = list_entry(container->msc_finalizing.next,
- lnet_msg_t, msg_list);
+ struct lnet_msg, msg_list);
list_del(&msg->msg_list);
@@ -558,8 +558,8 @@ lnet_msg_container_cleanup(struct lnet_msg_container *container)
return;
while (!list_empty(&container->msc_active)) {
- lnet_msg_t *msg = list_entry(container->msc_active.next,
- lnet_msg_t, msg_activelist);
+ struct lnet_msg *msg = list_entry(container->msc_active.next,
+ struct lnet_msg, msg_activelist);
LASSERT(msg->msg_onactivelist);
msg->msg_onactivelist = 0;
diff --git a/drivers/staging/lustre/lnet/lnet/lib-ptl.c b/drivers/staging/lustre/lnet/lnet/lib-ptl.c
index 3947e8b..bfec6c4 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-ptl.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-ptl.c
@@ -657,8 +657,8 @@ lnet_ptl_attach_md(lnet_me_t *me, lnet_libmd_t *md,
struct lnet_portal *ptl = the_lnet.ln_portals[me->me_portal];
struct lnet_match_table *mtable;
struct list_head *head;
- lnet_msg_t *tmp;
- lnet_msg_t *msg;
+ struct lnet_msg *tmp;
+ struct lnet_msg *msg;
int exhausted = 0;
int cpt;
diff --git a/drivers/staging/lustre/lnet/lnet/lo.c b/drivers/staging/lustre/lnet/lnet/lo.c
index 2216301..80c2101 100644
--- a/drivers/staging/lustre/lnet/lnet/lo.c
+++ b/drivers/staging/lustre/lnet/lnet/lo.c
@@ -36,7 +36,7 @@
#include "../../include/linux/lnet/lib-lnet.h"
static int
-lolnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg)
+lolnd_send(lnet_ni_t *ni, void *private, struct lnet_msg *lntmsg)
{
LASSERT(!lntmsg->msg_routing);
LASSERT(!lntmsg->msg_target_is_router);
@@ -45,12 +45,12 @@ lolnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg)
}
static int
-lolnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg,
+lolnd_recv(lnet_ni_t *ni, void *private, struct lnet_msg *lntmsg,
int delayed, unsigned int niov,
struct kvec *iov, lnet_kiov_t *kiov,
unsigned int offset, unsigned int mlen, unsigned int rlen)
{
- lnet_msg_t *sendmsg = private;
+ struct lnet_msg *sendmsg = private;
if (lntmsg) { /* not discarding */
if (sendmsg->msg_iov) {
--
2.8.0.rc4.16.g56331f8
On Apr 1, 2016, at 9:02 AM, Joe Perches wrote:
> Question about removing lustre typedefs.
>
> Various bits of lustre code use a mix of struct foo and foo_t.
>
> When would be an appropriate time to submit patches similar to
> below that individually remove various typedefs from lustre code?
I think now is as good time as any.
the only small correction is those are LNet typedefs.
While LNet is technically part of Lustre, it's a bit of a separate
thing useful without Lustre too.
I know James is working on cleaning up LNet, but I don't know if he has
anything this would be conflicting at this moment or not.
Thanks for the patches. I wonder if you are generating them automatically?
Because it would be great if it also fixes the alignment issues
due to longer definitions, like:
--- a/drivers/staging/lustre/lnet/lnet/router_proc.c
+++ b/drivers/staging/lustre/lnet/lnet/router_proc.c
@@ -307,7 +307,7 @@ static int proc_lnet_routers(struct ctl_table *table, int write,
r = the_lnet.ln_routers.next;
while (r != &the_lnet.ln_routers) {
- lnet_peer_t *lp = list_entry(r, lnet_peer_t,
+ struct lnet_peer *lp = list_entry(r, struct lnet_peer,
lp_rtr_list);
that would need a separate patch to fix later.
>
> These are pretty trivial to produce and verify so there's no
> particular hurry to do them now but applying them will require
> resync points for active and actually useful developers.
>
> A few scripted examples are done:
>
> Joe Perches (3):
> staging: lustre: Remove typedef lnet_peer_t
> staging: lustre: Remove typedef lnd_t
> staging: lustre: Remove typedef lnet_msg_t
>
> .../staging/lustre/include/linux/lnet/lib-lnet.h | 62 +++++++--------
> .../staging/lustre/include/linux/lnet/lib-types.h | 22 +++---
> .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 4 +-
> .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 6 +-
> .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 8 +-
> .../staging/lustre/lnet/klnds/socklnd/socklnd.c | 2 +-
> .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 6 +-
> .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 6 +-
> drivers/staging/lustre/lnet/lnet/api-ni.c | 16 ++--
> drivers/staging/lustre/lnet/lnet/lib-move.c | 92 +++++++++++-----------
> drivers/staging/lustre/lnet/lnet/lib-msg.c | 24 +++---
> drivers/staging/lustre/lnet/lnet/lib-ptl.c | 4 +-
> drivers/staging/lustre/lnet/lnet/lo.c | 8 +-
> drivers/staging/lustre/lnet/lnet/peer.c | 30 +++----
> drivers/staging/lustre/lnet/lnet/router.c | 28 +++----
> drivers/staging/lustre/lnet/lnet/router_proc.c | 4 +-
> 16 files changed, 161 insertions(+), 161 deletions(-)
>
> --
> 2.8.0.rc4.16.g56331f8
>
> _______________________________________________
> lustre-devel mailing list
> [email protected]
> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
>Question about removing lustre typedefs.
>
>Various bits of lustre code use a mix of struct foo and foo_t.
>
>When would be an appropriate time to submit patches similar to
>below that individually remove various typedefs from lustre code?
>
>These are pretty trivial to produce and verify so there's no
>particular hurry to do them now but applying them will require
>resync points for active and actually useful developers.
Actually could you hold off for the LNet core and LND drivers these
changes. I have plans to push a few more LNet patches soon. I have
been just waiting for everyone to figure out how to deal with the
latest changes to the infinband layer first. So the plan is to push
FMR support for the ko2iblnd driver. Also we have additional work
too handle setting the size of the DMA pools for o2iblnd but that
patch touches some of the core LNet code as well. Once those are
landed we can look at removing most of the typedefs. When its
time for the typedef to be cleaned up lets do just the structs first.
There are a few typedefs like lnet_nid_t I like to keep or if it has to
be changed turn it into a struct then. Things like lnet_nid_t act like
a cookie handle.
Now the best place to do this cleanup right now is LNet selftest. No
new code is planned for landing. We have lots of typedefs to remove
and I was planning to do that cleanup but if you want to do it just CC
me, [email protected], so I can test the changes.
On Fri, 2016-04-01 at 14:23 +0000, Drokin, Oleg wrote:
> On Apr 1, 2016, at 9:02 AM, Joe Perches wrote:
> >
> > Question about removing lustre typedefs.
> >
> > Various bits of lustre code use a mix of struct foo and foo_t.
> >
> > When would be an appropriate time to submit patches similar to
> > below that individually remove various typedefs from lustre code?
> I think now is as good time as any.
> the only small correction is those are LNet typedefs.
> While LNet is technically part of Lustre, it's a bit of a separate
> thing useful without Lustre too.
>
> I know James is working on cleaning up LNet, but I don't know if he has
> anything this would be conflicting at this moment or not.
>
> Thanks for the patches. I wonder if you are generating them automatically?
> Because it would be great if it also fixes the alignment issues
It's pretty automatic.
It's a trivial variant of the detypedef perl script I wrote awhile ago:
http://permalink.gmane.org/gmane.linux.drivers.driver-project.devel/18603
I think changing the alignment issues is better done in a
separate patch.
James isn't cc'd on these patches as he's not a listed
maintainer. ?Maybe he should be added for all of it or
some part of it?
I don't know what email address James prefers as there
are several in git log for him.
James Simmons <[email protected]>
James Simmons <[email protected]>
James Simmons <[email protected]>
"Simmons, James A." <[email protected]>
but maybe something like this:
---
?MAINTAINERS | 1 +
?1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 16ccda4..d585631 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10578,6 +10578,7 @@ F: drivers/staging/media/lirc/
?STAGING - LUSTRE PARALLEL FILESYSTEM
?M: Oleg Drokin <[email protected]>
?M: Andreas Dilger <[email protected]>
+R: James Simmons <[email protected]>
?L: [email protected] (moderated for non-subscribers)
?W: http://wiki.lustre.org/
?S: Maintained
On Fri, 2016-04-01 at 15:58 +0000, Simmons, James A. wrote:
> > When would be an appropriate time to submit patches similar to
> > below that individually remove various typedefs from lustre code?
> >
> > These are pretty trivial to produce and verify so there's no
> > particular hurry to do them now but applying them will require
> > resync points for active and actually useful developers.
> Actually could you hold off for the LNet core and LND drivers these
> changes. I have plans to push a few more LNet patches soon. I have
> been just waiting for everyone to figure out how to deal with the?
> latest changes to the infinband layer first.
Sure. ?No worries.
> There are a few typedefs like lnet_nid_t I like to keep or if it has to
> be changed turn it into a struct then. Things like lnet_nid_t act like
> a cookie handle.
Fine by me.
On Apr 1, 2016, at 2:44 PM, Joe Perches wrote:
> On Fri, 2016-04-01 at 14:23 +0000, Drokin, Oleg wrote:
>> On Apr 1, 2016, at 9:02 AM, Joe Perches wrote:
>>>
>>> Question about removing lustre typedefs.
>>>
>>> Various bits of lustre code use a mix of struct foo and foo_t.
>>>
>>> When would be an appropriate time to submit patches similar to
>>> below that individually remove various typedefs from lustre code?
>> I think now is as good time as any.
>> the only small correction is those are LNet typedefs.
>> While LNet is technically part of Lustre, it's a bit of a separate
>> thing useful without Lustre too.
>>
>> I know James is working on cleaning up LNet, but I don't know if he has
>> anything this would be conflicting at this moment or not.
>>
>> Thanks for the patches. I wonder if you are generating them automatically?
>> Because it would be great if it also fixes the alignment issues
>
> It's pretty automatic.
>
> It's a trivial variant of the detypedef perl script I wrote awhile ago:
> http://permalink.gmane.org/gmane.linux.drivers.driver-project.devel/18603
>
>
> I think changing the alignment issues is better done in a
> separate patch.
but then it's two patches per change in a way. fixing one thing breaking
the other warning-wise, that's why I typically try to make such cleanup
patches not to introduce any new warnings.
>
> James isn't cc'd on these patches as he's not a listed
> maintainer. Maybe he should be added for all of it or
> some part of it?
>
for drivers/staging/lustre/lnet
for the drivers/staging/lustre/lustre - the only remaining
few typedefs I am going to address, it's just some of the code using
them will go away or change the users significantly - that's why
they were left out in the first round of lustre detypedefisation.
Thanks.
On Fri, 2016-04-01 at 19:14 +0000, Drokin, Oleg wrote:
> On Apr 1, 2016, at 2:44 PM, Joe Perches wrote:
> > On Fri, 2016-04-01 at 14:23 +0000, Drokin, Oleg wrote:
> > > On Apr 1, 2016, at 9:02 AM, Joe Perches wrote:
> > > > Question about removing lustre typedefs.
> > > >
> > > > Various bits of lustre code use a mix of struct foo and foo_t.
> > > >
> > > > When would be an appropriate time to submit patches similar to
> > > > below that individually remove various typedefs from lustre code?
> > > I think now is as good time as any.
> > > the only small correction is those are LNet typedefs.
> > > While LNet is technically part of Lustre, it's a bit of a separate
> > > thing useful without Lustre too.
> > >
> > > I know James is working on cleaning up LNet, but I don't know if he has
> > > anything this would be conflicting at this moment or not.
> > >
> > > Thanks for the patches. I wonder if you are generating them automatically?
> > > Because it would be great if it also fixes the alignment issues
> > It's pretty automatic.
> >
> > It's a trivial variant of the detypedef perl script I wrote awhile ago:
> > http://permalink.gmane.org/gmane.linux.drivers.driver-project.devel/18603
> >
> > I think changing the alignment issues is better done in a
> > separate patch.
> but then it's two patches per change in a way. fixing one thing breaking
> the other warning-wise, that's why I typically try to make such cleanup
> patches not to introduce any new warnings.
detypedef frequently introduces > 80 column lines.
It's much easier to verify this way without introducing changes
like rewrapping to 80 column.
> > I know James is working on cleaning up LNet, but I don't know if he has
> > anything this would be conflicting at this moment or not.
> >
> > Thanks for the patches. I wonder if you are generating them automatically?
> > Because it would be great if it also fixes the alignment issues
>
> It's pretty automatic.
>
> It's a trivial variant of the detypedef perl script I wrote awhile ago:
> http://permalink.gmane.org/gmane.linux.drivers.driver-project.devel/18603
>
>
> I think changing the alignment issues is better done in a
> separate patch.
>
> James isn't cc'd on these patches as he's not a listed
> maintainer. ?Maybe he should be added for all of it or
> some part of it?
Yes please add me to the maintainer list. Currently the work is divided
between Oleg and I. I also actively test this client to find any
regressions. I have been working on the LNet, libcfs cleanups and bug
fixes. Any libcfs/LNet changes please send my way.
Also now that LNet is close to being synced with our production code it
means I have free cycles to find all the earlier dropped patches in
the Lustre code. We have gaps in various places where patches were
dropped. So I will be working on pushing those patches as well. Oleg
still is the main person for the Lustre core client code.
> I don't know what email address James prefers as there
> are several in git log for him.
>
> James Simmons <[email protected]>
> James Simmons <[email protected]>
> James Simmons <[email protected]>
> "Simmons, James A." <[email protected]>
The infradead.org account is the main one. The ornl.gov is my day job
account. The yahoo and gmail accounts are used, for openid, to push
patches to the OpenSFS Lustre branch which is why you see those Signed-Off
with various patch ports.
> but maybe something like this:
> ---
> ?MAINTAINERS | 1 +
> ?1 file changed, 1 insertion(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 16ccda4..d585631 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -10578,6 +10578,7 @@ F: drivers/staging/media/lirc/
> ?STAGING - LUSTRE PARALLEL FILESYSTEM
> ?M: Oleg Drokin <[email protected]>
> ?M: Andreas Dilger <[email protected]>
> +R: James Simmons <[email protected]>
> ?L: [email protected] (moderated for non-subscribers)
> ?W: http://wiki.lustre.org/
> ?S: Maintained
> > I know James is working on cleaning up LNet, but I don't know if he has
> > anything this would be conflicting at this moment or not.
> >
> > Thanks for the patches. I wonder if you are generating them automatically?
> > Because it would be great if it also fixes the alignment issues
>
> It's pretty automatic.
>
> It's a trivial variant of the detypedef perl script I wrote awhile ago:
> http://permalink.gmane.org/gmane.linux.drivers.driver-project.devel/18603
>
>
> I think changing the alignment issues is better done in a
> separate patch.
>
> James isn't cc'd on these patches as he's not a listed
> maintainer. ?Maybe he should be added for all of it or
> some part of it?
Yes please add me to the maintainer list. Currently the work is divided
between Oleg and I. I also actively test this client to find any
regressions. I have been working on the LNet, libcfs cleanups and bug
fixes. Any libcfs/LNet changes please send my way.
Also now that LNet is close to being synced with our production code it
means I have free cycles to find all the earlier dropped patches in
the Lustre code. We have gaps in various places where patches were
dropped. So I will be working on pushing those patches as well. Oleg
still is the main person for the Lustre core client code.
> I don't know what email address James prefers as there
> are several in git log for him.
>
> James Simmons <[email protected]>
> James Simmons <[email protected]>
> James Simmons <[email protected]>
> "Simmons, James A." <[email protected]>
The infradead.org account is the main one. The ornl.gov is my day job
account. The yahoo and gmail accounts are used, for openid, to push
patches to the OpenSFS Lustre branch which is why you see those Signed-Off
with various patch ports.
> but maybe something like this:
> ---
> ?MAINTAINERS | 1 +
> ?1 file changed, 1 insertion(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 16ccda4..d585631 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -10578,6 +10578,7 @@ F: drivers/staging/media/lirc/
> ?STAGING - LUSTRE PARALLEL FILESYSTEM
> ?M: Oleg Drokin <[email protected]>
> ?M: Andreas Dilger <[email protected]>
> +R: James Simmons <[email protected]>
> ?L: [email protected] (moderated for non-subscribers)
> ?W: http://wiki.lustre.org/
> ?S: Maintained
> > I know James is working on cleaning up LNet, but I don't know if he has
> > anything this would be conflicting at this moment or not.
> >
> > Thanks for the patches. I wonder if you are generating them automatically?
> > Because it would be great if it also fixes the alignment issues
>
> It's pretty automatic.
>
> It's a trivial variant of the detypedef perl script I wrote awhile ago:
> http://permalink.gmane.org/gmane.linux.drivers.driver-project.devel/18603
>
>
> I think changing the alignment issues is better done in a
> separate patch.
>
> James isn't cc'd on these patches as he's not a listed
> maintainer. ?Maybe he should be added for all of it or
> some part of it?
Yes please add me to the maintainer list. Currently the work is divided
between Oleg and I. I also actively test this client to find any
regressions. I have been working on the LNet, libcfs cleanups and bug
fixes. Any libcfs/LNet changes please send my way.
Also now that LNet is close to being synced with our production code it
means I have free cycles to find all the earlier dropped patches in
the Lustre code. We have gaps in various places where patches were
dropped. So I will be working on pushing those patches as well. Oleg
still is the main person for the Lustre core client code.
> I don't know what email address James prefers as there
> are several in git log for him.
>
> James Simmons <[email protected]>
> James Simmons <[email protected]>
> James Simmons <[email protected]>
> "Simmons, James A." <[email protected]>
The infradead.org account is the main one. The ornl.gov is my day job
account. The yahoo and gmail accounts are used, for openid, to push
patches to the OpenSFS Lustre branch which is why you see those Signed-Off
with various patch ports.
> but maybe something like this:
> ---
> ?MAINTAINERS | 1 +
> ?1 file changed, 1 insertion(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 16ccda4..d585631 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -10578,6 +10578,7 @@ F: drivers/staging/media/lirc/
> ?STAGING - LUSTRE PARALLEL FILESYSTEM
> ?M: Oleg Drokin <[email protected]>
> ?M: Andreas Dilger <[email protected]>
> +R: James Simmons <[email protected]>
> ?L: [email protected] (moderated for non-subscribers)
> ?W: http://wiki.lustre.org/
> ?S: Maintained
> > I know James is working on cleaning up LNet, but I don't know if he has
> > anything this would be conflicting at this moment or not.
> >
> > Thanks for the patches. I wonder if you are generating them automatically?
> > Because it would be great if it also fixes the alignment issues
>
> It's pretty automatic.
>
> It's a trivial variant of the detypedef perl script I wrote awhile ago:
> http://permalink.gmane.org/gmane.linux.drivers.driver-project.devel/18603
>
>
> I think changing the alignment issues is better done in a
> separate patch.
>
> James isn't cc'd on these patches as he's not a listed
> maintainer. ?Maybe he should be added for all of it or
> some part of it?
Yes please add me to the maintainer list. Currently the work is divided
between Oleg and I. I also actively test this client to find any
regressions. I have been working on the LNet, libcfs cleanups and bug
fixes. Any libcfs/LNet changes please send my way.
Also now that LNet is close to being synced with our production code it
means I have free cycles to find all the earlier dropped patches in
the Lustre code. We have gaps in various places where patches were
dropped. So I will be working on pushing those patches as well. Oleg
still is the main person for the Lustre core client code.
> I don't know what email address James prefers as there
> are several in git log for him.
>
> James Simmons <[email protected]>
> James Simmons <[email protected]>
> James Simmons <[email protected]>
> "Simmons, James A." <[email protected]>
The infradead.org account is the main one. The ornl.gov is my day job
account. The yahoo and gmail accounts are used, for openid, to push
patches to the OpenSFS Lustre branch which is why you see those Signed-Off
with various patch ports.
> but maybe something like this:
> ---
> ?MAINTAINERS | 1 +
> ?1 file changed, 1 insertion(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 16ccda4..d585631 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -10578,6 +10578,7 @@ F: drivers/staging/media/lirc/
> ?STAGING - LUSTRE PARALLEL FILESYSTEM
> ?M: Oleg Drokin <[email protected]>
> ?M: Andreas Dilger <[email protected]>
> +R: James Simmons <[email protected]>
> ?L: [email protected] (moderated for non-subscribers)
> ?W: http://wiki.lustre.org/
> ?S: Maintained
> > I know James is working on cleaning up LNet, but I don't know if he has
> > anything this would be conflicting at this moment or not.
> >
> > Thanks for the patches. I wonder if you are generating them automatically?
> > Because it would be great if it also fixes the alignment issues
>
> It's pretty automatic.
>
> It's a trivial variant of the detypedef perl script I wrote awhile ago:
> http://permalink.gmane.org/gmane.linux.drivers.driver-project.devel/18603
>
>
> I think changing the alignment issues is better done in a
> separate patch.
>
> James isn't cc'd on these patches as he's not a listed
> maintainer. ?Maybe he should be added for all of it or
> some part of it?
Yes please add me to the maintainer list. Currently the work is divided
between Oleg and I. I also actively test this client to find any
regressions. I have been working on the LNet, libcfs cleanups and bug
fixes. Any libcfs/LNet changes please send my way.
Also now that LNet is close to being synced with our production code it
means I have free cycles to find all the earlier dropped patches in
the Lustre code. We have gaps in various places where patches were
dropped. So I will be working on pushing those patches as well. Oleg
still is the main person for the Lustre core client code.
> I don't know what email address James prefers as there
> are several in git log for him.
>
> James Simmons <[email protected]>
> James Simmons <[email protected]>
> James Simmons <[email protected]>
> "Simmons, James A." <[email protected]>
The infradead.org account is the main one. The ornl.gov is my day job
account. The yahoo and gmail accounts are used, for openid, to push
patches to the OpenSFS Lustre branch which is why you see those Signed-Off
with various patch ports.
> but maybe something like this:
> ---
> ?MAINTAINERS | 1 +
> ?1 file changed, 1 insertion(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 16ccda4..d585631 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -10578,6 +10578,7 @@ F: drivers/staging/media/lirc/
> ?STAGING - LUSTRE PARALLEL FILESYSTEM
> ?M: Oleg Drokin <[email protected]>
> ?M: Andreas Dilger <[email protected]>
> +R: James Simmons <[email protected]>
> ?L: [email protected] (moderated for non-subscribers)
> ?W: http://wiki.lustre.org/
> ?S: Maintained
Sorry I was seeing a email error that I thought was preventing my email
being sent out. That is not the case.