linux/fs/nfs
Peter Staubach 64672d55d9 optimize attribute timeouts for "noac" and "actimeo=0"
Hi.

I've been looking at a bugzilla which describes a problem where
a customer was advised to use either the "noac" or "actimeo=0"
mount options to solve a consistency problem that they were
seeing in the file attributes.  It turned out that this solution
did not work reliably for them because sometimes, the local
attribute cache was believed to be valid and not timed out.
(With an attribute cache timeout of 0, the cache should always
appear to be timed out.)

In looking at this situation, it appears to me that the problem
is that the attribute cache timeout code has an off-by-one
error in it.  It is assuming that the cache is valid in the
region, [read_cache_jiffies, read_cache_jiffies + attrtimeo].  The
cache should be considered valid only in the region,
[read_cache_jiffies, read_cache_jiffies + attrtimeo).  With this
change, the options, "noac" and "actimeo=0", work as originally
expected.

This problem was previously addressed by special casing the
attrtimeo == 0 case.  However, since the problem is only an off-
by-one error, the cleaner solution is address the off-by-one
error and thus, not require the special case.

    Thanx...

        ps

Signed-off-by: Peter Staubach <staubach@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2008-12-23 15:21:56 -05:00
..
callback_proc.c nfs: replace remaining __FUNCTION__ occurrences 2008-05-16 09:43:29 -07:00
callback_xdr.c nfs: replace remaining __FUNCTION__ occurrences 2008-05-16 09:43:29 -07:00
callback.c NFS: Enable NFSv4 callback server to listen on AF_INET6 sockets 2008-10-17 13:06:41 -04:00
callback.h NFS: Change cb_recallargs to pass "struct sockaddr *" instead of sockaddr_in 2008-01-30 02:05:55 -05:00
client.c NFSv4: Fix up delegation callbacks 2008-12-23 15:21:53 -05:00
delegation.c NFSv4: Convert delegation->type field to fmode_t 2008-12-23 15:21:53 -05:00
delegation.h NFSv4: Convert delegation->type field to fmode_t 2008-12-23 15:21:53 -05:00
dir.c optimize attribute timeouts for "noac" and "actimeo=0" 2008-12-23 15:21:56 -05:00
direct.c NFS: Use NFSDBG_FILE for all fops 2008-07-09 12:09:04 -04:00
file.c nfs: remove an obsolete nfs_flock comment 2008-10-07 18:16:21 -04:00
getroot.c [PATCH] switch all filesystems over to d_obtain_alias 2008-10-23 05:13:01 -04:00
idmap.c nfs: fix sparse warnings 2008-02-20 16:15:44 -05:00
inode.c optimize attribute timeouts for "noac" and "actimeo=0" 2008-12-23 15:21:56 -05:00
internal.h NFS: "[no]resvport" mount option changes mountd client too 2008-12-23 15:21:37 -05:00
iostat.h NFS: Fix a warning in nfs4_async_handle_error 2008-07-09 12:09:18 -04:00
Makefile NFS: Always enable NFS direct I/O 2008-03-19 18:00:34 -04:00
mount_clnt.c NFS: "[no]resvport" mount option changes mountd client too 2008-12-23 15:21:37 -05:00
namespace.c nfs: BUG_ON in nfs_follow_mountpoint 2008-10-07 18:15:16 -04:00
nfs2xdr.c nfs: return negative error value from nfs{,4}_stat_to_errno 2008-04-19 16:54:47 -04:00
nfs3acl.c NFS: missing nfs_fattr_init in nfs3_proc_getacl and nfs3_proc_setacls (resend #2) 2008-10-07 18:16:22 -04:00
nfs3proc.c nfs: authenticated deep mounting 2008-10-07 18:16:22 -04:00
nfs3xdr.c nfs: return negative error value from nfs{,4}_stat_to_errno 2008-04-19 16:54:47 -04:00
nfs4_fs.h NFSv4: Convert the open and close ops to use fmode 2008-12-23 15:21:56 -05:00
nfs4namespace.c nfs: Fix misparsing of nfsv4 fs_locations attribute 2008-10-07 18:17:47 -04:00
nfs4proc.c NFSv4: Convert the open and close ops to use fmode 2008-12-23 15:21:56 -05:00
nfs4renewd.c NFSv4: Return unreferenced delegations more promptly 2008-12-23 15:21:52 -05:00
nfs4state.c NFSv4: Convert the open and close ops to use fmode 2008-12-23 15:21:56 -05:00
nfs4xdr.c NFSv4: Convert the open and close ops to use fmode 2008-12-23 15:21:56 -05:00
nfsroot.c NFS: introduce nfs_mount_info struct for calling nfs_mount() 2008-12-23 15:21:35 -05:00
pagelist.c Merge branch 'task_killable' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc 2008-02-01 11:45:47 +11:00
proc.c nfs: authenticated deep mounting 2008-10-07 18:16:22 -04:00
read.c nfs: remove redundant tests on reading new pages 2008-12-23 15:21:30 -05:00
super.c NFSv4: Clean up the support for returning multiple delegations 2008-12-23 15:21:46 -05:00
symlink.c nfs: remove unnecessary NFS_NEED_* defines 2008-04-23 16:13:37 -04:00
sysctl.c [PATCH] nfs: fix congestion control 2007-03-16 19:25:05 -07:00
unlink.c NFS: Clean up nfs_sb_active/nfs_sb_deactive 2008-10-06 20:08:26 -04:00
write.c NFS: Don't use range_cyclic for data integrity syncs 2008-10-07 18:19:05 -04:00