Re: NFS client patch for 2.1.132

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Sun, 3 Jan 1999 05:57:03 +0000


1. The call to nfs_refresh_inode looks like a very good thing.

2. I think your addition should go before `nfs_renew_times', so the
dentry will be revalidated again if there's an attribute problem.

3. I don't think you should be updating NFS_OLDMTIME or NFS_ATTRTIMEO.
File operations don't do it, and they cache just fine. The
NFS_ATTRTIMEO policy should remain in nfs_refresh_inode &
nfs_revalidate_inode.

Do you still get the `ls -Fa' performance improvement with just calling
nfs_refresh_inode?

4. If you're feeling kind, please change "remeber" to "remember" seeing
as you're there.

-- Jamie

On Mon, Dec 28, 1998 at 02:59:04PM -0500, Shantanu Goel wrote:
> The following patch against 2.1.132 does away with redundant
> GETATTR RPCs by updating the attribute cache when a LOOKUP is
> performed. This can speed up "ls -Fa" performance quite a bit.
>
> Shantanu
>
> *** fs/nfs/dir.c.~1~ Wed Dec 16 15:17:22 1998
> - --- fs/nfs/dir.c Mon Dec 28 12:21:39 1998
> ***************
> *** 439,444 ****
> - --- 439,456 ----
> /* Ok, remeber that we successfully checked it.. */
> nfs_renew_times(dentry);
>
> + /*
> + * Duplicate of nfs_revalidate_inode.
> + */
> + error = nfs_refresh_inode(inode, &fattr);
> + if (error)
> + goto out_bad;
> + if (fattr.mtime.seconds == NFS_OLDMTIME(inode)) {
> + if ((NFS_ATTRTIMEO(inode) <<= 1) > NFS_MAXATTRTIMEO(inode))
> + NFS_ATTRTIMEO(inode) = NFS_MAXATTRTIMEO(inode);
> + }
> + NFS_OLDMTIME(inode) = fattr.mtime.seconds;
> +
> out_valid:
> return 1;
> out_bad:

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/