*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
*
* 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
int nd_ref; /* reference count */
int nd_state; /* state of the node */
int nd_timeout; /* session timeout */
int nd_ref; /* reference count */
int nd_state; /* state of the node */
int nd_timeout; /* session timeout */
- cfs_time_t nd_stamp; /* timestamp of last replied RPC */
- struct lstcon_rpc nd_ping; /* ping rpc */
-} lstcon_node_t; /*** node descriptor */
+ ktime_t nd_stamp; /* last RPC reply timestamp */
+ struct lstcon_rpc nd_ping; /* ping rpc */
+};
struct list_head grp_link; /* chain on global group list */
int grp_ref; /* reference count */
int grp_userland; /* has userland nodes */
struct list_head grp_link; /* chain on global group list */
int grp_ref; /* reference count */
int grp_userland; /* has userland nodes */
struct list_head grp_trans_list; /* transaction list */
struct list_head grp_ndl_list; /* nodes list */
struct list_head grp_ndl_hash[0];/* hash table for nodes */
struct list_head grp_trans_list; /* transaction list */
struct list_head grp_ndl_list; /* nodes list */
struct list_head grp_ndl_hash[0];/* hash table for nodes */
struct list_head bat_test_list;
/* list head of transaction */
struct list_head bat_trans_list;
struct list_head bat_test_list;
/* list head of transaction */
struct list_head bat_trans_list;
struct list_head bat_cli_list;
/* hash table of client nodes */
struct list_head *bat_cli_hash;
struct list_head bat_cli_list;
/* hash table of client nodes */
struct list_head *bat_cli_hash;
struct list_head bat_srv_list;
/* hash table of server nodes */
struct list_head *bat_srv_hash;
struct list_head bat_srv_list;
/* hash table of server nodes */
struct list_head *bat_srv_hash;
int tes_type; /* type of the test, i.e: bulk, ping */
int tes_stop_onerr; /* stop on error */
int tes_type; /* type of the test, i.e: bulk, ping */
int tes_stop_onerr; /* stop on error */
int tes_cliidx; /* client index, used for RPC creating */
struct list_head tes_trans_list; /* transaction list */
int tes_cliidx; /* client index, used for RPC creating */
struct list_head tes_trans_list; /* transaction list */
- lstcon_group_t *tes_src_grp; /* group run the test */
- lstcon_group_t *tes_dst_grp; /* target group */
+ struct lstcon_group *tes_src_grp; /* group run the test */
+ struct lstcon_group *tes_dst_grp; /* target group */
#define LST_GLOBAL_HASHSIZE 503 /* global nodes hash table size */
#define LST_NODE_HASHSIZE 239 /* node hash table (for batch or group) */
#define LST_GLOBAL_HASHSIZE 503 /* global nodes hash table size */
#define LST_NODE_HASHSIZE 239 /* node hash table (for batch or group) */
int ses_key; /* local session key */
int ses_state; /* state of session */
int ses_timeout; /* timeout in seconds */
int ses_key; /* local session key */
int ses_state; /* state of session */
int ses_timeout; /* timeout in seconds */
- 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_rpc_trans *ses_ping; /* session pinger */
+ struct stt_timer ses_ping_timer; /* timer for pinger */
+ 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 */
struct list_head ses_trans_list; /* global list of transaction */
struct list_head ses_grp_list; /* global list of groups */
spinlock_t ses_rpc_lock; /* serialize */
atomic_t ses_rpc_counter;/* # of initialized RPCs */
struct list_head ses_rpc_freelist;/* idle console rpc */
spinlock_t ses_rpc_lock; /* serialize */
atomic_t ses_rpc_counter;/* # of initialized RPCs */
struct list_head ses_rpc_freelist;/* idle console rpc */
extern int lstcon_session_new(char *name, int key, unsigned version,
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,
char __user *name_up, int len);
extern int lstcon_session_end(void);
extern int lstcon_session_debug(int timeout,
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,
extern int lstcon_group_debug(int timeout, char *name,
struct list_head __user *result_up);
extern int lstcon_nodes_debug(int timeout, int nnd,
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,
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,
unsigned *featp,
struct list_head __user *result_up);
extern int lstcon_nodes_remove(char *name, int nnd,
unsigned *featp,
struct list_head __user *result_up);
extern int lstcon_nodes_remove(char *name, int nnd,
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,
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);
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 server, int testidx, int *index_p,
extern int lstcon_group_stat(char *grp_name, int timeout,
struct list_head __user *result_up);
extern int lstcon_group_stat(char *grp_name, int timeout,
struct list_head __user *result_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);
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);
+
+int lstcon_ioctl_entry(struct notifier_block *nb,
+ unsigned long cmd, void *vdata);
+int lstcon_console_init(void);
+int lstcon_console_fini(void);