mds: fix root and mdsdir inodes' rsubdirs

inode rstat accounts inode itself.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
This commit is contained in:
Yan, Zheng 2014-05-02 23:08:41 +08:00
parent 5283d80d32
commit da17394941

View File

@ -348,6 +348,7 @@ void MDCache::create_empty_hierarchy(C_Gather *gather)
root->inode.dirstat = rootdir->fnode.fragstat;
root->inode.rstat = rootdir->fnode.rstat;
++root->inode.rstat.rsubdirs;
root->inode.accounted_rstat = root->inode.rstat;
rootdir->mark_complete();
@ -398,6 +399,7 @@ void MDCache::create_mydir_hierarchy(C_Gather *gather)
myin->inode.dirstat = mydir->fnode.fragstat;
myin->inode.rstat = mydir->fnode.rstat;
++myin->inode.rstat.rsubdirs;
myin->inode.accounted_rstat = myin->inode.rstat;