diff options
author | Yan, Zheng <zyan@redhat.com> | 2019-01-14 12:21:19 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-03-05 20:55:16 +0300 |
commit | e3ec8d6898f71636a067dae683174ef9bf81bc96 (patch) | |
tree | ce14ef6392b06d84016f35e96e140dce9dcc12a4 /fs/ceph/mds_client.h | |
parent | 08796873a5183bfaab52a3bd899fe82f9e64be94 (diff) | |
download | linux-e3ec8d6898f71636a067dae683174ef9bf81bc96.tar.xz |
ceph: send cap releases more aggressively
When pending cap releases fill up one message, start a work to send
cap release message. (old way is sending cap releases every 5 seconds)
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/mds_client.h')
-rw-r--r-- | fs/ceph/mds_client.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h index af3b25e59e90..2147ecd0c9e5 100644 --- a/fs/ceph/mds_client.h +++ b/fs/ceph/mds_client.h @@ -172,12 +172,13 @@ struct ceph_mds_session { /* protected by s_cap_lock */ spinlock_t s_cap_lock; struct list_head s_caps; /* all caps issued by this session */ + struct ceph_cap *s_cap_iterator; int s_nr_caps, s_trim_caps; int s_num_cap_releases; int s_cap_reconnect; int s_readonly; struct list_head s_cap_releases; /* waiting cap_release messages */ - struct ceph_cap *s_cap_iterator; + struct work_struct s_cap_release_work; /* protected by mutex */ struct list_head s_cap_flushing; /* inodes w/ flushing caps */ @@ -457,9 +458,10 @@ static inline void ceph_mdsc_put_request(struct ceph_mds_request *req) kref_put(&req->r_kref, ceph_mdsc_release_request); } -extern void ceph_send_cap_releases(struct ceph_mds_client *mdsc, - struct ceph_mds_session *session); - +extern void __ceph_queue_cap_release(struct ceph_mds_session *session, + struct ceph_cap *cap); +extern void ceph_flush_cap_releases(struct ceph_mds_client *mdsc, + struct ceph_mds_session *session); extern void ceph_mdsc_pre_umount(struct ceph_mds_client *mdsc); extern char *ceph_mdsc_build_path(struct dentry *dentry, int *plen, u64 *base, |