summaryrefslogtreecommitdiff
path: root/fs/nfsd/xdr.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2020-11-14 13:45:35 -0500
committerChuck Lever <chuck.lever@oracle.com>2021-03-22 10:18:59 -0400
commitf5dcccd647da513a89f3b6ca392b0c1eb050b9fc (patch)
tree7d0b103e181c3380e09383681fb444b82e14b2ea /fs/nfsd/xdr.h
parent94c8f8c682a6497af7ea71351b18f637c6337d42 (diff)
NFSD: Update the NFSv2 READDIR entry encoder to use struct xdr_stream
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/xdr.h')
-rw-r--r--fs/nfsd/xdr.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfsd/xdr.h b/fs/nfsd/xdr.h
index 69a6efc71ecb..082f262a1bf9 100644
--- a/fs/nfsd/xdr.h
+++ b/fs/nfsd/xdr.h
@@ -106,15 +106,20 @@ struct nfsd_readres {
};
struct nfsd_readdirres {
+ /* Components of the reply */
__be32 status;
int count;
+ /* Used to encode the reply's entry list */
+ struct xdr_stream xdr;
+ struct xdr_buf dirlist;
struct readdir_cd common;
__be32 * buffer;
int buflen;
__be32 * offset;
struct page *page;
+ unsigned int cookie_offset;
};
struct nfsd_statfsres {
@@ -159,6 +164,8 @@ int nfssvc_encode_statfsres(struct svc_rqst *, __be32 *);
int nfssvc_encode_readdirres(struct svc_rqst *, __be32 *);
void nfssvc_encode_nfscookie(struct nfsd_readdirres *resp, u32 offset);
+int nfs2svc_encode_entry(void *data, const char *name, int namlen,
+ loff_t offset, u64 ino, unsigned int d_type);
int nfssvc_encode_entry(void *, const char *name,
int namlen, loff_t offset, u64 ino, unsigned int);