Messages in this thread Patch in this message |  | | From | Linus Torvalds <> | Date | Mon, 13 Aug 2001 12:33:45 -0700 | Subject | Re: 2.4.9-pre1 NFS problem |
| |
In article <20010813114636.A4641@chinook.stanford.edu> you write: > >It looks like 2.4.9-pre1 breaks the NFS server. Directories still get >exported and clients can mount them fine, but the ls command on the >client fails to report any files. Filename completion also doesn't >work. However, files can still be viewed if you know the exact file >name.
Yes, there's a missing off_t -> loff_t change in pre1, and the compile will even warn about it...
>The same problem happens with 2.4.9-pre2.
..but I thought I fixed it in pre2.
HOWEVER - there are a few others that I missed because the NFSD layer is doing ugly casts of function pointers (don't ask me why - it should have the right type in 'filldir_t' already but wants to use its own type), so the compiler can't warn about it.
Let's hear it for type safety and avoiding ugly casts.
Anyway, here's the patch - does this fix it for you?
Linus
----- diff -u --recursive --new-file pre2/linux/fs/nfsd/nfs3xdr.c linux/fs/nfsd/nfs3xdr.c --- pre2/linux/fs/nfsd/nfs3xdr.c Sun Aug 12 23:12:33 2001 +++ linux/fs/nfsd/nfs3xdr.c Mon Aug 13 12:22:57 2001 @@ -730,14 +730,14 @@ int nfs3svc_encode_entry(struct readdir_cd *cd, const char *name, - int namlen, off_t offset, ino_t ino, unsigned int d_type) + int namlen, loff_t offset, ino_t ino, unsigned int d_type) { return encode_entry(cd, name, namlen, offset, ino, d_type, 0); } int nfs3svc_encode_entry_plus(struct readdir_cd *cd, const char *name, - int namlen, off_t offset, ino_t ino, unsigned int d_type) + int namlen, loff_t offset, ino_t ino, unsigned int d_type) { return encode_entry(cd, name, namlen, offset, ino, d_type, 1); } diff -u --recursive --new-file pre2/linux/fs/nfsd/nfsxdr.c linux/fs/nfsd/nfsxdr.c --- pre2/linux/fs/nfsd/nfsxdr.c Sun Aug 12 23:12:33 2001 +++ linux/fs/nfsd/nfsxdr.c Mon Aug 13 12:23:49 2001 @@ -391,7 +391,7 @@ int nfssvc_encode_entry(struct readdir_cd *cd, const char *name, - int namlen, off_t offset, ino_t ino, unsigned int d_type) + int namlen, loff_t offset, ino_t ino, unsigned int d_type) { u32 *p = cd->buffer; int buflen, slen; diff -u --recursive --new-file pre2/linux/include/linux/nfsd/nfsd.h linux/include/linux/nfsd/nfsd.h --- pre2/linux/include/linux/nfsd/nfsd.h Fri Aug 10 18:14:31 2001 +++ linux/include/linux/nfsd/nfsd.h Mon Aug 13 12:30:35 2001 @@ -57,7 +57,7 @@ char dotonly; }; typedef int (*encode_dent_fn)(struct readdir_cd *, const char *, - int, off_t, ino_t, unsigned int); + int, loff_t, ino_t, unsigned int); typedef int (*nfsd_dirop_t)(struct inode *, struct dentry *, int, int); /* diff -u --recursive --new-file pre2/linux/include/linux/nfsd/xdr.h linux/include/linux/nfsd/xdr.h --- pre2/linux/include/linux/nfsd/xdr.h Fri Aug 10 18:15:05 2001 +++ linux/include/linux/nfsd/xdr.h Mon Aug 13 12:28:54 2001 @@ -151,7 +151,7 @@ int nfssvc_encode_readdirres(struct svc_rqst *, u32 *, struct nfsd_readdirres *); int nfssvc_encode_entry(struct readdir_cd *, const char *name, - int namlen, off_t offset, ino_t ino, unsigned int); + int namlen, loff_t offset, ino_t ino, unsigned int); int nfssvc_release_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *); diff -u --recursive --new-file pre2/linux/include/linux/nfsd/xdr3.h linux/include/linux/nfsd/xdr3.h --- pre2/linux/include/linux/nfsd/xdr3.h Fri Aug 10 18:15:17 2001 +++ linux/include/linux/nfsd/xdr3.h Mon Aug 13 12:28:54 2001 @@ -292,10 +292,10 @@ int nfs3svc_release_fhandle2(struct svc_rqst *, u32 *, struct nfsd3_fhandle_pair *); int nfs3svc_encode_entry(struct readdir_cd *, const char *name, - int namlen, off_t offset, ino_t ino, + int namlen, loff_t offset, ino_t ino, unsigned int); int nfs3svc_encode_entry_plus(struct readdir_cd *, const char *name, - int namlen, off_t offset, ino_t ino, + int namlen, loff_t offset, ino_t ino, unsigned int); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |