afs: Locally edit directory data for mkdir/create/unlink/...
Locally edit the contents of an AFS directory upon a successful inode
operation that modifies that directory (such as mkdir, create and unlink)
so that we can avoid the current practice of re-downloading the directory
after each change.
This is viable provided that the directory version number we get back from
the modifying RPC op is exactly incremented by 1 from what we had
previously. The data in the directory contents is in a defined format that
we have to parse locally to perform lookups and readdir, so modifying isn't
a problem.
If the edit fails, we just clear the VALID flag on the directory and it
will be reloaded next time it is needed.
Signed-off-by:
David Howells <dhowells@redhat.com>
Showing
- fs/afs/Makefile 1 addition, 0 deletionsfs/afs/Makefile
- fs/afs/dir.c 74 additions, 9 deletionsfs/afs/dir.c
- fs/afs/dir_edit.c 505 additions, 0 deletionsfs/afs/dir_edit.c
- fs/afs/fsclient.c 22 additions, 13 deletionsfs/afs/fsclient.c
- fs/afs/inode.c 5 additions, 2 deletionsfs/afs/inode.c
- fs/afs/internal.h 14 additions, 5 deletionsfs/afs/internal.h
- fs/afs/proc.c 4 additions, 0 deletionsfs/afs/proc.c
- include/trace/events/afs.h 90 additions, 0 deletionsinclude/trace/events/afs.h
Loading
Please register or sign in to comment