Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd7a1a32 authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman
Browse files

staging: lustre: selftest: convert srpc_msg_t to proper struct



Turn typedef struct srpc_msg to proper structure

Signed-off-by: default avatarJames Simmons <uja.ornl@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dcdc7c84
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ brw_client_done_rpc(struct sfw_test_unit *tsu, struct srpc_client_rpc *rpc)
	__u64 magic = BRW_MAGIC;
	struct sfw_test_instance *tsi = tsu->tsu_instance;
	struct sfw_session *sn = tsi->tsi_batch->bat_session;
	srpc_msg_t *msg = &rpc->crpc_replymsg;
	struct srpc_msg *msg = &rpc->crpc_replymsg;
	srpc_brw_reply_t *reply = &msg->msg_body.brw_reply;
	srpc_brw_reqst_t *reqst = &rpc->crpc_reqstmsg.msg_body.brw_reqst;

@@ -384,7 +384,7 @@ brw_bulk_ready(struct srpc_server_rpc *rpc, int status)
	__u64 magic = BRW_MAGIC;
	srpc_brw_reply_t *reply = &rpc->srpc_replymsg.msg_body.brw_reply;
	srpc_brw_reqst_t *reqst;
	srpc_msg_t *reqstmsg;
	struct srpc_msg *reqstmsg;

	LASSERT(rpc->srpc_bulk);
	LASSERT(rpc->srpc_reqstbuf);
