diff options
author | David Howells <dhowells@redhat.com> | 2018-04-06 15:17:24 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2018-04-09 22:53:59 +0200 |
commit | a4ff7401fbfa06fba3aac14db5b33c5b76298f2c (patch) | |
tree | 177712d205bb839152135e6bbeda92f23e4f0c85 /fs/afs/internal.h | |
parent | afs: Rearrange status mapping (diff) | |
download | linux-a4ff7401fbfa06fba3aac14db5b33c5b76298f2c.tar.xz linux-a4ff7401fbfa06fba3aac14db5b33c5b76298f2c.zip |
afs: Keep track of invalid-before version for dentry coherency
Each afs dentry is tagged with the version that the parent directory was at
last time it was validated and, currently, if this differs, the directory
is scanned and the dentry is refreshed.
However, this leads to an excessive amount of revalidation on directories
that get modified on the client without conflict with another client. We
know there's no conflict because the parent directory's data version number
got incremented by exactly 1 on any create, mkdir, unlink, etc., therefore
we can trust the current state of the unaffected dentries when we perform a
local directory modification.
Optimise by keeping track of the last version of the parent directory that
was changed outside of the client in the parent directory's vnode and using
that to validate the dentries rather than the current version.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/internal.h')
-rw-r--r-- | fs/afs/internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h index ac3076c2a8e8..adf9b17d328c 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -479,6 +479,7 @@ struct afs_vnode { struct afs_volume *volume; /* volume on which vnode resides */ struct afs_fid fid; /* the file identifier for this inode */ struct afs_file_status status; /* AFS status info for this file */ + afs_dataversion_t invalid_before; /* Child dentries are invalid before this */ #ifdef CONFIG_AFS_FSCACHE struct fscache_cookie *cache; /* caching cookie */ #endif |