*
* Kendrick Smith <kmsmith@umich.edu>
* Andy Adamson <andros@umich.edu>
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
#define NFS4_MAXTAGLEN 0
#endif
-/* lock,open owner id:
+/* lock,open owner id:
* we currently use size 2 (u64) out of (NFS4_OPAQUE_LIMIT >> 2)
*/
#define open_owner_id_maxsz (1 + 4)
bmval1 |= FATTR4_WORD1_TIME_MODIFY_SET;
WRITE32(NFS4_SET_TO_SERVER_TIME);
}
-
+
/*
* Now we backfill the bitmap and the attribute buffer length.
*/
RESERVE_SPACE(8);
WRITE32(OP_ACCESS);
WRITE32(access);
-
+
return 0;
}
WRITE32(OP_CLOSE);
WRITE32(arg->seqid->sequence->counter);
WRITEMEM(arg->stateid->data, NFS4_STATEID_SIZE);
-
+
return 0;
}
static int encode_commit(struct xdr_stream *xdr, const struct nfs_writeargs *args)
{
__be32 *p;
-
+
RESERVE_SPACE(16);
WRITE32(OP_COMMIT);
WRITE64(args->offset);
static int encode_create(struct xdr_stream *xdr, const struct nfs4_create_arg *create)
{
__be32 *p;
-
+
RESERVE_SPACE(8);
WRITE32(OP_CREATE);
WRITE32(create->ftype);
WRITE32(OP_LINK);
WRITE32(name->len);
WRITEMEM(name->name, name->len);
-
+
return 0;
}
static int encode_putrootfh(struct xdr_stream *xdr)
{
__be32 *p;
-
+
RESERVE_SPACE(4);
WRITE32(OP_PUTROOTFH);
WRITE32(OP_RENAME);
WRITE32(oldname->len);
WRITEMEM(oldname->name, oldname->len);
-
+
RESERVE_SPACE(4 + newname->len);
WRITE32(newname->len);
WRITEMEM(newname->name, newname->len);
{
int status;
__be32 *p;
-
+
RESERVE_SPACE(4+NFS4_STATEID_SIZE);
WRITE32(OP_SETATTR);
WRITEMEM(arg->stateid.data, NFS4_STATEID_SIZE);
READ_BUF(8);
READ32(hdr->status);
READ32(hdr->taglen);
-
+
READ_BUF(hdr->taglen + 4);
hdr->tag = (char *)p;
p += XDR_QUADLEN(hdr->taglen);
static int decode_server_caps(struct xdr_stream *xdr, struct nfs4_server_caps_res *res)
{
__be32 *savep;
- uint32_t attrlen,
- bitmap[2] = {0};
+ uint32_t attrlen, bitmap[2] = {0};
int status;
if ((status = decode_op_hdr(xdr, OP_GETATTR)) != 0)
dprintk("%s: xdr returned %d!\n", __func__, -status);
return status;
}
-
+
static int decode_statfs(struct xdr_stream *xdr, struct nfs_fsstat *fsstat)
{
__be32 *savep;
- uint32_t attrlen,
- bitmap[2] = {0};
+ uint32_t attrlen, bitmap[2] = {0};
int status;
-
+
if ((status = decode_op_hdr(xdr, OP_GETATTR)) != 0)
goto xdr_error;
if ((status = decode_attr_bitmap(xdr, bitmap)) != 0)
static int decode_pathconf(struct xdr_stream *xdr, struct nfs_pathconf *pathconf)
{
__be32 *savep;
- uint32_t attrlen,
- bitmap[2] = {0};
+ uint32_t attrlen, bitmap[2] = {0};
int status;
-
+
if ((status = decode_op_hdr(xdr, OP_GETATTR)) != 0)
goto xdr_error;
if ((status = decode_attr_bitmap(xdr, bitmap)) != 0)
static int decode_link(struct xdr_stream *xdr, struct nfs4_change_info *cinfo)
{
int status;
-
+
status = decode_op_hdr(xdr, OP_LINK);
if (status)
return status;
dprintk("NFS: readdir reply truncated!\n");
entry[1] = 1;
}
-out:
+out:
kunmap_atomic(kaddr, KM_USER0);
return 0;
short_pkt:
uint32_t bmlen;
int status;
-
status = decode_op_hdr(xdr, OP_SETATTR);
if (status)
return status;
READ32(opnum);
if (opnum != OP_SETCLIENTID) {
dprintk("nfs: decode_setclientid: Server returned operation"
- " %d\n", opnum);
+ " %d\n", opnum);
return -EIO;
}
READ32(nfserr);
struct xdr_stream xdr;
struct compound_hdr hdr;
int status;
-
+
xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
if ((status = decode_compound_hdr(&xdr, &hdr)) != 0)
goto out;
struct xdr_stream xdr;
struct compound_hdr hdr;
int status;
-
+
xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
if ((status = decode_compound_hdr(&xdr, &hdr)) != 0)
goto out;
struct xdr_stream xdr;
struct compound_hdr hdr;
int status;
-
+
xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
if ((status = decode_compound_hdr(&xdr, &hdr)) != 0)
goto out;
struct xdr_stream xdr;
struct compound_hdr hdr;
int status;
-
+
xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
if ((status = decode_compound_hdr(&xdr, &hdr)) != 0)
goto out;
struct xdr_stream xdr;
struct compound_hdr hdr;
int status;
-
+
xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
if ((status = decode_compound_hdr(&xdr, &hdr)) != 0)
goto out;
struct xdr_stream xdr;
struct compound_hdr hdr;
int status;
-
+
xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
if ((status = decode_compound_hdr(&xdr, &hdr)) != 0)
goto out;
struct xdr_stream xdr;
struct compound_hdr hdr;
int status;
-
+
xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
if ((status = decode_compound_hdr(&xdr, &hdr)) != 0)
goto out;
struct xdr_stream xdr;
struct compound_hdr hdr;
int status;
-
+
xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
status = decode_compound_hdr(&xdr, &hdr);
if (status)