1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* XDR types for nfsd. This is mainly a typing exercise. */
15 struct nfsd_sattrargs
{
20 struct nfsd_diropargs
{
26 struct nfsd_readargs
{
33 struct nfsd_writeargs
{
40 struct nfsd_createargs
{
47 struct nfsd_renameargs
{
56 struct nfsd_readlinkargs
{
61 struct nfsd_linkargs
{
68 struct nfsd_symlinkargs
{
78 struct nfsd_readdirargs
{
89 struct nfsd_attrstat
{
95 struct nfsd_diropres
{
101 struct nfsd_readlinkres
{
106 struct nfsd_readres
{
113 struct nfsd_readdirres
{
118 struct readdir_cd common
;
124 struct nfsd_statfsres
{
126 struct kstatfs stats
;
130 * Storage requirements for XDR arguments and results.
132 union nfsd_xdrstore
{
133 struct nfsd_sattrargs sattr
;
134 struct nfsd_diropargs dirop
;
135 struct nfsd_readargs read
;
136 struct nfsd_writeargs write
;
137 struct nfsd_createargs create
;
138 struct nfsd_renameargs rename
;
139 struct nfsd_linkargs link
;
140 struct nfsd_symlinkargs symlink
;
141 struct nfsd_readdirargs readdir
;
144 #define NFS2_SVC_XDRSIZE sizeof(union nfsd_xdrstore)
147 int nfssvc_decode_fhandle(struct svc_rqst
*, __be32
*);
148 int nfssvc_decode_sattrargs(struct svc_rqst
*, __be32
*);
149 int nfssvc_decode_diropargs(struct svc_rqst
*, __be32
*);
150 int nfssvc_decode_readargs(struct svc_rqst
*, __be32
*);
151 int nfssvc_decode_writeargs(struct svc_rqst
*, __be32
*);
152 int nfssvc_decode_createargs(struct svc_rqst
*, __be32
*);
153 int nfssvc_decode_renameargs(struct svc_rqst
*, __be32
*);
154 int nfssvc_decode_readlinkargs(struct svc_rqst
*, __be32
*);
155 int nfssvc_decode_linkargs(struct svc_rqst
*, __be32
*);
156 int nfssvc_decode_symlinkargs(struct svc_rqst
*, __be32
*);
157 int nfssvc_decode_readdirargs(struct svc_rqst
*, __be32
*);
158 int nfssvc_encode_stat(struct svc_rqst
*, __be32
*);
159 int nfssvc_encode_attrstat(struct svc_rqst
*, __be32
*);
160 int nfssvc_encode_diropres(struct svc_rqst
*, __be32
*);
161 int nfssvc_encode_readlinkres(struct svc_rqst
*, __be32
*);
162 int nfssvc_encode_readres(struct svc_rqst
*, __be32
*);
163 int nfssvc_encode_statfsres(struct svc_rqst
*, __be32
*);
164 int nfssvc_encode_readdirres(struct svc_rqst
*, __be32
*);
166 int nfssvc_encode_entry(void *, const char *name
,
167 int namlen
, loff_t offset
, u64 ino
, unsigned int);
169 void nfssvc_release_attrstat(struct svc_rqst
*rqstp
);
170 void nfssvc_release_diropres(struct svc_rqst
*rqstp
);
171 void nfssvc_release_readres(struct svc_rqst
*rqstp
);
173 /* Helper functions for NFSv2 ACL code */
174 __be32
*nfs2svc_encode_fattr(struct svc_rqst
*rqstp
, __be32
*p
, struct svc_fh
*fhp
, struct kstat
*stat
);
175 __be32
*nfs2svc_decode_fh(__be32
*p
, struct svc_fh
*fhp
);
177 #endif /* LINUX_NFSD_H */