]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - fs/nfsd/xdr.h
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
{
32 struct nfsd_writeargs
{
39 struct nfsd_createargs
{
46 struct nfsd_renameargs
{
55 struct nfsd_linkargs
{
62 struct nfsd_symlinkargs
{
72 struct nfsd_readdirargs
{
82 struct nfsd_attrstat
{
88 struct nfsd_diropres
{
94 struct nfsd_readlinkres
{
106 struct nfsd_readdirres
{
111 struct readdir_cd common
;
117 struct nfsd_statfsres
{
119 struct kstatfs stats
;
123 * Storage requirements for XDR arguments and results.
125 union nfsd_xdrstore
{
126 struct nfsd_sattrargs sattr
;
127 struct nfsd_diropargs dirop
;
128 struct nfsd_readargs read
;
129 struct nfsd_writeargs write
;
130 struct nfsd_createargs create
;
131 struct nfsd_renameargs rename
;
132 struct nfsd_linkargs link
;
133 struct nfsd_symlinkargs symlink
;
134 struct nfsd_readdirargs readdir
;
137 #define NFS2_SVC_XDRSIZE sizeof(union nfsd_xdrstore)
140 int nfssvc_decode_fhandleargs(struct svc_rqst
*, __be32
*);
141 int nfssvc_decode_sattrargs(struct svc_rqst
*, __be32
*);
142 int nfssvc_decode_diropargs(struct svc_rqst
*, __be32
*);
143 int nfssvc_decode_readargs(struct svc_rqst
*, __be32
*);
144 int nfssvc_decode_writeargs(struct svc_rqst
*, __be32
*);
145 int nfssvc_decode_createargs(struct svc_rqst
*, __be32
*);
146 int nfssvc_decode_renameargs(struct svc_rqst
*, __be32
*);
147 int nfssvc_decode_linkargs(struct svc_rqst
*, __be32
*);
148 int nfssvc_decode_symlinkargs(struct svc_rqst
*, __be32
*);
149 int nfssvc_decode_readdirargs(struct svc_rqst
*, __be32
*);
150 int nfssvc_encode_stat(struct svc_rqst
*, __be32
*);
151 int nfssvc_encode_attrstat(struct svc_rqst
*, __be32
*);
152 int nfssvc_encode_diropres(struct svc_rqst
*, __be32
*);
153 int nfssvc_encode_readlinkres(struct svc_rqst
*, __be32
*);
154 int nfssvc_encode_readres(struct svc_rqst
*, __be32
*);
155 int nfssvc_encode_statfsres(struct svc_rqst
*, __be32
*);
156 int nfssvc_encode_readdirres(struct svc_rqst
*, __be32
*);
158 int nfssvc_encode_entry(void *, const char *name
,
159 int namlen
, loff_t offset
, u64 ino
, unsigned int);
161 void nfssvc_release_attrstat(struct svc_rqst
*rqstp
);
162 void nfssvc_release_diropres(struct svc_rqst
*rqstp
);
163 void nfssvc_release_readres(struct svc_rqst
*rqstp
);
165 /* Helper functions for NFSv2 ACL code */
166 __be32
*nfs2svc_encode_fattr(struct svc_rqst
*rqstp
, __be32
*p
, struct svc_fh
*fhp
, struct kstat
*stat
);
167 __be32
*nfs2svc_decode_fh(__be32
*p
, struct svc_fh
*fhp
);
169 #endif /* LINUX_NFSD_H */