]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: don't trim non-auth root inode/dirfrag
authorYan, Zheng <zheng.z.yan@intel.com>
Thu, 27 Mar 2014 21:42:34 +0000 (05:42 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Fri, 28 Mar 2014 18:08:14 +0000 (02:08 +0800)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/MDCache.cc

index f972f44e6e3fae886f2edb1de87feeb842e5c7d1..bffc7cc4a0d19dcfab0b8fb5572d099f25cbaaed 100644 (file)
@@ -6799,7 +6799,7 @@ void MDCache::try_trim_non_auth_subtree(CDir *dir)
     while (true) {
       CInode *diri = dir->get_inode();
       if (diri->is_base()) {
-       if (diri->authority().first != mds->whoami) {
+       if (!diri->is_root() && diri->authority().first != mds->whoami) {
          dout(10) << " closing empty non-auth subtree " << *dir << dendl;
          remove_subtree(dir);
          dir->mark_clean();