aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/appletalk
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-03-11 14:10:23 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-03-11 14:10:23 -0400
commit37d9d76d8b3a2ac5817e1fa3263cfe0fdb439e51 (patch)
treeccbf57ce8f85ad8277838c50f723cbe79950eebc /drivers/net/appletalk
parent2b57dc6cf9bf31edc0df430ea18dd1dbd3028975 (diff)
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 'drivers/net/appletalk')
0 files changed, 0 insertions, 0 deletions