ceph: don't pre-allocate space for cap release messages
authorYan, Zheng <zyan@redhat.com>
Thu, 14 May 2015 09:22:42 +0000 (17:22 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 25 Jun 2015 08:49:29 +0000 (11:49 +0300)
commit745a8e3bccbc6adae69a98ddc525e529aa44636e
tree96d8106a0800a839d8f6bffaf7485b92dcf78a6c
parentaffbc19a68f9966ad65a773db405f78e2bafc07b
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 <zyan@redhat.com>
fs/ceph/caps.c
fs/ceph/mds_client.c
fs/ceph/mds_client.h
fs/ceph/super.h