From: Yan, Zheng Date: Fri, 2 May 2014 15:08:41 +0000 (+0800) Subject: mds: fix root and mdsdir inodes' rsubdirs X-Git-Tag: v0.81~47^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=da17394941386dab88ddbfed4af2c8cb6b5eb72f;p=ceph.git mds: fix root and mdsdir inodes' rsubdirs inode rstat accounts inode itself. Signed-off-by: Yan, Zheng --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 342eca0a1fb2..f74b8b851b3f 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -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;