When splitting dirfrag, delta dirstat is always added to the first new
dirfrag. Before the delta dirstat is propagated to inode, unlinking file
from the rest dirfrags can cause nagtive inode dirstat.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
pi->mtime = pi->ctime = pi->dirstat.mtime;
dout(20) << "predirty_journal_parents gives " << pi->dirstat << " on " << *pin << dendl;
- if (pi->dirstat.size() < 0)
- assert(!"negative dirstat size" == g_conf->mds_verify_scatter);
if (parent->get_frag() == frag_t()) { // i.e., we are the only frag
+ if (pi->dirstat.size() < 0)
+ assert(!"negative dirstat size" == g_conf->mds_verify_scatter);
if (pi->dirstat.size() != pf->fragstat.size()) {
mds->clog.error() << "unmatched fragstat size on single dirfrag "
<< parent->dirfrag() << ", inode has " << pi->dirstat