summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-06-04 11:19:26 +0800
committerSage Weil <sage@inktank.com>2013-06-04 13:08:24 -0700
commit0c4ca2ae56ce1fd9cd63081197d5f2ad2b70ab6a (patch)
tree52012dc2b3e45fcc44ac23fe59741c2bdbb9e190
parentd7fb9b173a163eb2318af5832456f0f236f716fd (diff)
downloadceph-0c4ca2ae56ce1fd9cd63081197d5f2ad2b70ab6a.tar.gz
mds: allow purging "dirty parent" stray inode
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
-rw-r--r--src/mds/MDCache.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc
index 872b60c7360..da1e795f8ed 100644
--- a/src/mds/MDCache.cc
+++ b/src/mds/MDCache.cc
@@ -9157,7 +9157,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;
}
@@ -9450,6 +9450,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?