*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
#ifndef __LST_CONSOLE_H__
#define __LST_CONSOLE_H__
-#ifdef __KERNEL__
#include <libcfs/libcfs.h>
#include <lnet/lnet.h>
#include "conrpc.h"
typedef struct lstcon_node {
- lnet_process_id_t nd_id; /* id of the node */
+ struct lnet_process_id nd_id; /* id of the node */
int nd_ref; /* reference count */
int nd_state; /* state of the node */
int nd_timeout; /* session timeout */
#define LST_BATCH_RUNNING 0xB1 /* running batch */
typedef struct lstcon_tsb_hdr {
- lst_bid_t tsb_id; /* batch ID */
+ struct lst_bid tsb_id; /* batch ID */
int tsb_index; /* test index */
} lstcon_tsb_hdr_t;
typedef struct {
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 */
- time_t ses_laststamp; /* last operation stamp (seconds) */
+ time64_t ses_laststamp; /* last operation stamp (seconds) */
/** tests features of the session */
unsigned ses_features;
/** features are synced with remote test nodes */
char ses_name[LST_NAME_SIZE]; /* session name */
lstcon_rpc_trans_t *ses_ping; /* session pinger */
stt_timer_t ses_ping_timer; /* timer for pinger */
- lstcon_trans_stat_t ses_trans_stat; /* transaction stats */
+ struct lstcon_trans_stat ses_trans_stat; /* transaction stats */
struct list_head ses_trans_list; /* global list of transaction */
struct list_head ses_grp_list; /* global list of groups */
extern lstcon_session_t console_session;
-static inline lstcon_trans_stat_t *
+static inline struct lstcon_trans_stat *
lstcon_trans_stat(void)
{
return &console_session.ses_trans_stat;
}
static inline struct list_head *
-lstcon_id2hash(lnet_process_id_t id, struct list_head *hash)
+lstcon_id2hash(struct lnet_process_id id, struct list_head *hash)
{
unsigned int idx = LNET_NIDADDR(id.nid) % LST_NODE_HASHSIZE;
return &hash[idx];
}
-extern int lstcon_session_match(lst_sid_t sid);
+extern int lstcon_session_match(struct lst_sid sid);
extern int lstcon_session_new(char *name, int key, unsigned version,
- int timeout, int flags, lst_sid_t __user *sid_up);
-extern int lstcon_session_info(lst_sid_t __user *sid_up, int __user *key,
+ int timeout, int flags, struct lst_sid __user *sid_up);
+extern int lstcon_session_info(struct lst_sid __user *sid_up, int __user *key,
unsigned __user *verp,
- lstcon_ndlist_ent_t __user *entp,
+ struct lstcon_ndlist_ent __user *entp,
char __user *name_up, int len);
extern int lstcon_session_end(void);
extern int lstcon_session_debug(int timeout,
extern int lstcon_group_debug(int timeout, char *name,
struct list_head __user *result_up);
extern int lstcon_nodes_debug(int timeout, int nnd,
- lnet_process_id_t __user *nds_up,
+ struct lnet_process_id __user *nds_up,
struct list_head __user *result_up);
extern int lstcon_group_add(char *name);
extern int lstcon_group_del(char *name);
extern int lstcon_group_clean(char *name, int args);
extern int lstcon_group_refresh(char *name, struct list_head __user *result_up);
extern int lstcon_nodes_add(char *name, int nnd,
- lnet_process_id_t __user *nds_up,
+ struct lnet_process_id __user *nds_up,
unsigned *featp,
struct list_head __user *result_up);
extern int lstcon_nodes_remove(char *name, int nnd,
- lnet_process_id_t __user *nds_up,
+ struct lnet_process_id __user *nds_up,
struct list_head __user *result_up);
-extern int lstcon_group_info(char *name, lstcon_ndlist_ent_t __user *gent_up,
+extern int lstcon_group_info(char *name, struct lstcon_ndlist_ent __user *gent_up,
int *index_p, int *ndent_p,
- lstcon_node_ent_t __user *ndents_up);
+ struct lstcon_node_ent __user *ndents_up);
extern int lstcon_group_list(int idx, int len, char __user *name_up);
extern int lstcon_batch_add(char *name);
extern int lstcon_batch_run(char *name, int timeout,
struct list_head __user *result_up);
extern int lstcon_batch_del(char *name);
extern int lstcon_batch_list(int idx, int namelen, char __user *name_up);
-extern int lstcon_batch_info(char *name, lstcon_test_batch_ent_t __user *ent_up,
+extern int lstcon_batch_info(char *name,
+ struct lstcon_test_batch_ent __user *ent_up,
int server, int testidx, int *index_p,
- int *ndent_p, lstcon_node_ent_t __user *dents_up);
+ int *ndent_p,
+ struct lstcon_node_ent __user *dents_up);
extern int lstcon_group_stat(char *grp_name, int timeout,
struct list_head __user *result_up);
-extern int lstcon_nodes_stat(int count, lnet_process_id_t __user *ids_up,
+extern int lstcon_nodes_stat(int count, struct lnet_process_id __user *ids_up,
int timeout, struct list_head __user *result_up);
extern int lstcon_test_add(char *batch_name, int type, int loop,
int concur, int dist, int span,
char *src_name, char *dst_name,
void *param, int paramlen, int *retp,
struct list_head __user *result_up);
-#endif
int lstcon_console_init(void);
int lstcon_console_fini(void);