From: "H . J . Lu" <hjl@valinux.com>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: NFS maillist <nfs@lists.sourceforge.net>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [NFS] Updated patch for the [2.4.x] NFS 'missing directory entry a.k.a. IRIX server' problem...
Date: Tue, 27 Feb 2001 15:04:32 -0800 [thread overview]
Message-ID: <20010227150432.A18066@valinux.com> (raw)
In-Reply-To: <14997.9938.106305.635202@charged.uio.no>
In-Reply-To: <14997.9938.106305.635202@charged.uio.no>; from trond.myklebust@fys.uio.no on Thu, Feb 22, 2001 at 03:48:50PM +0100
On Thu, Feb 22, 2001 at 03:48:50PM +0100, Trond Myklebust wrote:
>
> The above fixes should ensure that all cookies taking values between 0
> and (2^32-1) on the NFS server are preserved through the 32-bit VFS
> interface, and are accepted by glibc as valid entries. It should also
> work fine with existing 64-bit architectures.
>
> Please could people give this a try, and report if it fixes the
> problems.
Have you tried it against a Linux NFS V3 server? When I log in
with my home directory mounted from a Linux NFS V3 server, I
got kernel oops when I do
# cat /proc/mounts
I think the problem may be cookie transform thing.
> --- linux-2.4.2-fh_align/fs/nfs/nfs3xdr.c Fri Feb 9 20:29:44 2001
> +++ linux-2.4.2-dir/fs/nfs/nfs3xdr.c Thu Feb 22 10:47:49 2001
> @@ -523,6 +523,13 @@
> return 0;
> }
>
> +/* Hack to sign-extending 32-bit cookies */
> +static inline
> +u64 nfs_transform_cookie64(u64 cookie)
> +{
> + return (cookie & 0x80000000) ? (cookie ^ 0xFFFFFFFF00000000) : cookie;
> +}
> +
> /*
> * Encode arguments to readdir call
> */
> @@ -533,7 +540,7 @@
> int buflen, replen;
>
> p = xdr_encode_fhandle(p, args->fh);
> - p = xdr_encode_hyper(p, args->cookie);
> + p = xdr_encode_hyper(p, nfs_transform_cookie64(args->cookie));
> *p++ = args->verf[0];
> *p++ = args->verf[1];
> if (args->plus) {
> @@ -635,6 +642,7 @@
> nfs3_decode_dirent(u32 *p, struct nfs_entry *entry, int plus)
> {
> struct nfs_entry old = *entry;
> + u64 cookie;
>
> if (!*p++) {
> if (!*p)
> @@ -648,7 +656,8 @@
> entry->name = (const char *) p;
> p += XDR_QUADLEN(entry->len);
> entry->prev_cookie = entry->cookie;
> - p = xdr_decode_hyper(p, &entry->cookie);
> + p = xdr_decode_hyper(p, cookie);
> + entry->cookie = nfs_transform_cookie64(cookie);
I don't understand this. As far as I can tell, "cookie" is not
initialized at all. Even if it is initialized, what does
p = xdr_decode_hyper(p, cookie);
do?
H.J.
next prev parent reply other threads:[~2001-02-27 23:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-22 14:48 Updated patch for the [2.4.x] NFS 'missing directory entry a.k.a. IRIX server' problem Trond Myklebust
2001-02-26 23:28 ` [NFS] " H . J . Lu
2001-02-27 6:57 ` Trond Myklebust
2001-02-27 7:06 ` H . J . Lu
2001-02-27 7:41 ` Trond Myklebust
2001-02-27 19:12 ` Jamie Lokier
2001-02-27 23:04 ` H . J . Lu [this message]
2001-02-27 23:24 ` H . J . Lu
2001-02-28 11:19 ` Trond Myklebust
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=20010227150432.A18066@valinux.com \
--to=hjl@valinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nfs@lists.sourceforge.net \
--cc=trond.myklebust@fys.uio.no \
/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;
as well as URLs for NNTP newsgroup(s).