From patchwork Tue Jun 4 03:19:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 2656371 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9F54040077 for ; Tue, 4 Jun 2013 03:19:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757379Ab3FDDTc (ORCPT ); Mon, 3 Jun 2013 23:19:32 -0400 Received: from mga09.intel.com ([134.134.136.24]:3188 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757177Ab3FDDTb (ORCPT ); Mon, 3 Jun 2013 23:19:31 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 03 Jun 2013 20:17:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,796,1363158000"; d="scan'208";a="323824466" Received: from zyan5-mobl.sh.intel.com ([10.239.13.101]) by orsmga001.jf.intel.com with ESMTP; 03 Jun 2013 20:19:29 -0700 From: "Yan, Zheng" To: ceph-devel@vger.kernel.org Cc: sage@inktank.com, greg@inktank.com, "Yan, Zheng" Subject: [PATCH 2/2] mds: allow purging "dirty parent" stray inode Date: Tue, 4 Jun 2013 11:19:26 +0800 Message-Id: <1370315966-10363-2-git-send-email-zheng.z.yan@intel.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1370315966-10363-1-git-send-email-zheng.z.yan@intel.com> References: <1370315966-10363-1-git-send-email-zheng.z.yan@intel.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org From: "Yan, Zheng" 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 e2ecba8..7b4f2fa 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -9156,7 +9156,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; } @@ -9449,6 +9449,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?