Commit 91f07168 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] xdr annotations: NFSv3 server

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Acked-by: default avatarTrond Myklebust <trond.myklebust@fys.uio.no>
Acked-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 131a21c2
...@@ -122,7 +122,7 @@ static __be32 nfsd3_proc_setacl(struct svc_rqst * rqstp, ...@@ -122,7 +122,7 @@ static __be32 nfsd3_proc_setacl(struct svc_rqst * rqstp,
/* /*
* XDR decode functions * XDR decode functions
*/ */
static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp, u32 *p, static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp, __be32 *p,
struct nfsd3_getaclargs *args) struct nfsd3_getaclargs *args)
{ {
if (!(p = nfs3svc_decode_fh(p, &args->fh))) if (!(p = nfs3svc_decode_fh(p, &args->fh)))
...@@ -133,7 +133,7 @@ static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp, u32 *p, ...@@ -133,7 +133,7 @@ static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp, u32 *p,
} }
static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp, u32 *p, static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p,
struct nfsd3_setaclargs *args) struct nfsd3_setaclargs *args)
{ {
struct kvec *head = rqstp->rq_arg.head; struct kvec *head = rqstp->rq_arg.head;
...@@ -163,7 +163,7 @@ static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp, u32 *p, ...@@ -163,7 +163,7 @@ static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp, u32 *p,
*/ */
/* GETACL */ /* GETACL */
static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, u32 *p, static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p,
struct nfsd3_getaclres *resp) struct nfsd3_getaclres *resp)
{ {
struct dentry *dentry = resp->fh.fh_dentry; struct dentry *dentry = resp->fh.fh_dentry;
...@@ -208,7 +208,7 @@ static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, u32 *p, ...@@ -208,7 +208,7 @@ static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, u32 *p,
} }
/* SETACL */ /* SETACL */
static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp, u32 *p, static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp, __be32 *p,
struct nfsd3_attrstat *resp) struct nfsd3_attrstat *resp)
{ {
p = nfs3svc_encode_post_op_attr(rqstp, p, &resp->fh); p = nfs3svc_encode_post_op_attr(rqstp, p, &resp->fh);
...@@ -219,7 +219,7 @@ static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp, u32 *p, ...@@ -219,7 +219,7 @@ static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp, u32 *p,
/* /*
* XDR release functions * XDR release functions
*/ */
static int nfs3svc_release_getacl(struct svc_rqst *rqstp, u32 *p, static int nfs3svc_release_getacl(struct svc_rqst *rqstp, __be32 *p,
struct nfsd3_getaclres *resp) struct nfsd3_getaclres *resp)
{ {
fh_put(&resp->fh); fh_put(&resp->fh);
......
This diff is collapsed.
...@@ -51,7 +51,7 @@ struct nfsd3_createargs { ...@@ -51,7 +51,7 @@ struct nfsd3_createargs {
int len; int len;
int createmode; int createmode;
struct iattr attrs; struct iattr attrs;
__u32 * verf; __be32 * verf;
}; };
struct nfsd3_mknodargs { struct nfsd3_mknodargs {
...@@ -98,8 +98,8 @@ struct nfsd3_readdirargs { ...@@ -98,8 +98,8 @@ struct nfsd3_readdirargs {
__u64 cookie; __u64 cookie;
__u32 dircount; __u32 dircount;
__u32 count; __u32 count;
__u32 * verf; __be32 * verf;
u32 * buffer; __be32 * buffer;
}; };
struct nfsd3_commitargs { struct nfsd3_commitargs {
...@@ -122,79 +122,79 @@ struct nfsd3_setaclargs { ...@@ -122,79 +122,79 @@ struct nfsd3_setaclargs {
}; };
struct nfsd3_attrstat { struct nfsd3_attrstat {
__u32 status; __be32 status;
struct svc_fh fh; struct svc_fh fh;
struct kstat stat; struct kstat stat;
}; };
/* LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD */ /* LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD */
struct nfsd3_diropres { struct nfsd3_diropres {
__u32 status; __be32 status;
struct svc_fh dirfh; struct svc_fh dirfh;
struct svc_fh fh; struct svc_fh fh;
}; };
struct nfsd3_accessres { struct nfsd3_accessres {
__u32 status; __be32 status;
struct svc_fh fh; struct svc_fh fh;
__u32 access; __u32 access;
}; };
struct nfsd3_readlinkres { struct nfsd3_readlinkres {
__u32 status; __be32 status;
struct svc_fh fh; struct svc_fh fh;
__u32 len; __u32 len;
}; };
struct nfsd3_readres { struct nfsd3_readres {
__u32 status; __be32 status;
struct svc_fh fh; struct svc_fh fh;
unsigned long count; unsigned long count;
int eof; int eof;
}; };
struct nfsd3_writeres { struct nfsd3_writeres {
__u32 status; __be32 status;
struct svc_fh fh; struct svc_fh fh;
unsigned long count; unsigned long count;
int committed; int committed;
}; };
struct nfsd3_renameres { struct nfsd3_renameres {
__u32 status; __be32 status;
struct svc_fh ffh; struct svc_fh ffh;
struct svc_fh tfh; struct svc_fh tfh;
}; };
struct nfsd3_linkres { struct nfsd3_linkres {
__u32 status; __be32 status;
struct svc_fh tfh; struct svc_fh tfh;
struct svc_fh fh; struct svc_fh fh;
}; };
struct nfsd3_readdirres { struct nfsd3_readdirres {
__u32 status; __be32 status;
struct svc_fh fh; struct svc_fh fh;
int count; int count;
__u32 verf[2]; __be32 verf[2];
struct readdir_cd common; struct readdir_cd common;
u32 * buffer; __be32 * buffer;
int buflen; int buflen;
u32 * offset; __be32 * offset;
u32 * offset1; __be32 * offset1;
struct svc_rqst * rqstp; struct svc_rqst * rqstp;
}; };
struct nfsd3_fsstatres { struct nfsd3_fsstatres {
__u32 status; __be32 status;
struct kstatfs stats; struct kstatfs stats;
__u32 invarsec; __u32 invarsec;
}; };
struct nfsd3_fsinfores { struct nfsd3_fsinfores {
__u32 status; __be32 status;
__u32 f_rtmax; __u32 f_rtmax;
__u32 f_rtpref; __u32 f_rtpref;
__u32 f_rtmult; __u32 f_rtmult;
...@@ -207,7 +207,7 @@ struct nfsd3_fsinfores { ...@@ -207,7 +207,7 @@ struct nfsd3_fsinfores {
}; };
struct nfsd3_pathconfres { struct nfsd3_pathconfres {
__u32 status; __be32 status;
__u32 p_link_max; __u32 p_link_max;
__u32 p_name_max; __u32 p_name_max;
__u32 p_no_trunc; __u32 p_no_trunc;
...@@ -217,12 +217,12 @@ struct nfsd3_pathconfres { ...@@ -217,12 +217,12 @@ struct nfsd3_pathconfres {
}; };
struct nfsd3_commitres { struct nfsd3_commitres {
__u32 status; __be32 status;
struct svc_fh fh; struct svc_fh fh;
}; };
struct nfsd3_getaclres { struct nfsd3_getaclres {
__u32 status; __be32 status;
struct svc_fh fh; struct svc_fh fh;
int mask; int mask;
struct posix_acl *acl_access; struct posix_acl *acl_access;
...@@ -266,70 +266,70 @@ union nfsd3_xdrstore { ...@@ -266,70 +266,70 @@ union nfsd3_xdrstore {
#define NFS3_SVC_XDRSIZE sizeof(union nfsd3_xdrstore) #define NFS3_SVC_XDRSIZE sizeof(union nfsd3_xdrstore)
int nfs3svc_decode_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *); int nfs3svc_decode_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *);
int nfs3svc_decode_sattrargs(struct svc_rqst *, u32 *, int nfs3svc_decode_sattrargs(struct svc_rqst *, __be32 *,
struct nfsd3_sattrargs *); struct nfsd3_sattrargs *);
int nfs3svc_decode_diropargs(struct svc_rqst *, u32 *, int nfs3svc_decode_diropargs(struct svc_rqst *, __be32 *,
struct nfsd3_diropargs *); struct nfsd3_diropargs *);
int nfs3svc_decode_accessargs(struct svc_rqst *, u32 *, int nfs3svc_decode_accessargs(struct svc_rqst *, __be32 *,
struct nfsd3_accessargs *); struct nfsd3_accessargs *);
int nfs3svc_decode_readargs(struct svc_rqst *, u32 *, int nfs3svc_decode_readargs(struct svc_rqst *, __be32 *,
struct nfsd3_readargs *); struct nfsd3_readargs *);
int nfs3svc_decode_writeargs(struct svc_rqst *, u32 *, int nfs3svc_decode_writeargs(struct svc_rqst *, __be32 *,
struct nfsd3_writeargs *); struct nfsd3_writeargs *);
int nfs3svc_decode_createargs(struct svc_rqst *, u32 *, int nfs3svc_decode_createargs(struct svc_rqst *, __be32 *,
struct nfsd3_createargs *); struct nfsd3_createargs *);
int nfs3svc_decode_mkdirargs(struct svc_rqst *, u32 *, int nfs3svc_decode_mkdirargs(struct svc_rqst *, __be32 *,
struct nfsd3_createargs *); struct nfsd3_createargs *);
int nfs3svc_decode_mknodargs(struct svc_rqst *, u32 *, int nfs3svc_decode_mknodargs(struct svc_rqst *, __be32 *,
struct nfsd3_mknodargs *); struct nfsd3_mknodargs *);
int nfs3svc_decode_renameargs(struct svc_rqst *, u32 *, int nfs3svc_decode_renameargs(struct svc_rqst *, __be32 *,
struct nfsd3_renameargs *); struct nfsd3_renameargs *);
int nfs3svc_decode_readlinkargs(struct svc_rqst *, u32 *, int nfs3svc_decode_readlinkargs(struct svc_rqst *, __be32 *,
struct nfsd3_readlinkargs *); struct nfsd3_readlinkargs *);
int nfs3svc_decode_linkargs(struct svc_rqst *, u32 *, int nfs3svc_decode_linkargs(struct svc_rqst *, __be32 *,
struct nfsd3_linkargs *); struct nfsd3_linkargs *);
int nfs3svc_decode_symlinkargs(struct svc_rqst *, u32 *, int nfs3svc_decode_symlinkargs(struct svc_rqst *, __be32 *,
struct nfsd3_symlinkargs *); struct nfsd3_symlinkargs *);
int nfs3svc_decode_readdirargs(struct svc_rqst *, u32 *, int nfs3svc_decode_readdirargs(struct svc_rqst *, __be32 *,
struct nfsd3_readdirargs *); struct nfsd3_readdirargs *);
int nfs3svc_decode_readdirplusargs(struct svc_rqst *, u32 *, int nfs3svc_decode_readdirplusargs(struct svc_rqst *, __be32 *,
struct nfsd3_readdirargs *); struct nfsd3_readdirargs *);
int nfs3svc_decode_commitargs(struct svc_rqst *, u32 *, int nfs3svc_decode_commitargs(struct svc_rqst *, __be32 *,
struct nfsd3_commitargs *); struct nfsd3_commitargs *);
int nfs3svc_encode_voidres(struct svc_rqst *, u32 *, void *); int nfs3svc_encode_voidres(struct svc_rqst *, __be32 *, void *);
int nfs3svc_encode_attrstat(struct svc_rqst *, u32 *, int nfs3svc_encode_attrstat(struct svc_rqst *, __be32 *,
struct nfsd3_attrstat *); struct nfsd3_attrstat *);
int nfs3svc_encode_wccstat(struct svc_rqst *, u32 *, int nfs3svc_encode_wccstat(struct svc_rqst *, __be32 *,
struct nfsd3_attrstat *); struct nfsd3_attrstat *);
int nfs3svc_encode_diropres(struct svc_rqst *, u32 *, int nfs3svc_encode_diropres(struct svc_rqst *, __be32 *,
struct nfsd3_diropres *); struct nfsd3_diropres *);
int nfs3svc_encode_accessres(struct svc_rqst *, u32 *, int nfs3svc_encode_accessres(struct svc_rqst *, __be32 *,
struct nfsd3_accessres *); struct nfsd3_accessres *);
int nfs3svc_encode_readlinkres(struct svc_rqst *, u32 *, int nfs3svc_encode_readlinkres(struct svc_rqst *, __be32 *,
struct nfsd3_readlinkres *); struct nfsd3_readlinkres *);
int nfs3svc_encode_readres(struct svc_rqst *, u32 *, struct nfsd3_readres *); int nfs3svc_encode_readres(struct svc_rqst *, __be32 *, struct nfsd3_readres *);
int nfs3svc_encode_writeres(struct svc_rqst *, u32 *, struct nfsd3_writeres *); int nfs3svc_encode_writeres(struct svc_rqst *, __be32 *, struct nfsd3_writeres *);
int nfs3svc_encode_createres(struct svc_rqst *, u32 *, int nfs3svc_encode_createres(struct svc_rqst *, __be32 *,
struct nfsd3_diropres *); struct nfsd3_diropres *);
int nfs3svc_encode_renameres(struct svc_rqst *, u32 *, int nfs3svc_encode_renameres(struct svc_rqst *, __be32 *,
struct nfsd3_renameres *); struct nfsd3_renameres *);
int nfs3svc_encode_linkres(struct svc_rqst *, u32 *, int nfs3svc_encode_linkres(struct svc_rqst *, __be32 *,
struct nfsd3_linkres *); struct nfsd3_linkres *);
int nfs3svc_encode_readdirres(struct svc_rqst *, u32 *, int nfs3svc_encode_readdirres(struct svc_rqst *, __be32 *,
struct nfsd3_readdirres *); struct nfsd3_readdirres *);
int nfs3svc_encode_fsstatres(struct svc_rqst *, u32 *, int nfs3svc_encode_fsstatres(struct svc_rqst *, __be32 *,
struct nfsd3_fsstatres *); struct nfsd3_fsstatres *);
int nfs3svc_encode_fsinfores(struct svc_rqst *, u32 *, int nfs3svc_encode_fsinfores(struct svc_rqst *, __be32 *,
struct nfsd3_fsinfores *); struct nfsd3_fsinfores *);
int nfs3svc_encode_pathconfres(struct svc_rqst *, u32 *, int nfs3svc_encode_pathconfres(struct svc_rqst *, __be32 *,
struct nfsd3_pathconfres *); struct nfsd3_pathconfres *);
int nfs3svc_encode_commitres(struct svc_rqst *, u32 *, int nfs3svc_encode_commitres(struct svc_rqst *, __be32 *,
struct nfsd3_commitres *); struct nfsd3_commitres *);
int nfs3svc_release_fhandle(struct svc_rqst *, u32 *, int nfs3svc_release_fhandle(struct svc_rqst *, __be32 *,
struct nfsd3_attrstat *); struct nfsd3_attrstat *);
int nfs3svc_release_fhandle2(struct svc_rqst *, u32 *, int nfs3svc_release_fhandle2(struct svc_rqst *, __be32 *,
struct nfsd3_fhandle_pair *); struct nfsd3_fhandle_pair *);
int nfs3svc_encode_entry(struct readdir_cd *, const char *name, int nfs3svc_encode_entry(struct readdir_cd *, const char *name,
int namlen, loff_t offset, ino_t ino, int namlen, loff_t offset, ino_t ino,
...@@ -338,9 +338,9 @@ int nfs3svc_encode_entry_plus(struct readdir_cd *, const char *name, ...@@ -338,9 +338,9 @@ int nfs3svc_encode_entry_plus(struct readdir_cd *, const char *name,
int namlen, loff_t offset, ino_t ino, int namlen, loff_t offset, ino_t ino,
unsigned int); unsigned int);
/* Helper functions for NFSv3 ACL code */ /* Helper functions for NFSv3 ACL code */
u32 *nfs3svc_encode_post_op_attr(struct svc_rqst *rqstp, u32 *p, __be32 *nfs3svc_encode_post_op_attr(struct svc_rqst *rqstp, __be32 *p,
struct svc_fh *fhp); struct svc_fh *fhp);
u32 *nfs3svc_decode_fh(u32 *p, struct svc_fh *fhp); __be32 *nfs3svc_decode_fh(__be32 *p, struct svc_fh *fhp);
#endif /* _LINUX_NFSD_XDR3_H */ #endif /* _LINUX_NFSD_XDR3_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment