]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: allow purging "dirty parent" stray inode
authorYan, Zheng <zheng.z.yan@intel.com>
Tue, 4 Jun 2013 03:19:26 +0000 (11:19 +0800)
committerSage Weil <sage@inktank.com>
Tue, 4 Jun 2013 03:53:09 +0000 (20:53 -0700)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/MDCache.cc

index 3d879b2aad59fbc6de02fe2dbbc6b8cc14cf2a2f..5d389e78d93b960076be0b8de4e5744a73df40e3 100644 (file)
@@ -8588,7 +8588,7 @@ void MDCache::eval_stray(CDentry *dn)
       dout(20) << " pending recovery" << dendl;
       return;  // don't mess with file size probing
     }
-    if (in->get_num_ref() > (int)in->is_dirty()) {
+    if (in->get_num_ref() > (int)in->is_dirty() + (int)in->is_dirty_parent()) {
       dout(20) << " too many inode refs" << dendl;
       return;
     }
@@ -8869,6 +8869,9 @@ void MDCache::_purge_stray_logged(CDentry *dn, version_t pdv, LogSegment *ls)
   // drop inode
   if (in->is_dirty())
     in->mark_clean();
+  if (in->is_dirty_parent())
+    in->clear_dirty_parent();
+
   remove_inode(in);
 
   // drop dentry?