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>
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;