]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix root and mdsdir inodes' rsubdirs 2479/head
authorYan, Zheng <zheng.z.yan@intel.com>
Fri, 2 May 2014 15:08:41 +0000 (23:08 +0800)
committerYan, Zheng <ukernel@gmail.com>
Sat, 13 Sep 2014 00:27:27 +0000 (08:27 +0800)
inode rstat accounts inode itself.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
(cherry picked from commit da17394941386dab88ddbfed4af2c8cb6b5eb72f)

src/mds/MDCache.cc

index 71a4b3383f47655076c785133841297e8604fa38..d6cfebdda1199e27b84b6747b209b0fb482abf45 100644 (file)
@@ -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;