]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix negative rstat assertion
authorYan, Zheng <zheng.z.yan@intel.com>
Mon, 20 Jan 2014 02:05:39 +0000 (10:05 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Mon, 17 Feb 2014 01:37:51 +0000 (09:37 +0800)
when gathering rstat for directory inode that is fragmented to
several dirfrags, inode's rstat may temporarily become nagtive.
This is because, when splitting dirfrag, delta rstat is always
added to the first new dirfrag.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/MDCache.cc

index 2bdb2290b48e46c11bfa8789f895ad95c303b907..86276f5245888a2f5d95c68ae6f68cf72d40e734 100644 (file)
@@ -1837,7 +1837,7 @@ void MDCache::project_rstat_frag_to_inode(nest_info_t& rstat, nest_info_t& accou
     pi->rstat.add(delta);
     dout(20) << "        result [" << first << "," << last << "] " << pi->rstat << dendl;
 
-    if (pi->rstat.rbytes < 0)
+    if (pi->rstat.rbytes < 0 && pin->dirfragtree.is_leaf(frag_t()))
       assert(!"negative rstat rbytes" == g_conf->mds_verify_scatter);
 
     last = first-1;