• David Howells's avatar
    afs: Keep track of invalid-before version for dentry coherency · a4ff7401
    David Howells authored
    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: default avatarDavid Howells <dhowells@redhat.com>
    a4ff7401
dir.c 39.7 KB