From: Linus Torvalds <torvalds@transmeta.com>
To: maxk@chinook.stanford.edu, linux-kernel@vger.kernel.org
Subject: Re: 2.4.9-pre1 NFS problem
Date: Mon, 13 Aug 2001 12:33:45 -0700 [thread overview]
Message-ID: <200108131933.f7DJXjX20270@penguin.transmeta.com> (raw)
In-Reply-To: <20010813114636.A4641@chinook.stanford.edu>
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);
next prev parent reply other threads:[~2001-08-13 19:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-13 18:46 Max Kamenetsky
2001-08-13 19:33 ` Linus Torvalds [this message]
2001-08-14 4:33 ` Max Kamenetsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200108131933.f7DJXjX20270@penguin.transmeta.com \
--to=torvalds@transmeta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maxk@chinook.stanford.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®