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.80.6~8^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2479%2Fhead;p=ceph.git mds: fix root and mdsdir inodes' rsubdirs inode rstat accounts inode itself. Signed-off-by: Yan, Zheng (cherry picked from commit da17394941386dab88ddbfed4af2c8cb6b5eb72f) --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 71a4b3383f47..d6cfebdda119 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -349,6 +349,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(); @@ -399,6 +400,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;