From 7b25512d65c6337cbddc7d6c6f55747ba1591be5 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Fri, 2 May 2014 23:08:41 +0800 Subject: [PATCH] mds: fix root and mdsdir inodes' rsubdirs inode rstat accounts inode itself. Signed-off-by: Yan, Zheng (cherry picked from commit da17394941386dab88ddbfed4af2c8cb6b5eb72f) --- src/mds/MDCache.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 71a4b3383f476..d6cfebdda1199 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; -- 2.39.5