linux/fs/ceph
Yan, Zheng f7f7e7a063 ceph: improve fscache revalidation
There are several issues in fscache revalidation code.
- In ceph_revalidate_work(), fscache_invalidate() is called when
  fscache_check_consistency() return 0. This is complete wrong
  because 0 means cache is valid.
- Handle_cap_grant() calls ceph_queue_revalidate() if client
  already has CAP_FILE_CACHE. This code is confusing. Client
  should revalidate the cache each time it got CAP_FILE_CACHE
  anew.
- In Handle_cap_grant(), fscache_invalidate() is called if MDS
  revokes CAP_FILE_CACHE. This is inconsistency with the case
  that inode get evicted. In the later case, the cache is not
  discarded. Client may use the cache when inode is reloaded.

This patch moves the fscache revalidation into ceph_get_caps().
Client revalidates the cache after it gets CAP_FILE_CACHE.
i_rdcache_gen should keep constance while CAP_FILE_CACHE is
used. If i_fscache_gen is not equal to i_rdcache_gen, client
needs to check cache's consistency.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2016-06-01 10:31:50 +02:00
..
acl.c ceph: Get rid of d_find_alias in ceph_set_acl 2016-04-23 15:41:30 -04:00
addr.c ceph: disable fscache when inode is opened for write 2016-06-01 10:31:07 +02:00
cache.c ceph: improve fscache revalidation 2016-06-01 10:31:50 +02:00
cache.h ceph: improve fscache revalidation 2016-06-01 10:31:50 +02:00
caps.c ceph: improve fscache revalidation 2016-06-01 10:31:50 +02:00
ceph_frag.c ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
debugfs.c ceph: don't show symlink target in debugfs/mdsc 2016-05-26 01:15:32 +02:00
dir.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2016-05-26 14:10:32 -07:00
export.c ceph: fix security xattr deadlock 2016-03-25 18:51:55 +01:00
file.c ceph: disable fscache when inode is opened for write 2016-06-01 10:31:07 +02:00
inode.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2016-05-26 14:10:32 -07:00
ioctl.c libceph: a major OSD client update 2016-05-26 01:14:03 +02:00
ioctl.h ceph: fully initialize new layout 2012-05-16 14:28:27 -05:00
Kconfig ceph: add acl for cephfs 2013-12-31 20:32:01 +02:00
locks.c Move locks API users to locks_lock_inode_wait() 2015-10-22 14:57:36 -04:00
Makefile ceph: add acl for cephfs 2013-12-31 20:32:01 +02:00
mds_client.c ceph: fix wake_up_session_cb() 2016-05-26 01:15:42 +02:00
mds_client.h ceph: using hash value to compose dentry offset 2016-05-26 01:15:36 +02:00
mdsmap.c ceph: CEPH_FEATURE_MDSENC support 2016-05-26 01:15:31 +02:00
snap.c ceph: kill ceph_empty_snapc 2016-03-25 18:51:52 +01:00
strings.c ceph: rename snapshot support 2015-04-22 18:33:41 +03:00
super.c ceph: report mount root in session metadata 2016-05-26 01:15:33 +02:00
super.h ceph: improve fscache revalidation 2016-06-01 10:31:50 +02:00
xattr.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-05-27 17:14:05 -07:00