]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: trim non-auth inode with remote parents
authorYan, Zheng <zheng.z.yan@intel.com>
Fri, 21 Mar 2014 23:31:07 +0000 (07:31 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Fri, 28 Mar 2014 18:08:13 +0000 (02:08 +0800)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/MDCache.cc

index b68d3f9dd357d49d7facee45a4e780f484b0d637..ba5bc8df731a4bbf29bd0dc396978aa5480f1081 100644 (file)
@@ -6598,6 +6598,9 @@ void MDCache::trim_non_auth()
       // add back into lru (at the top)
       lru.lru_insert_top(dn);
 
+      if (dnl->is_remote() && dnl->get_inode() && !dnl->get_inode()->is_auth())
+       dn->unlink_remote(dnl);
+
       if (dn->get_dir()->get_inode()->is_stray()) {
        dn->state_set(CDentry::STATE_STRAY);
        if (dnl->is_primary() && dnl->get_inode()->inode.nlink == 0)