From: Yan, Zheng Date: Wed, 14 Jan 2015 06:24:14 +0000 (+0800) Subject: ceph: don't count snap dentries when calculating new fragstat/neststat X-Git-Tag: v0.93~87^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=244267ba6b365ffbb930f3b4f97735d53db08cc2;p=ceph.git ceph: don't count snap dentries when calculating new fragstat/neststat Signed-off-by: Yan, Zheng --- diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc index 93fa4ac06ca..7c06d91154f 100644 --- a/src/mds/CDir.cc +++ b/src/mds/CDir.cc @@ -793,11 +793,8 @@ void CDir::steal_dentry(CDentry *dn) num_head_null++; else num_snap_null++; - } else { - if (dn->last == CEPH_NOSNAP) + } else if (dn->last == CEPH_NOSNAP) { num_head_items++; - else - num_snap_items++; if (dn->get_linkage()->is_primary()) { CInode *in = dn->get_linkage()->get_inode(); @@ -822,7 +819,8 @@ void CDir::steal_dentry(CDentry *dn) else fnode.fragstat.nfiles++; } - } + } else + num_snap_items++; if (dn->auth_pins || dn->nested_auth_pins) { // use the helpers here to maintain the auth_pin invariants on the dir inode