]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-fuse: double decreased the count to trim caps 7229/head
authorZhi Zhang <willzzhang@tencent.com>
Thu, 14 Jan 2016 03:04:42 +0000 (11:04 +0800)
committerZhi Zhang <willzzhang@tencent.com>
Thu, 14 Jan 2016 03:04:42 +0000 (11:04 +0800)
Signed-off-by: Zhi Zhang zhangz.david@outlook.com
src/client/Client.cc

index f27c68dde9b927e9d2d681c9401825a80ba8783b..112cb2f2801d03c56bfdc472bfb14aa016cc3cd7 100644 (file)
@@ -3778,11 +3778,13 @@ void Client::_invalidate_kernel_dcache()
 void Client::trim_caps(MetaSession *s, int max)
 {
   mds_rank_t mds = s->mds_num;
-  ldout(cct, 10) << "trim_caps mds." << mds << " max " << max << dendl;
+  int caps_size = s->caps.size();
+  ldout(cct, 10) << "trim_caps mds." << mds << " max " << max 
+    << " caps " << caps_size << dendl;
 
   int trimmed = 0;
   xlist<Cap*>::iterator p = s->caps.begin();
-  while ((s->caps.size() - trimmed) > max && !p.end()) {
+  while ((caps_size - trimmed) > max && !p.end()) {
     Cap *cap = *p;
     s->s_cap_iterator = cap;
     Inode *in = cap->inode;