diff options
author | Ricardo Labiaga <Ricardo.Labiaga@netapp.com> | 2010-10-12 19:30:05 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-10-24 17:59:56 -0400 |
commit | 6b96724e507fecc3e6440e86426fe4f44359ed66 (patch) | |
tree | 5b38131405301f4dd536a11f44ff0d5e6785d266 /include | |
parent | 118df3d17f11733b294ea2cd988d56ee376ef9fd (diff) |
Revalidate caches on lock
Instead of blindly zapping the caches, attempt to revalidate them if
the server has indicated that it uses high resolution timestamps.
NFSv4 should be able to always revalidate the cache since the
protocol requires the update of the change attribute on modification of
the data. In reality, there are servers (the Linux NFS server
for example) that do not obey this requirement and use ctime as the
basis for change attribute. Long term, the server needs to be fixed.
At this time, and to be on the safe side, continue zapping caches if
the server indicates that it does not have a high resolution timestamp.
Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nfs_fs_sb.h | 1 | ||||
-rw-r--r-- | include/linux/nfs_xdr.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index c82ee7cd6288..5eef862ec187 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -124,6 +124,7 @@ struct nfs_server { | |||
124 | 124 | ||
125 | struct nfs_fsid fsid; | 125 | struct nfs_fsid fsid; |
126 | __u64 maxfilesize; /* maximum file size */ | 126 | __u64 maxfilesize; /* maximum file size */ |
127 | struct timespec time_delta; /* smallest time granularity */ | ||
127 | unsigned long mount_time; /* when this fs was mounted */ | 128 | unsigned long mount_time; /* when this fs was mounted */ |
128 | dev_t s_dev; /* superblock dev numbers */ | 129 | dev_t s_dev; /* superblock dev numbers */ |
129 | 130 | ||
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index efe2eab8ac94..da7a1300dc60 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -112,6 +112,7 @@ struct nfs_fsinfo { | |||
112 | __u32 wtmult; /* writes should be multiple of this */ | 112 | __u32 wtmult; /* writes should be multiple of this */ |
113 | __u32 dtpref; /* pref. readdir transfer size */ | 113 | __u32 dtpref; /* pref. readdir transfer size */ |
114 | __u64 maxfilesize; | 114 | __u64 maxfilesize; |
115 | struct timespec time_delta; /* server time granularity */ | ||
115 | __u32 lease_time; /* in seconds */ | 116 | __u32 lease_time; /* in seconds */ |
116 | }; | 117 | }; |
117 | 118 | ||