@@ -418,8 +418,8 @@ static int
brw_server_handle(struct srpc_server_rpc *rpc)
{
	struct srpc_service *sv = rpc->srpc_scd->scd_svc;
	srpc_msg_t *replymsg = &rpc->srpc_replymsg;
	srpc_msg_t *reqstmsg = &rpc->srpc_reqstbuf->buf_msg;
	struct srpc_msg *replymsg = &rpc->srpc_replymsg;
	struct srpc_msg *reqstmsg = &rpc->srpc_reqstbuf->buf_msg;
	srpc_brw_reply_t *reply = &replymsg->msg_body.brw_reply;
	srpc_brw_reqst_t *reqst = &reqstmsg->msg_body.brw_reqst;
	int npg;
+7 −7
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@
#include "conrpc.h"
#include "console.h"

void lstcon_rpc_stat_reply(struct lstcon_rpc_trans *, srpc_msg_t *,
void lstcon_rpc_stat_reply(struct lstcon_rpc_trans *, struct srpc_msg *,
			   struct lstcon_node *, lstcon_trans_stat_t *);

static void
@@ -386,7 +386,7 @@ lstcon_rpc_trans_postwait(struct lstcon_rpc_trans *trans, int timeout)
}

static int
lstcon_rpc_get_reply(struct lstcon_rpc *crpc, srpc_msg_t **msgpp)
lstcon_rpc_get_reply(struct lstcon_rpc *crpc, struct srpc_msg **msgpp)
{
	struct lstcon_node *nd = crpc->crp_node;
	struct srpc_client_rpc *rpc = crpc->crp_rpc;
@@ -426,7 +426,7 @@ void
lstcon_rpc_trans_stat(struct lstcon_rpc_trans *trans, lstcon_trans_stat_t *stat)
{
	struct lstcon_rpc *crpc;
	srpc_msg_t *rep;
	struct srpc_msg *rep;
	int error;

	LASSERT(stat);
@@ -475,7 +475,7 @@ lstcon_rpc_trans_interpreter(struct lstcon_rpc_trans *trans,
	lstcon_rpc_ent_t *ent;
	srpc_generic_reply_t *rep;
	struct lstcon_rpc *crpc;
	srpc_msg_t *msg;
	struct srpc_msg *msg;
	struct lstcon_node *nd;
	long dur;
	struct timeval tv;
@@ -916,7 +916,7 @@ lstcon_testrpc_prep(struct lstcon_node *nd, int transop, unsigned feats,

static int
lstcon_sesnew_stat_reply(struct lstcon_rpc_trans *trans,
			 struct lstcon_node *nd, srpc_msg_t *reply)
			 struct lstcon_node *nd, struct srpc_msg *reply)
{
	srpc_mksn_reply_t *mksn_rep = &reply->msg_body.mksn_reply;
	int status = mksn_rep->mksn_status;
@@ -962,7 +962,7 @@ lstcon_sesnew_stat_reply(struct lstcon_rpc_trans *trans,
}

void
lstcon_rpc_stat_reply(struct lstcon_rpc_trans *trans, srpc_msg_t *msg,
lstcon_rpc_stat_reply(struct lstcon_rpc_trans *trans, struct srpc_msg *msg,
		      struct lstcon_node *nd, lstcon_trans_stat_t *stat)
{
	srpc_rmsn_reply_t *rmsn_rep;
@@ -1171,7 +1171,7 @@ lstcon_rpc_pinger(void *arg)
	struct stt_timer *ptimer = (struct stt_timer *)arg;
	struct lstcon_rpc_trans *trans;
	struct lstcon_rpc *crpc;
	srpc_msg_t *rep;
	struct srpc_msg *rep;
	srpc_debug_reqst_t *drq;
	struct lstcon_ndlink *ndl;
	struct lstcon_node *nd;
+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ struct lstcon_rpc_trans {
#define LST_TRANS_STATQRY	0x21

typedef int (*lstcon_rpc_cond_func_t)(int, struct lstcon_node *, void *);
typedef int (*lstcon_rpc_readent_func_t)(int, srpc_msg_t *,
typedef int (*lstcon_rpc_readent_func_t)(int, struct srpc_msg *,
					 lstcon_rpc_ent_t __user *);

int  lstcon_sesrpc_prep(struct lstcon_node *nd, int transop,
+5 −5
Original line number Diff line number Diff line
@@ -370,7 +370,7 @@ lstcon_sesrpc_condition(int transop, struct lstcon_node *nd, void *arg)
}

static int
lstcon_sesrpc_readent(int transop, srpc_msg_t *msg,
lstcon_sesrpc_readent(int transop, struct srpc_msg *msg,
		      lstcon_rpc_ent_t __user *ent_up)
{
	srpc_debug_reply_t *rep;
@@ -1383,7 +1383,7 @@ lstcon_test_find(struct lstcon_batch *batch, int idx, lstcon_test_t **testpp)
}

static int
lstcon_tsbrpc_readent(int transop, srpc_msg_t *msg,
lstcon_tsbrpc_readent(int transop, struct srpc_msg *msg,
		      lstcon_rpc_ent_t __user *ent_up)
{
	srpc_batch_reply_t *rep = &msg->msg_body.bat_reply;
@@ -1462,7 +1462,7 @@ lstcon_test_batch_query(char *name, int testidx, int client,
}

static int
lstcon_statrpc_readent(int transop, srpc_msg_t *msg,
lstcon_statrpc_readent(int transop, struct srpc_msg *msg,
		       lstcon_rpc_ent_t __user *ent_up)
{
	srpc_stat_reply_t *rep = &msg->msg_body.stat_reply;
@@ -1905,8 +1905,8 @@ lstcon_session_feats_check(unsigned feats)
static int
lstcon_acceptor_handle(struct srpc_server_rpc *rpc)
{
	srpc_msg_t *rep	= &rpc->srpc_replymsg;
	srpc_msg_t *req	= &rpc->srpc_reqstbuf->buf_msg;
	struct srpc_msg *rep	= &rpc->srpc_replymsg;
	struct srpc_msg *req	= &rpc->srpc_reqstbuf->buf_msg;
	srpc_join_reqst_t *jreq = &req->msg_body.join_reqst;
	srpc_join_reply_t *jrep = &rep->msg_body.join_reply;
	struct lstcon_group *grp = NULL;
+7 −7
Original line number Diff line number Diff line
@@ -405,7 +405,7 @@ int
sfw_make_session(srpc_mksn_reqst_t *request, srpc_mksn_reply_t *reply)
{
	struct sfw_session *sn = sfw_data.fw_session;
	srpc_msg_t *msg = container_of(request, srpc_msg_t,
	struct srpc_msg *msg = container_of(request, struct srpc_msg,
				       msg_body.mksn_reqst);
	int cplen = 0;

@@ -438,7 +438,7 @@ sfw_make_session(srpc_mksn_reqst_t *request, srpc_mksn_reply_t *reply)
	/*
	 * reject the request if it requires unknown features
	 * NB: old version will always accept all features because it's not
	 * aware of srpc_msg_t::msg_ses_feats, it's a defect but it's also
	 * aware of srpc_msg::msg_ses_feats, it's a defect but it's also
	 * harmless because it will return zero feature to console, and it's
	 * console's responsibility to make sure all nodes in a session have
	 * same feature mask.
@@ -685,7 +685,7 @@ sfw_destroy_session(struct sfw_session *sn)
}

static void
sfw_unpack_addtest_req(srpc_msg_t *msg)
sfw_unpack_addtest_req(struct srpc_msg *msg)
{
	srpc_test_reqst_t *req = &msg->msg_body.tes_reqst;

@@ -731,7 +731,7 @@ sfw_unpack_addtest_req(srpc_msg_t *msg)
static int
sfw_add_test_instance(struct sfw_batch *tsb, struct srpc_server_rpc *rpc)
{
	srpc_msg_t *msg = &rpc->srpc_reqstbuf->buf_msg;
	struct srpc_msg *msg = &rpc->srpc_reqstbuf->buf_msg;
	srpc_test_reqst_t *req = &msg->msg_body.tes_reqst;
	struct srpc_bulk *bk = rpc->srpc_bulk;
	int ndest = req->tsr_ndest;
@@ -1227,8 +1227,8 @@ static int
sfw_handle_server_rpc(struct srpc_server_rpc *rpc)
{
	struct srpc_service *sv = rpc->srpc_scd->scd_svc;
	srpc_msg_t *reply = &rpc->srpc_replymsg;
	srpc_msg_t *request = &rpc->srpc_reqstbuf->buf_msg;
	struct srpc_msg *reply = &rpc->srpc_replymsg;
	struct srpc_msg *request = &rpc->srpc_reqstbuf->buf_msg;
	unsigned features = LST_FEATS_MASK;
	int rc = 0;

@@ -1415,7 +1415,7 @@ sfw_create_rpc(lnet_process_id_t peer, int service,
}

void
sfw_unpack_message(srpc_msg_t *msg)
sfw_unpack_message(struct srpc_msg *msg)
{
	if (msg->msg_magic == SRPC_MSG_MAGIC)
		return; /* no flipping needed */
Loading