linux-stable/fs/ceph
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
..
acl.c ceph: unify inode i_ctime update 2017-06-14 19:37:23 +02:00
addr.c ceph: fix un-balanced fsc->writeback_count update 2018-01-29 18:36:09 +01:00
cache.c fscache: Attach the index key and aux data to the cookie 2018-04-04 13:41:28 +01:00
cache.h ceph: improve fscache revalidation 2016-06-01 10:31:50 +02:00
caps.c ceph: flush dirty caps of unlinked inode ASAP 2018-02-26 16:19:16 +01:00
ceph_frag.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debugfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dir.c ceph: flush dirty caps of unlinked inode ASAP 2018-02-26 16:19:16 +01:00
export.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
file.c ceph: only dirty ITER_IOVEC pages for direct read 2018-03-30 11:17:48 +02:00
inode.c ceph: avoid dereferencing invalid pointer during cached readdir 2018-01-29 18:36:07 +01:00
ioctl.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ioctl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at 2018-01-01 12:45:37 -07:00
locks.c ceph: handle 'session get evicted while there are file locks' 2017-11-13 12:11:28 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mds_client.c ceph: try to allocate enough memory for reserved caps 2018-01-29 18:36:12 +01:00
mds_client.h ceph: try to allocate enough memory for reserved caps 2018-01-29 18:36:12 +01:00
mdsmap.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
snap.c ceph: fix incorrect snaprealm when adding caps 2018-01-29 18:36:09 +01:00
strings.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
super.c ceph: fix potential memory leak in init_caches() 2018-03-01 16:39:47 +01:00
super.h ceph: flush dirty caps of unlinked inode ASAP 2018-02-26 16:19:16 +01:00
xattr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00