aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@icloud.com>2018-02-27 00:49:44 -0500
committerIlya Dryomov <idryomov@gmail.com>2018-04-02 04:12:47 -0400
commitbc4b5ad3a6a1cfe11494380affc4bfc4521af499 (patch)
tree3d2e79fac8009f2607cb12cb661e53fbcdb06e0f /fs/ceph
parent73737682e0598ae73bd4c481e478a0d75884aa8a (diff)
ceph: mark the cap cache as unreclaimable
Releasing cap is affected by many factors (e.g., avail_count/reserve_count/min_count) and min_count could be specified high volume in client mount option. Hence it's better to mark cap cache as unreclaimable in case of non-trivial discrepancies between memory shown as reclaimable and what is actually reclaimed. Signed-off-by: Chengguang Xu <cgxu519@icloud.com> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/super.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 52fec209f0a6..9bf9e54259dd 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -698,8 +698,7 @@ static int __init init_caches(void)
698 if (!ceph_inode_cachep) 698 if (!ceph_inode_cachep)
699 return -ENOMEM; 699 return -ENOMEM;
700 700
701 ceph_cap_cachep = KMEM_CACHE(ceph_cap, 701 ceph_cap_cachep = KMEM_CACHE(ceph_cap, SLAB_MEM_SPREAD);
702 SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD);
703 if (!ceph_cap_cachep) 702 if (!ceph_cap_cachep)
704 goto bad_cap; 703 goto bad_cap;
705 ceph_cap_flush_cachep = KMEM_CACHE(ceph_cap_flush, 704 ceph_cap_flush_cachep = KMEM_CACHE(ceph_cap_flush,