#include "console.h"
void lstcon_rpc_stat_reply(struct lstcon_rpc_trans *, srpc_msg_t *,
- lstcon_node_t *, lstcon_trans_stat_t *);
+ struct lstcon_node *, lstcon_trans_stat_t *);
static void
lstcon_rpc_done(struct srpc_client_rpc *rpc)
}
static int
-lstcon_rpc_init(lstcon_node_t *nd, int service, unsigned feats,
+lstcon_rpc_init(struct lstcon_node *nd, int service, unsigned feats,
int bulk_npg, int bulk_len, int embedded, struct lstcon_rpc *crpc)
{
crpc->crp_rpc = sfw_create_rpc(nd->nd_id, service,
}
static int
-lstcon_rpc_prep(lstcon_node_t *nd, int service, unsigned feats,
+lstcon_rpc_prep(struct lstcon_node *nd, int service, unsigned feats,
int bulk_npg, int bulk_len, struct lstcon_rpc **crpcpp)
{
struct lstcon_rpc *crpc = NULL;
{
struct srpc_client_rpc *rpc;
struct lstcon_rpc *crpc;
- lstcon_node_t *nd;
+ struct lstcon_node *nd;
list_for_each_entry(crpc, &trans->tas_rpcs_list, crp_link) {
rpc = crpc->crp_rpc;
static int
lstcon_rpc_get_reply(struct lstcon_rpc *crpc, srpc_msg_t **msgpp)
{
- lstcon_node_t *nd = crpc->crp_node;
+ struct lstcon_node *nd = crpc->crp_node;
struct srpc_client_rpc *rpc = crpc->crp_rpc;
srpc_generic_reply_t *rep;
srpc_generic_reply_t *rep;
struct lstcon_rpc *crpc;
srpc_msg_t *msg;
- lstcon_node_t *nd;
+ struct lstcon_node *nd;
long dur;
struct timeval tv;
int error;
}
int
-lstcon_sesrpc_prep(lstcon_node_t *nd, int transop,
+lstcon_sesrpc_prep(struct lstcon_node *nd, int transop,
unsigned feats, struct lstcon_rpc **crpc)
{
srpc_mksn_reqst_t *msrq;
}
int
-lstcon_dbgrpc_prep(lstcon_node_t *nd, unsigned feats, struct lstcon_rpc **crpc)
+lstcon_dbgrpc_prep(struct lstcon_node *nd, unsigned feats, struct lstcon_rpc **crpc)
{
srpc_debug_reqst_t *drq;
int rc;
}
int
-lstcon_batrpc_prep(lstcon_node_t *nd, int transop, unsigned feats,
+lstcon_batrpc_prep(struct lstcon_node *nd, int transop, unsigned feats,
lstcon_tsb_hdr_t *tsb, struct lstcon_rpc **crpc)
{
lstcon_batch_t *batch;
}
int
-lstcon_statrpc_prep(lstcon_node_t *nd, unsigned feats, struct lstcon_rpc **crpc)
+lstcon_statrpc_prep(struct lstcon_node *nd, unsigned feats, struct lstcon_rpc **crpc)
{
srpc_stat_reqst_t *srq;
int rc;
{
lnet_process_id_packed_t *pid;
lstcon_ndlink_t *ndl;
- lstcon_node_t *nd;
+ struct lstcon_node *nd;
int start;
int end;
int i = 0;
}
int
-lstcon_testrpc_prep(lstcon_node_t *nd, int transop, unsigned feats,
+lstcon_testrpc_prep(struct lstcon_node *nd, int transop, unsigned feats,
lstcon_test_t *test, struct lstcon_rpc **crpc)
{
lstcon_group_t *sgrp = test->tes_src_grp;
static int
lstcon_sesnew_stat_reply(struct lstcon_rpc_trans *trans,
- lstcon_node_t *nd, srpc_msg_t *reply)
+ struct lstcon_node *nd, srpc_msg_t *reply)
{
srpc_mksn_reply_t *mksn_rep = &reply->msg_body.mksn_reply;
int status = mksn_rep->mksn_status;
void
lstcon_rpc_stat_reply(struct lstcon_rpc_trans *trans, srpc_msg_t *msg,
- lstcon_node_t *nd, lstcon_trans_stat_t *stat)
+ struct lstcon_node *nd, lstcon_trans_stat_t *stat)
{
srpc_rmsn_reply_t *rmsn_rep;
srpc_debug_reply_t *dbg_rep;
{
struct lstcon_rpc_trans *trans;
lstcon_ndlink_t *ndl;
- lstcon_node_t *nd;
+ struct lstcon_node *nd;
struct lstcon_rpc *rpc;
unsigned feats;
int rc;
srpc_msg_t *rep;
srpc_debug_reqst_t *drq;
lstcon_ndlink_t *ndl;
- lstcon_node_t *nd;
+ struct lstcon_node *nd;
int intv;
int count = 0;
int rc;
struct lstcon_session console_session;
static void
-lstcon_node_get(lstcon_node_t *nd)
+lstcon_node_get(struct lstcon_node *nd)
{
LASSERT(nd->nd_ref >= 1);
}
static int
-lstcon_node_find(lnet_process_id_t id, lstcon_node_t **ndpp, int create)
+lstcon_node_find(lnet_process_id_t id, struct lstcon_node **ndpp, int create)
{
lstcon_ndlink_t *ndl;
unsigned int idx = LNET_NIDADDR(id.nid) % LST_GLOBAL_HASHSIZE;
if (!create)
return -ENOENT;
- LIBCFS_ALLOC(*ndpp, sizeof(lstcon_node_t) + sizeof(lstcon_ndlink_t));
+ LIBCFS_ALLOC(*ndpp, sizeof(struct lstcon_node) + sizeof(lstcon_ndlink_t));
if (!*ndpp)
return -ENOMEM;
}
static void
-lstcon_node_put(lstcon_node_t *nd)
+lstcon_node_put(struct lstcon_node *nd)
{
lstcon_ndlink_t *ndl;
list_del(&ndl->ndl_link);
list_del(&ndl->ndl_hlink);
- LIBCFS_FREE(nd, sizeof(lstcon_node_t) + sizeof(lstcon_ndlink_t));
+ LIBCFS_FREE(nd, sizeof(struct lstcon_node) + sizeof(lstcon_ndlink_t));
}
static int
{
unsigned int idx = LNET_NIDADDR(id.nid) % LST_NODE_HASHSIZE;
lstcon_ndlink_t *ndl;
- lstcon_node_t *nd;
+ struct lstcon_node *nd;
int rc;
if (id.nid == LNET_NID_ANY)
}
static int
-lstcon_sesrpc_condition(int transop, lstcon_node_t *nd, void *arg)
+lstcon_sesrpc_condition(int transop, struct lstcon_node *nd, void *arg)
{
lstcon_group_t *grp = (lstcon_group_t *)arg;
int *count_p, lstcon_node_ent_t __user *dents_up)
{
lstcon_ndlink_t *ndl;
- lstcon_node_t *nd;
+ struct lstcon_node *nd;
int count = 0;
int index = 0;
}
static int
-lstcon_batrpc_condition(int transop, lstcon_node_t *nd, void *arg)
+lstcon_batrpc_condition(int transop, struct lstcon_node *nd, void *arg)
{
switch (transop) {
case LST_TRANS_TSBRUN:
}
static int
-lstcon_testrpc_condition(int transop, lstcon_node_t *nd, void *arg)
+lstcon_testrpc_condition(int transop, struct lstcon_node *nd, void *arg)
{
lstcon_test_t *test;
lstcon_batch_t *batch;
#include "selftest.h"
#include "conrpc.h"
-typedef struct lstcon_node {
+/* node descriptor */
+struct lstcon_node {
lnet_process_id_t nd_id; /* id of the node */
int nd_ref; /* reference count */
int nd_state; /* state of the node */
int nd_timeout; /* session timeout */
unsigned long nd_stamp; /* timestamp of last replied RPC */
struct lstcon_rpc nd_ping; /* ping rpc */
-} lstcon_node_t; /* node descriptor */
+};
typedef struct {
struct list_head ndl_link; /* chain on list */
struct list_head ndl_hlink; /* chain on hash */
- lstcon_node_t *ndl_node; /* pointer to node */
+ struct lstcon_node *ndl_node; /* pointer to node */
} lstcon_ndlink_t; /* node link descriptor */
typedef struct {
*/
struct list_head bat_trans_list; /* list head of transaction */
struct list_head bat_cli_list; /* list head of client nodes
- * (lstcon_node_t) */
+ * (struct lstcon_node) */
struct list_head *bat_cli_hash; /* hash table of client nodes */
struct list_head bat_srv_list; /* list head of server nodes */
struct list_head *bat_srv_hash; /* hash table of server nodes */