When splitting dirfrag, delta rstat is always added to the first new
dirfrag. Ancestors of the dirfrag may have nagtive rstat before the
delta rstat has been propagated to them. For example:
inode 100 n(v1 b-4096)
|- dir 100 n(v1 b-4096)
|- dentry
|- inode 101 n(v1 b-4096)
|- dir 101.0* n(v1)/n(v1 b-4096)
|- dir 101.1* n(v1)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
pi->rstat.version = v;
}
}
-
- if (pi->rstat.rsubdirs < 0 ||
- pi->rstat.rfiles < 0 ||
- pi->rstat.rbytes < 0) {
- clog.error() << "bad/negative rstat on " << ino()
- << ", inode has " << pi->rstat << "\n";
-
- if (pi->rstat.rsubdirs < 0)
- pi->rstat.rsubdirs = 0;
- if (pi->rstat.rfiles < 0)
- pi->rstat.rfiles = 0;
- if (pi->rstat.rbytes < 0)
- pi->rstat.rbytes = 0;
-
- assert(!"bad/negative rstat" == g_conf->mds_verify_scatter);
- }
}
break;
pi->rstat.add(delta);
dout(20) << " result [" << first << "," << last << "] " << pi->rstat << dendl;
- if (pi->rstat.rbytes < 0 && pin->dirfragtree.is_leaf(frag_t()))
- assert(!"negative rstat rbytes" == g_conf->mds_verify_scatter);
-
last = first-1;
}
}