diff options
author | NeilBrown <neilb@suse.de> | 2009-03-11 14:10:23 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-03-11 14:10:23 -0400 |
commit | 37d9d76d8b3a2ac5817e1fa3263cfe0fdb439e51 (patch) | |
tree | ccbf57ce8f85ad8277838c50f723cbe79950eebc /Makefile | |
parent | 2b57dc6cf9bf31edc0df430ea18dd1dbd3028975 (diff) | |
download | blackbird-op-linux-37d9d76d8b3a2ac5817e1fa3263cfe0fdb439e51.tar.gz blackbird-op-linux-37d9d76d8b3a2ac5817e1fa3263cfe0fdb439e51.zip |
NFS: flush cached directory information slightly more readily.
If cached directory contents becomes incorrect, there is no way to
flush the contents. This contrasts with files where file locking is
the recommended way to ensure cache consistency between multiple
applications (a read-lock always flushes the cache).
Also while changes to files often change the size of the file (thus
triggering a cache flush), changes to directories often do not change
the apparent size (as the size is often rounded to a block size).
So it is particularly important with directories to avoid the
possibility of an incorrect cache wherever possible.
When the link count on a directory changes it implies a change in the
number of child directories, and so a change in the contents of this
directory. So use that as a trigger to flush cached contents.
When the ctime changes but the mtime does not, there are two possible
reasons.
1/ The owner/mode information has been changed.
2/ utimes has been used to set the mtime backwards.
In the first case, a data-cache flush is not required.
In the second case it is.
So on the basis that correctness trumps performance, flush the
directory contents cache in this case also.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions