summaryrefslogtreecommitdiffstats
path: root/fs/ceph/caps.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2015-10-26 09:08:43 +0100
committerIlya Dryomov <idryomov@gmail.com>2015-11-02 23:36:48 +0100
commit5e804ac4824302efc3038e086cb21f2e93ab8900 (patch)
tree6e67ab2be2c56191d96afa4f012bf688ea001828 /fs/ceph/caps.c
parentrbd: remove duplicate calls to rbd_dev_mapping_clear() (diff)
downloadlinux-5e804ac4824302efc3038e086cb21f2e93ab8900.tar.xz
linux-5e804ac4824302efc3038e086cb21f2e93ab8900.zip
ceph: don't invalidate page cache when inode is no longer used
ceph_check_caps() invalidate page cache when inode is not used by any open file. This behaviour is not friendly for workload that repeatly read files. Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r--fs/ceph/caps.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 27b566874bc1..349315332040 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -1655,9 +1655,8 @@ retry_locked:
!S_ISDIR(inode->i_mode) && /* ignore readdir cache */
ci->i_wrbuffer_ref == 0 && /* no dirty pages... */
inode->i_data.nrpages && /* have cached pages */
- (file_wanted == 0 || /* no open files */
- (revoking & (CEPH_CAP_FILE_CACHE|
- CEPH_CAP_FILE_LAZYIO))) && /* or revoking cache */
+ (revoking & (CEPH_CAP_FILE_CACHE|
+ CEPH_CAP_FILE_LAZYIO)) && /* or revoking cache */
!tried_invalidate) {
dout("check_caps trying to invalidate on %p\n", inode);
if (try_nonblocking_invalidate(inode) < 0) {