linux-stable/fs/afs
David Howells 402cb8dda9 fscache: Attach the index key and aux data to the cookie
Attach copies of the index key and auxiliary data to the fscache cookie so
that:

 (1) The callbacks to the netfs for this stuff can be eliminated.  This
     can simplify things in the cache as the information is still
     available, even after the cache has relinquished the cookie.

 (2) Simplifies the locking requirements of accessing the information as we
     don't have to worry about the netfs object going away on us.

 (3) The cache can do lazy updating of the coherency information on disk.
     As long as the cache is flushed before reboot/poweroff, there's no
     need to update the coherency info on disk every time it changes.

 (4) Cookies can be hashed or put in a tree as the index key is easily
     available.  This allows:

     (a) Checks for duplicate cookies can be made at the top fscache layer
     	 rather than down in the bowels of the cache backend.

     (b) Caching can be added to a netfs object that has a cookie if the
     	 cache is brought online after the netfs object is allocated.

A certain amount of space is made in the cookie for inline copies of the
data, but if it won't fit there, extra memory will be allocated for it.

The downside of this is that live cache operation requires more memory.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Anna Schumaker <anna.schumaker@netapp.com>
Tested-by: Steve Dickson <steved@redhat.com>
2018-04-04 13:41:28 +01:00
..
addr_list.c afs: Fix missing cursor clearance 2018-02-06 14:36:54 +00:00
afs.h afs: Overhaul permit caching 2017-11-13 15:38:18 +00:00
afs_cm.h
afs_fs.h afs: Overhaul volume and server record caching and fileserver rotation 2017-11-13 15:38:19 +00:00
afs_vl.h afs: Make use of the YFS service upgrade to fully support IPv6 2017-11-13 15:38:19 +00:00
cache.c fscache: Attach the index key and aux data to the cookie 2018-04-04 13:41:28 +01:00
callback.c afs: Overhaul volume and server record caching and fileserver rotation 2017-11-13 15:38:19 +00:00
cell.c fscache: Attach the index key and aux data to the cookie 2018-04-04 13:41:28 +01:00
cmservice.c afs: Protect call->state changes against signals 2017-11-13 15:38:21 +00:00
dir.c afs: Support the AFS dynamic root 2018-02-06 14:43:37 +00:00
file.c afs: Trace page dirty/clean 2017-11-13 15:38:21 +00:00
flock.c afs: Fix file locking 2017-11-17 10:06:13 +00:00
fsclient.c afs: convert to new i_version API 2018-01-29 06:42:20 -05:00
inode.c fscache: Attach the index key and aux data to the cookie 2018-04-04 13:41:28 +01:00
internal.h fscache: Attach the index key and aux data to the cookie 2018-04-04 13:41:28 +01:00
Kconfig
main.c afs: Overhaul volume and server record caching and fileserver rotation 2017-11-13 15:38:19 +00:00
Makefile afs: Overhaul volume and server record caching and fileserver rotation 2017-11-13 15:38:19 +00:00
misc.c afs: Consolidate abort_to_error translators 2017-11-13 15:38:17 +00:00
mntpt.c afs: Support the AFS dynamic root 2018-02-06 14:43:37 +00: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: Overhaul volume and server record caching and fileserver rotation 2017-11-13 15:38:19 +00:00
rotate.c afs: Rearrange afs_select_fileserver() a little 2018-02-06 14:43:37 +00:00
rxrpc.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-04-03 14:04:18 -07:00
security.c afs: Fix permit refcounting 2017-12-01 11:40:43 +00:00
server.c sched/wait, fs/afs: Convert wait_on_atomic_t() usage to the new wait_var_event() API 2018-03-20 08:23:19 +01:00
server_list.c afs: Fix server list handling 2018-02-06 14:36:54 +00:00
super.c afs: Support the AFS dynamic root 2018-02-06 14:43:37 +00:00
vlclient.c afs: Fix server list handling 2018-02-06 14:36:54 +00:00
volume.c fscache: Attach the index key and aux data to the cookie 2018-04-04 13:41:28 +01:00
write.c afs: Fix missing error handling in afs_write_end() 2018-01-02 10:02:19 +00:00
xattr.c afs: Overhaul volume and server record caching and fileserver rotation 2017-11-13 15:38:19 +00:00