From b8f1cb978944a616b69150fdbb3a6b978d75b1dc Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Tue, 4 Jun 2013 11:19:26 +0800 Subject: [PATCH] mds: allow purging "dirty parent" stray inode Signed-off-by: Yan, Zheng --- src/mds/MDCache.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 3d879b2aad5..5d389e78d93 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -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? -- 2.47.3