process subtree dirfrags first, then process nested dirfrags. because
the code that processes nested dirfrags treats unprocessed subtree
dirfrags as child directories' dirfrags.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
// adjust subtree
list<CDir*> dfls;
- diri->get_dirfrags(dfls);
+ // make sure subtree dirfrags are at the front of the list
+ diri->get_subtree_dirfrags(dfls);
+ diri->get_nested_dirfrags(dfls);
for (list<CDir*>::iterator p = dfls.begin(); p != dfls.end(); ++p) {
CDir *dir = *p;