From 745a8e3bccbc6adae69a98ddc525e529aa44636e Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Thu, 14 May 2015 17:22:42 +0800 Subject: ceph: don't pre-allocate space for cap release messages Previously we pre-allocate cap release messages for each caps. This wastes lots of memory when there are large amount of caps. This patch make the code not pre-allocate the cap release messages. Instead, we add the corresponding ceph_cap struct to a list when releasing a cap. Later when flush cap releases is needed, we allocate the cap release messages dynamically. Signed-off-by: Yan, Zheng --- fs/ceph/mds_client.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'fs/ceph/mds_client.h') diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h index bf24d88cfeb2..294fa23a7df6 100644 --- a/fs/ceph/mds_client.h +++ b/fs/ceph/mds_client.h @@ -139,7 +139,6 @@ struct ceph_mds_session { int s_cap_reconnect; int s_readonly; struct list_head s_cap_releases; /* waiting cap_release messages */ - struct list_head s_cap_releases_done; /* ready to send */ struct ceph_cap *s_cap_iterator; /* protected by mutex */ @@ -389,8 +388,6 @@ static inline void ceph_mdsc_put_request(struct ceph_mds_request *req) kref_put(&req->r_kref, ceph_mdsc_release_request); } -extern int ceph_add_cap_releases(struct ceph_mds_client *mdsc, - struct ceph_mds_session *session); extern void ceph_send_cap_releases(struct ceph_mds_client *mdsc, struct ceph_mds_session *session); -- cgit v1.2.3