}
EXPORT_SYMBOL(lustre_msg_early_size);
-int lustre_msg_size_v2(int count, int *lengths)
+int lustre_msg_size_v2(int count, __u32 *lengths)
{
int size;
int i;
* in the form of a v2 request. If this is a connection to a v1
* target then the first buffer will be stripped because the ptlrpc
* data is part of the lustre_msg_v1 header. b=14043 */
-int lustre_msg_size(__u32 magic, int count, int *lens)
+int lustre_msg_size(__u32 magic, int count, __u32 *lens)
{
- int size[] = { sizeof(struct ptlrpc_body) };
+ __u32 size[] = { sizeof(struct ptlrpc_body) };
if (!lens) {
LASSERT(count == 1);
}
}
-void lustre_init_msg_v2(struct lustre_msg_v2 *msg, int count, int *lens,
+void lustre_init_msg_v2(struct lustre_msg_v2 *msg, int count, __u32 *lens,
char **bufs)
{
char *ptr;
EXPORT_SYMBOL(lustre_init_msg_v2);
static int lustre_pack_request_v2(struct ptlrpc_request *req,
- int count, int *lens, char **bufs)
+ int count, __u32 *lens, char **bufs)
{
int reqlen, rc;
}
int lustre_pack_request(struct ptlrpc_request *req, __u32 magic, int count,
- int *lens, char **bufs)
+ __u32 *lens, char **bufs)
{
- int size[] = { sizeof(struct ptlrpc_body) };
+ __u32 size[] = { sizeof(struct ptlrpc_body) };
if (!lens) {
LASSERT(count == 1);
}
int lustre_pack_reply_v2(struct ptlrpc_request *req, int count,
- int *lens, char **bufs, int flags)
+ __u32 *lens, char **bufs, int flags)
{
struct ptlrpc_reply_state *rs;
int msg_len, rc;
}
EXPORT_SYMBOL(lustre_pack_reply_v2);
-int lustre_pack_reply_flags(struct ptlrpc_request *req, int count, int *lens,
+int lustre_pack_reply_flags(struct ptlrpc_request *req, int count, __u32 *lens,
char **bufs, int flags)
{
int rc = 0;
- int size[] = { sizeof(struct ptlrpc_body) };
+ __u32 size[] = { sizeof(struct ptlrpc_body) };
if (!lens) {
LASSERT(count == 1);
return rc;
}
-int lustre_pack_reply(struct ptlrpc_request *req, int count, int *lens,
+int lustre_pack_reply(struct ptlrpc_request *req, int count, __u32 *lens,
char **bufs)
{
return lustre_pack_reply_flags(req, count, lens, bufs, 0);
memcpy(newpos, tail, tail_len);
}
out:
- return lustre_msg_size_v2(msg->lm_bufcount, (int *)msg->lm_buflens);
+ return lustre_msg_size_v2(msg->lm_bufcount, msg->lm_buflens);
}
/*
struct ptlrpc_body *pb;
pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
- return crc32_le(~(__u32)0, (char *)pb, sizeof(*pb));
+ return crc32_le(~(__u32)0, (unsigned char *)pb, sizeof(*pb));
}
default:
CERROR("incorrect message magic: %08x\n", msg->lm_magic);
req->rq_reqmsg->lm_repsize = req->rq_replen;
}
-void ptlrpc_req_set_repsize(struct ptlrpc_request *req, int count, int *lens)
+void ptlrpc_req_set_repsize(struct ptlrpc_request *req, int count, __u32 *lens)
{
req->rq_replen = lustre_msg_size(req->rq_reqmsg->lm_magic, count, lens);
if (req->rq_reqmsg->lm_magic == LUSTRE_MSG_MAGIC_V2)