Commit 652c3076 authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman

staging: lustre: lnet: change lstcon_ndlist_ent_t to proper structure

Change lstcon_ndlist_ent_t from typedef to proper structure.
Signed-off-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarDoug Oucharek <doug.s.oucharek@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 11535af7
...@@ -90,13 +90,13 @@ struct lstcon_node_ent { ...@@ -90,13 +90,13 @@ struct lstcon_node_ent {
int nde_state; /* state of node */ int nde_state; /* state of node */
}; /*** node entry, for list_group command */ }; /*** node entry, for list_group command */
typedef struct { struct lstcon_ndlist_ent {
int nle_nnode; /* # of nodes */ int nle_nnode; /* # of nodes */
int nle_nactive; /* # of active nodes */ int nle_nactive; /* # of active nodes */
int nle_nbusy; /* # of busy nodes */ int nle_nbusy; /* # of busy nodes */
int nle_ndown; /* # of down nodes */ int nle_ndown; /* # of down nodes */
int nle_nunknown; /* # of unknown nodes */ int nle_nunknown; /* # of unknown nodes */
} lstcon_ndlist_ent_t; /*** node_list entry, for list_batch command */ }; /*** node_list entry, for list_batch command */
typedef struct { typedef struct {
int tse_type; /* test type */ int tse_type; /* test type */
...@@ -113,9 +113,9 @@ typedef struct { ...@@ -113,9 +113,9 @@ typedef struct {
*** list_batch command */ *** list_batch command */
typedef struct { typedef struct {
lstcon_ndlist_ent_t tbe_cli_nle; /* client (group) node_list struct lstcon_ndlist_ent tbe_cli_nle; /* client (group) node_list
* entry */ * entry */
lstcon_ndlist_ent_t tbe_srv_nle; /* server (group) node_list struct lstcon_ndlist_ent tbe_srv_nle; /* server (group) node_list
* entry */ * entry */
union { union {
lstcon_test_ent_t tbe_test; /* test entry */ lstcon_test_ent_t tbe_test; /* test entry */
...@@ -256,7 +256,7 @@ typedef struct { ...@@ -256,7 +256,7 @@ typedef struct {
int __user *lstio_ses_keyp; /* OUT: local key */ int __user *lstio_ses_keyp; /* OUT: local key */
/** OUT: session features */ /** OUT: session features */
unsigned int __user *lstio_ses_featp; unsigned int __user *lstio_ses_featp;
lstcon_ndlist_ent_t __user *lstio_ses_ndinfo; /* OUT: */ struct lstcon_ndlist_ent __user *lstio_ses_ndinfo;/* OUT: */
int lstio_ses_nmlen; /* IN: name length */ int lstio_ses_nmlen; /* IN: name length */
char __user *lstio_ses_namep; /* OUT: session name */ char __user *lstio_ses_namep; /* OUT: session name */
} lstio_session_info_args_t; } lstio_session_info_args_t;
...@@ -345,11 +345,11 @@ typedef struct { ...@@ -345,11 +345,11 @@ typedef struct {
int lstio_grp_key; /* IN: session key */ int lstio_grp_key; /* IN: session key */
int lstio_grp_nmlen; /* IN: name len */ int lstio_grp_nmlen; /* IN: name len */
char __user *lstio_grp_namep; /* IN: name */ char __user *lstio_grp_namep; /* IN: name */
lstcon_ndlist_ent_t __user *lstio_grp_entp; /* OUT: description of struct lstcon_ndlist_ent __user *lstio_grp_entp;/* OUT: description of
group */ group */
int __user *lstio_grp_idxp; /* IN/OUT: node index */ int __user *lstio_grp_idxp; /* IN/OUT: node index */
int __user *lstio_grp_ndentp; /* IN/OUT: # of nodent */ int __user *lstio_grp_ndentp; /* IN/OUT: # of nodent */
struct lstcon_node_ent __user *lstio_grp_dentsp; /* OUT: nodent array */ struct lstcon_node_ent __user *lstio_grp_dentsp;/* OUT: nodent array */
} lstio_group_info_args_t; } lstio_group_info_args_t;
#define LST_DEFAULT_BATCH "batch" /* default batch name */ #define LST_DEFAULT_BATCH "batch" /* default batch name */
......
...@@ -780,11 +780,11 @@ lstcon_nodes_getent(struct list_head *head, int *index_p, ...@@ -780,11 +780,11 @@ lstcon_nodes_getent(struct list_head *head, int *index_p,
} }
int int
lstcon_group_info(char *name, lstcon_ndlist_ent_t __user *gents_p, lstcon_group_info(char *name, struct lstcon_ndlist_ent __user *gents_p,
int *index_p, int *count_p, int *index_p, int *count_p,
struct lstcon_node_ent __user *dents_up) struct lstcon_node_ent __user *dents_up)
{ {
lstcon_ndlist_ent_t *gentp; struct lstcon_ndlist_ent *gentp;
struct lstcon_group *grp; struct lstcon_group *grp;
struct lstcon_ndlink *ndl; struct lstcon_ndlink *ndl;
int rc; int rc;
...@@ -805,7 +805,7 @@ lstcon_group_info(char *name, lstcon_ndlist_ent_t __user *gents_p, ...@@ -805,7 +805,7 @@ lstcon_group_info(char *name, lstcon_ndlist_ent_t __user *gents_p,
} }
/* non-verbose query */ /* non-verbose query */
LIBCFS_ALLOC(gentp, sizeof(lstcon_ndlist_ent_t)); LIBCFS_ALLOC(gentp, sizeof(struct lstcon_ndlist_ent));
if (!gentp) { if (!gentp) {
CERROR("Can't allocate ndlist_ent\n"); CERROR("Can't allocate ndlist_ent\n");
lstcon_group_decref(grp); lstcon_group_decref(grp);
...@@ -817,9 +817,9 @@ lstcon_group_info(char *name, lstcon_ndlist_ent_t __user *gents_p, ...@@ -817,9 +817,9 @@ lstcon_group_info(char *name, lstcon_ndlist_ent_t __user *gents_p,
LST_NODE_STATE_COUNTER(ndl->ndl_node, gentp); LST_NODE_STATE_COUNTER(ndl->ndl_node, gentp);
rc = copy_to_user(gents_p, gentp, rc = copy_to_user(gents_p, gentp,
sizeof(lstcon_ndlist_ent_t)) ? -EFAULT : 0; sizeof(struct lstcon_ndlist_ent)) ? -EFAULT : 0;
LIBCFS_FREE(gentp, sizeof(lstcon_ndlist_ent_t)); LIBCFS_FREE(gentp, sizeof(struct lstcon_ndlist_ent));
lstcon_group_decref(grp); lstcon_group_decref(grp);
...@@ -1778,10 +1778,10 @@ lstcon_session_new(char *name, int key, unsigned int feats, ...@@ -1778,10 +1778,10 @@ lstcon_session_new(char *name, int key, unsigned int feats,
int int
lstcon_session_info(struct lst_sid __user *sid_up, int __user *key_up, lstcon_session_info(struct lst_sid __user *sid_up, int __user *key_up,
unsigned __user *featp, unsigned __user *featp,
lstcon_ndlist_ent_t __user *ndinfo_up, struct lstcon_ndlist_ent __user *ndinfo_up,
char __user *name_up, int len) char __user *name_up, int len)
{ {
lstcon_ndlist_ent_t *entp; struct lstcon_ndlist_ent *entp;
struct lstcon_ndlink *ndl; struct lstcon_ndlink *ndl;
int rc = 0; int rc = 0;
......
...@@ -194,7 +194,7 @@ int lstcon_session_match(struct lst_sid sid); ...@@ -194,7 +194,7 @@ int lstcon_session_match(struct lst_sid sid);
int lstcon_session_new(char *name, int key, unsigned int version, int lstcon_session_new(char *name, int key, unsigned int version,
int timeout, int flags, struct lst_sid __user *sid_up); int timeout, int flags, struct lst_sid __user *sid_up);
int lstcon_session_info(struct lst_sid __user *sid_up, int __user *key, int lstcon_session_info(struct lst_sid __user *sid_up, int __user *key,
unsigned __user *verp, lstcon_ndlist_ent_t __user *entp, unsigned __user *verp, struct lstcon_ndlist_ent __user *entp,
char __user *name_up, int len); char __user *name_up, int len);
int lstcon_session_end(void); int lstcon_session_end(void);
int lstcon_session_debug(int timeout, struct list_head __user *result_up); int lstcon_session_debug(int timeout, struct list_head __user *result_up);
...@@ -213,7 +213,7 @@ int lstcon_nodes_add(char *name, int nnd, lnet_process_id_t __user *nds_up, ...@@ -213,7 +213,7 @@ int lstcon_nodes_add(char *name, int nnd, lnet_process_id_t __user *nds_up,
unsigned int *featp, struct list_head __user *result_up); unsigned int *featp, struct list_head __user *result_up);
int lstcon_nodes_remove(char *name, int nnd, lnet_process_id_t __user *nds_up, int lstcon_nodes_remove(char *name, int nnd, lnet_process_id_t __user *nds_up,
struct list_head __user *result_up); struct list_head __user *result_up);
int lstcon_group_info(char *name, lstcon_ndlist_ent_t __user *gent_up, int lstcon_group_info(char *name, struct lstcon_ndlist_ent __user *gent_up,
int *index_p, int *ndent_p, int *index_p, int *ndent_p,
struct lstcon_node_ent __user *ndents_up); struct lstcon_node_ent __user *ndents_up);
int lstcon_group_list(int idx, int len, char __user *name_up); int lstcon_group_list(int idx, int len, char __user *name_up);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment