diff options
author | James Simmons <jsimmons@infradead.org> | 2017-01-16 16:30:04 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-19 11:10:14 +0100 |
commit | cb850bb369f1f6e3f99d543730387ddae2149c9c (patch) | |
tree | 5c2e4d23ecea2405a52630f232112e36f700eda5 /drivers/staging/lustre/lnet/selftest | |
parent | a2db578bc07468a28d213fed37057ce1e182112e (diff) |
staging: lustre: lnet: change lst_nid_t to proper structure
Change lst_nid_t from typedef to proper structure.
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/selftest')
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/conrpc.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/console.c | 12 | ||||
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/console.h | 8 | ||||
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/framework.c | 4 | ||||
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/rpc.h | 30 | ||||
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/selftest.h | 2 |
6 files changed, 29 insertions, 29 deletions
diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c b/drivers/staging/lustre/lnet/selftest/conrpc.c index 994422c62487..84ae01091b61 100644 --- a/drivers/staging/lustre/lnet/selftest/conrpc.c +++ b/drivers/staging/lustre/lnet/selftest/conrpc.c @@ -519,7 +519,7 @@ lstcon_rpc_trans_interpreter(struct lstcon_rpc_trans *trans, /* RPC is done */ rep = (struct srpc_generic_reply *)&msg->msg_body.reply; - if (copy_to_user(&ent->rpe_sid, &rep->sid, sizeof(lst_sid_t)) || + if (copy_to_user(&ent->rpe_sid, &rep->sid, sizeof(rep->sid)) || copy_to_user(&ent->rpe_fwk_errno, &rep->status, sizeof(rep->status))) return -EFAULT; diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c index 1456d2395cc9..02dbfef94956 100644 --- a/drivers/staging/lustre/lnet/selftest/console.c +++ b/drivers/staging/lustre/lnet/selftest/console.c @@ -1688,14 +1688,14 @@ lstcon_nodes_debug(int timeout, } int -lstcon_session_match(lst_sid_t sid) +lstcon_session_match(struct lst_sid sid) { return (console_session.ses_id.ses_nid == sid.ses_nid && console_session.ses_id.ses_stamp == sid.ses_stamp) ? 1 : 0; } static void -lstcon_new_session_id(lst_sid_t *sid) +lstcon_new_session_id(struct lst_sid *sid) { lnet_process_id_t id; @@ -1708,7 +1708,7 @@ lstcon_new_session_id(lst_sid_t *sid) int lstcon_session_new(char *name, int key, unsigned int feats, - int timeout, int force, lst_sid_t __user *sid_up) + int timeout, int force, struct lst_sid __user *sid_up) { int rc = 0; int i; @@ -1767,7 +1767,7 @@ lstcon_session_new(char *name, int key, unsigned int feats, } if (!copy_to_user(sid_up, &console_session.ses_id, - sizeof(lst_sid_t))) + sizeof(struct lst_sid))) return rc; lstcon_session_end(); @@ -1776,7 +1776,7 @@ lstcon_session_new(char *name, int key, unsigned int feats, } int -lstcon_session_info(lst_sid_t __user *sid_up, int __user *key_up, +lstcon_session_info(struct lst_sid __user *sid_up, int __user *key_up, unsigned __user *featp, lstcon_ndlist_ent_t __user *ndinfo_up, char __user *name_up, int len) @@ -1796,7 +1796,7 @@ lstcon_session_info(lst_sid_t __user *sid_up, int __user *key_up, LST_NODE_STATE_COUNTER(ndl->ndl_node, entp); if (copy_to_user(sid_up, &console_session.ses_id, - sizeof(lst_sid_t)) || + sizeof(*sid_up)) || copy_to_user(key_up, &console_session.ses_key, sizeof(*key_up)) || copy_to_user(featp, &console_session.ses_features, diff --git a/drivers/staging/lustre/lnet/selftest/console.h b/drivers/staging/lustre/lnet/selftest/console.h index 5dc1de48a10e..4bf7ecdce966 100644 --- a/drivers/staging/lustre/lnet/selftest/console.h +++ b/drivers/staging/lustre/lnet/selftest/console.h @@ -140,7 +140,7 @@ struct lstcon_test { struct lstcon_session { struct mutex ses_mutex; /* only 1 thread in session */ - lst_sid_t ses_id; /* global session id */ + struct lst_sid ses_id; /* global session id */ int ses_key; /* local session key */ int ses_state; /* state of session */ int ses_timeout; /* timeout in seconds */ @@ -190,10 +190,10 @@ lstcon_id2hash(lnet_process_id_t id, struct list_head *hash) int lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_hdr *hdr); int lstcon_console_init(void); int lstcon_console_fini(void); -int lstcon_session_match(lst_sid_t sid); +int lstcon_session_match(struct lst_sid sid); int lstcon_session_new(char *name, int key, unsigned int version, - int timeout, int flags, lst_sid_t __user *sid_up); -int lstcon_session_info(lst_sid_t __user *sid_up, int __user *key, + int timeout, int flags, struct lst_sid __user *sid_up); +int lstcon_session_info(struct lst_sid __user *sid_up, int __user *key, unsigned __user *verp, lstcon_ndlist_ent_t __user *entp, char __user *name_up, int len); int lstcon_session_end(void); diff --git a/drivers/staging/lustre/lnet/selftest/framework.c b/drivers/staging/lustre/lnet/selftest/framework.c index 48dcc330dc9b..4100f67f0745 100644 --- a/drivers/staging/lustre/lnet/selftest/framework.c +++ b/drivers/staging/lustre/lnet/selftest/framework.c @@ -39,7 +39,7 @@ #include "selftest.h" -lst_sid_t LST_INVALID_SID = {LNET_NID_ANY, -1}; +struct lst_sid LST_INVALID_SID = {LNET_NID_ANY, -1}; static int session_timeout = 100; module_param(session_timeout, int, 0444); @@ -254,7 +254,7 @@ sfw_session_expired(void *data) } static inline void -sfw_init_session(struct sfw_session *sn, lst_sid_t sid, +sfw_init_session(struct sfw_session *sn, struct lst_sid sid, unsigned int features, const char *name) { struct stt_timer *timer = &sn->sn_timer; diff --git a/drivers/staging/lustre/lnet/selftest/rpc.h b/drivers/staging/lustre/lnet/selftest/rpc.h index f353a634cc8e..3324c3f1adde 100644 --- a/drivers/staging/lustre/lnet/selftest/rpc.h +++ b/drivers/staging/lustre/lnet/selftest/rpc.h @@ -75,43 +75,43 @@ struct srpc_generic_reqst { struct srpc_generic_reply { __u32 status; - lst_sid_t sid; + struct lst_sid sid; } WIRE_ATTR; /* FRAMEWORK RPCs */ struct srpc_mksn_reqst { __u64 mksn_rpyid; /* reply buffer matchbits */ - lst_sid_t mksn_sid; /* session id */ + struct lst_sid mksn_sid; /* session id */ __u32 mksn_force; /* use brute force */ char mksn_name[LST_NAME_SIZE]; } WIRE_ATTR; /* make session request */ struct srpc_mksn_reply { __u32 mksn_status; /* session status */ - lst_sid_t mksn_sid; /* session id */ + struct lst_sid mksn_sid; /* session id */ __u32 mksn_timeout; /* session timeout */ char mksn_name[LST_NAME_SIZE]; } WIRE_ATTR; /* make session reply */ struct srpc_rmsn_reqst { __u64 rmsn_rpyid; /* reply buffer matchbits */ - lst_sid_t rmsn_sid; /* session id */ + struct lst_sid rmsn_sid; /* session id */ } WIRE_ATTR; /* remove session request */ struct srpc_rmsn_reply { __u32 rmsn_status; - lst_sid_t rmsn_sid; /* session id */ + struct lst_sid rmsn_sid; /* session id */ } WIRE_ATTR; /* remove session reply */ struct srpc_join_reqst { __u64 join_rpyid; /* reply buffer matchbits */ - lst_sid_t join_sid; /* session id to join */ + struct lst_sid join_sid; /* session id to join */ char join_group[LST_NAME_SIZE]; /* group name */ } WIRE_ATTR; struct srpc_join_reply { __u32 join_status; /* returned status */ - lst_sid_t join_sid; /* session id */ + struct lst_sid join_sid; /* session id */ __u32 join_timeout; /* # seconds' inactivity to * expire */ @@ -120,13 +120,13 @@ struct srpc_join_reply { struct srpc_debug_reqst { __u64 dbg_rpyid; /* reply buffer matchbits */ - lst_sid_t dbg_sid; /* session id */ + struct lst_sid dbg_sid; /* session id */ __u32 dbg_flags; /* bitmap of debug */ } WIRE_ATTR; struct srpc_debug_reply { __u32 dbg_status; /* returned code */ - lst_sid_t dbg_sid; /* session id */ + struct lst_sid dbg_sid; /* session id */ __u32 dbg_timeout; /* session timeout */ __u32 dbg_nbatch; /* # of batches in the node */ char dbg_name[LST_NAME_SIZE]; /* session name */ @@ -138,7 +138,7 @@ struct srpc_debug_reply { struct srpc_batch_reqst { __u64 bar_rpyid; /* reply buffer matchbits */ - lst_sid_t bar_sid; /* session id */ + struct lst_sid bar_sid; /* session id */ lst_bid_t bar_bid; /* batch id */ __u32 bar_opc; /* create/start/stop batch */ __u32 bar_testidx; /* index of test */ @@ -147,20 +147,20 @@ struct srpc_batch_reqst { struct srpc_batch_reply { __u32 bar_status; /* status of request */ - lst_sid_t bar_sid; /* session id */ + struct lst_sid bar_sid; /* session id */ __u32 bar_active; /* # of active tests in batch/test */ __u32 bar_time; /* remained time */ } WIRE_ATTR; struct srpc_stat_reqst { __u64 str_rpyid; /* reply buffer matchbits */ - lst_sid_t str_sid; /* session id */ + struct lst_sid str_sid; /* session id */ __u32 str_type; /* type of stat */ } WIRE_ATTR; struct srpc_stat_reply { __u32 str_status; - lst_sid_t str_sid; + struct lst_sid str_sid; sfw_counters_t str_fw; srpc_counters_t str_rpc; lnet_counters_t str_lnet; @@ -187,7 +187,7 @@ struct test_ping_req { struct srpc_test_reqst { __u64 tsr_rpyid; /* reply buffer matchbits */ __u64 tsr_bulkid; /* bulk buffer matchbits */ - lst_sid_t tsr_sid; /* session id */ + struct lst_sid tsr_sid; /* session id */ lst_bid_t tsr_bid; /* batch id */ __u32 tsr_service; /* test type: bulk|ping|... */ __u32 tsr_loop; /* test client loop count or @@ -207,7 +207,7 @@ struct srpc_test_reqst { struct srpc_test_reply { __u32 tsr_status; /* returned code */ - lst_sid_t tsr_sid; + struct lst_sid tsr_sid; } WIRE_ATTR; /* TEST RPCs */ diff --git a/drivers/staging/lustre/lnet/selftest/selftest.h b/drivers/staging/lustre/lnet/selftest/selftest.h index c8833a016b6d..35f98aed4614 100644 --- a/drivers/staging/lustre/lnet/selftest/selftest.h +++ b/drivers/staging/lustre/lnet/selftest/selftest.h @@ -322,7 +322,7 @@ struct srpc_service { struct sfw_session { struct list_head sn_list; /* chain on fw_zombie_sessions */ - lst_sid_t sn_id; /* unique identifier */ + struct lst_sid sn_id; /* unique identifier */ unsigned int sn_timeout; /* # seconds' inactivity to expire */ int sn_timer_active; unsigned int sn_features; |