linux-stable/include/linux/ceph
Yan, Zheng 719a2514e9 ceph: consider inode's last read/write when calculating wanted caps
Add i_last_rd and i_last_wr to ceph_inode_info. These fields are
used to track the last time the client acquired read/write caps for
the inode.

If there is no read/write on an inode for 'caps_wanted_delay_max'
seconds, __ceph_caps_file_wanted() does not request caps for read/write
even there are open files.

Call __ceph_touch_fmode() for dir operations. __ceph_caps_file_wanted()
calculates dir's wanted caps according to last dir read/modification. If
there is recent dir read, dir inode wants CEPH_CAP_ANY_SHARED caps. If
there is recent dir modification, also wants CEPH_CAP_FILE_EXCL.

Readdir is a special case. Dir inode wants CEPH_CAP_FILE_EXCL after
readdir, as with that, modifications do not need to release
CEPH_CAP_FILE_SHARED or invalidate all dentry leases issued by readdir.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2020-03-30 12:42:42 +02:00
..
auth.h libceph: add authorizer challenge 2018-08-02 21:33:24 +02:00
buffer.h libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer 2019-08-22 10:47:41 +02:00
ceph_debug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ceph_features.h libceph: turn on CEPH_FEATURE_MSG_ADDR2 2019-07-08 14:01:43 +02:00
ceph_frag.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ceph_fs.h ceph: consider inode's last read/write when calculating wanted caps 2020-03-30 12:42:42 +02:00
ceph_hash.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cls_lock_client.h rbd: support for object-map and fast-diff 2019-07-08 14:01:45 +02:00
debugfs.h libceph: drop CEPH_DEFINE_SHOW_FUNC 2020-03-30 12:42:40 +02:00
decode.h libceph: rename ceph_encode_addr to ceph_encode_banner_addr 2019-07-08 14:01:43 +02:00
libceph.h ceph: move to a dedicated slabcache for mds requests 2020-03-30 12:42:41 +02:00
mdsmap.h ceph: add possible_max_rank and make the code more readable 2020-01-27 16:53:40 +01:00
messenger.h libceph: fix alloc_msg_with_page_vector() memory leaks 2020-03-23 13:07:08 +01:00
mon_client.h libceph: add function that reset client's entity addr 2019-09-16 12:06:23 +02:00
msgpool.h libceph: preallocate message data items 2018-10-22 10:28:22 +02:00
msgr.h libceph: add authorizer challenge 2018-08-02 21:33:24 +02:00
osd_client.h ceph: move ceph_osdc_{read,write}pages to ceph.ko 2020-03-30 12:42:40 +02:00
osdmap.h ceph: check POOL_FLAG_FULL/NEARFULL in addition to OSDMAP_FULL/NEARFULL 2020-03-23 13:07:08 +01:00
pagelist.h libceph: introduce ceph_pagelist_alloc() 2018-10-22 10:28:21 +02:00
rados.h ceph: check POOL_FLAG_FULL/NEARFULL in addition to OSDMAP_FULL/NEARFULL 2020-03-23 13:07:08 +01:00
string_table.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
striper.h rbd: support for object-map and fast-diff 2019-07-08 14:01:45 +02:00
types.h ceph: add mount option to limit caps count 2019-03-05 18:55:17 +01:00