Commit 598b9a56 authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds

[PATCH] knfsd: allow nfsd READDIR to return 64bit cookies

->readdir passes lofft_t offsets (used as nfs cookies) to
nfs3svc_encode_entry{,_plus}, but when they pass it on to encode_entry it
becomes an 'off_t', which isn't good.

So filesystems that returned 64bit offsets would lose.
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ec28297a
...@@ -859,8 +859,8 @@ compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp, ...@@ -859,8 +859,8 @@ compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp,
#define NFS3_ENTRY_BAGGAGE (2 + 1 + 2 + 1) #define NFS3_ENTRY_BAGGAGE (2 + 1 + 2 + 1)
#define NFS3_ENTRYPLUS_BAGGAGE (1 + 21 + 1 + (NFS3_FHSIZE >> 2)) #define NFS3_ENTRYPLUS_BAGGAGE (1 + 21 + 1 + (NFS3_FHSIZE >> 2))
static int static int
encode_entry(struct readdir_cd *ccd, const char *name, encode_entry(struct readdir_cd *ccd, const char *name, int namlen,
int namlen, off_t offset, ino_t ino, unsigned int d_type, int plus) loff_t offset, ino_t ino, unsigned int d_type, int plus)
{ {
struct nfsd3_readdirres *cd = container_of(ccd, struct nfsd3_readdirres, struct nfsd3_readdirres *cd = container_of(ccd, struct nfsd3_readdirres,
common); common);
...@@ -880,7 +880,7 @@ encode_entry(struct readdir_cd *ccd, const char *name, ...@@ -880,7 +880,7 @@ encode_entry(struct readdir_cd *ccd, const char *name,
*cd->offset1 = htonl(offset64 & 0xffffffff); *cd->offset1 = htonl(offset64 & 0xffffffff);
cd->offset1 = NULL; cd->offset1 = NULL;
} else { } else {
xdr_encode_hyper(cd->offset, (u64) offset); xdr_encode_hyper(cd->offset, offset64);
} }
} }
......
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