]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: make trim_non_auth paths complete filepaths (not dnames)
authorSage Weil <sage@newdream.net>
Thu, 28 Apr 2011 20:34:34 +0000 (13:34 -0700)
committerSage Weil <sage@newdream.net>
Thu, 28 Apr 2011 20:34:34 +0000 (13:34 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
src/mds/MDCache.cc

index a6896a057fb20b69321f5ba0949f58c5c8c14c98..600f513255cbd4e625829102d3944531a574e895 100644 (file)
@@ -5486,7 +5486,9 @@ void MDCache::trim_non_auth()
        in->get_dirfrags(ls);
        for (list<CDir*>::iterator p = ls.begin(); p != ls.end(); ++p) {
          CDir *subdir = *p;
-         warn_str_dirs << subdir->get_inode()->get_parent_dn()->get_name() << "\n";
+         filepath fp;
+         subdir->get_inode()->make_path(fp);
+         warn_str_dirs << fp << "\n";
          if (subdir->is_subtree_root()) 
            remove_subtree(subdir);
          in->close_dirfrag(subdir->dirfrag().frag);
@@ -5529,8 +5531,9 @@ void MDCache::trim_non_auth()
             ++p) {
          dout(0) << " ... " << **p << dendl;
          CInode *diri = (*p)->get_inode();
-         if (!diri->is_base())
-           warn_str_dirs << diri->get_parent_dn()->get_name() << "\n";
+         filepath fp;
+         diri->make_path(fp);
+         warn_str_dirs << fp << "\n";
          assert((*p)->get_num_ref() == 1);  // SUBTREE
          remove_subtree((*p));
          in->close_dirfrag((*p)->dirfrag().frag);