linux/fs/afs
David Howells c435ee3455 afs: Overhaul the callback handling
Overhaul the AFS callback handling by the following means:

 (1) Don't give up callback promises on vnodes that we are no longer using,
     rather let them just expire on the server or let the server break
     them.  This is actually more efficient for the server as the callback
     lookup is expensive if there are lots of extant callbacks.

 (2) Only give up the callback promises we have from a server when the
     server record is destroyed.  Then we can just give up *all* the
     callback promises on it in one go.

 (3) Servers can end up being shared between cells if cells are aliased, so
     don't add all the vnodes being backed by a particular server into a
     big FID-indexed tree on that server as there may be duplicates.

     Instead have each volume instance (~= superblock) register an interest
     in a server as it starts to make use of it and use this to allow the
     processor for callbacks from the server to find the superblock and
     thence the inode corresponding to the FID being broken by means of
     ilookup_nowait().

 (4) Rather than iterating over the entire callback list when a mass-break
     comes in from the server, maintain a counter of mass-breaks in
     afs_server (cb_seq) and make afs_validate() check it against the copy
     in afs_vnode.

     It would be nice not to have to take a read_lock whilst doing this,
     but that's tricky without using RCU.

 (5) Save a ref on the fileserver we're using for a call in the afs_call
     struct so that we can access its cb_s_break during call decoding.

 (6) Write-lock around callback and status storage in a vnode and read-lock
     around getattr so that we don't see the status mid-update.

This has the following consequences:

 (1) Data invalidation isn't seen until someone calls afs_validate() on a
     vnode.  Unfortunately, we need to use a key to query the server, but
     getting one from a background thread is tricky without caching loads
     of keys all over the place.

 (2) Mass invalidation isn't seen until someone calls afs_validate().

 (3) Callback breaking is going to hit the inode_hash_lock quite a bit.
     Could this be replaced with rcu_read_lock() since inodes are destroyed
     under RCU conditions.

Signed-off-by: David Howells <dhowells@redhat.com>
2017-11-13 15:38:18 +00:00
..
afs.h afs: Fix the afs_uuid struct to make the char-sized fields signed 2017-11-13 15:38:18 +00:00
afs_cm.h
afs_fs.h afs: Overhaul the callback handling 2017-11-13 15:38:18 +00:00
afs_vl.h afs: Add some protocol defs 2017-11-13 15:38:17 +00:00
cache.c afs: Update the cache index structure 2017-11-13 15:38:17 +00:00
callback.c afs: Overhaul the callback handling 2017-11-13 15:38:18 +00:00
cell.c afs: Allow IPv6 address specification of VL servers 2017-11-13 15:38:17 +00:00
cmservice.c afs: Overhaul the callback handling 2017-11-13 15:38:18 +00:00
dir.c afs: Overhaul the callback handling 2017-11-13 15:38:18 +00:00
file.c afs: Condense afs_call's reply{,2,3,4} into an array 2017-11-13 15:38:17 +00:00
flock.c afs: Overhaul the callback handling 2017-11-13 15:38:18 +00:00
fsclient.c afs: Overhaul the callback handling 2017-11-13 15:38:18 +00:00
inode.c afs: Overhaul the callback handling 2017-11-13 15:38:18 +00:00
internal.h afs: Overhaul the callback handling 2017-11-13 15:38:18 +00:00
Kconfig fs/afs: remove depends on CONFIG_EXPERIMENTAL 2013-01-21 14:39:04 -08:00
main.c afs: Overhaul the callback handling 2017-11-13 15:38:18 +00:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
misc.c afs: Consolidate abort_to_error translators 2017-11-13 15:38:17 +00:00
mntpt.c afs: Add metadata xattrs 2017-07-09 14:40:12 -07:00
netdevices.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
proc.c afs: Allow IPv6 address specification of VL servers 2017-11-13 15:38:17 +00:00
rxrpc.c afs: Rename struct afs_call server member to cm_server 2017-11-13 15:38:18 +00:00
security.c afs: Overhaul the callback handling 2017-11-13 15:38:18 +00:00
server.c afs: Overhaul the callback handling 2017-11-13 15:38:18 +00:00
super.c afs: Overhaul the callback handling 2017-11-13 15:38:18 +00:00
vlclient.c afs: Condense afs_call's reply{,2,3,4} into an array 2017-11-13 15:38:17 +00:00
vlocation.c afs: Keep and pass sockaddr_rxrpc addresses rather than in_addr 2017-11-13 15:38:17 +00:00
vnode.c afs: Overhaul the callback handling 2017-11-13 15:38:18 +00:00
volume.c afs: Overhaul the callback handling 2017-11-13 15:38:18 +00:00
write.c fs: convert a pile of fsync routines to errseq_t based reporting 2017-08-01 08:39:29 -04:00
xattr.c afs: Add metadata xattrs 2017-07-09 14:40:12 -07:00