[lkml]   [1996]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: NFS still has caching problem
On Sat, 13 Jul 1996, Linus Torvalds wrote:

> Note that the "mtime" field is only tested when the NFS cache times out,
> because we don't want to invalidate the cache when we write to the file
> ourselves (*). The _size_ is checked a lot more often, because we can
> always compare the size of the local file and the size on the server.
> (*) We can't compare local mtime and server mtime for the simple reason
> that they are different things - local and server time need not be
> synchronized at all. Trying to make any decisions based on local and
> server times leads to all kinds of problems, including _never_ timing
> out the cache (very bad indeed), or timing out for no reason.
> If you take a look at how Linux NFS checks the "mtime", you'll notice
> that it never checks the local mtime against the server-reported mtime;
> "revalidate_inode()" checks the NFS_OLDMTIME against the server-reported
> mtime (and NFS_OLDMTIME is in "server time" rather than "local time").

Hmm, as long as the old server mtime, and the local mtime are the same,
we could check that the server's mtime against it's old mtime (ie we
havn't changed the file, so the server is posably more up to date than
the local cache, and we want to make sure noone else has changed it either).

or in proto code:

} else {

> Linus
PGP key pass phrase forgotten, \ Overload -- core meltdown sequence
again :( | initiated.
/ This space is intentionally left
| blank, apart from this text ;-)

 \ /
  Last update: 2005-03-22 13:38    [W:0.061 / U:2.348 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site