From patchwork Mon Jun 17 12:10:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 2733051 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5EBC29F8E1 for ; Mon, 17 Jun 2013 12:11:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BEC7820270 for ; Mon, 17 Jun 2013 12:11:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F406420262 for ; Mon, 17 Jun 2013 12:11:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932863Ab3FQMLp (ORCPT ); Mon, 17 Jun 2013 08:11:45 -0400 Received: from mga09.intel.com ([134.134.136.24]:1943 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932834Ab3FQMLo (ORCPT ); Mon, 17 Jun 2013 08:11:44 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 17 Jun 2013 05:09:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,880,1363158000"; d="scan'208";a="354856853" Received: from unknown (HELO zyan5-mobl.ccr.corp.intel.com) ([10.255.20.93]) by orsmga002.jf.intel.com with ESMTP; 17 Jun 2013 05:11:04 -0700 From: "Yan, Zheng" To: ceph-devel@vger.kernel.org Cc: sage@inktank.com, "Yan, Zheng" Subject: [PATCH 4/8] mds: try purging stray inode after storing backtrace Date: Mon, 17 Jun 2013 20:10:25 +0800 Message-Id: <1371471029-10589-5-git-send-email-zheng.z.yan@intel.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1371471029-10589-1-git-send-email-zheng.z.yan@intel.com> References: <1371471029-10589-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 X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Yan, Zheng" Inode is auth pinned and can't be purged while storing backtrace, so we should try purging stray inode after storing backtrace. Signed-off-by: Yan, Zheng --- src/mds/CInode.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index 0e14293..4a592bc 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -1069,11 +1069,12 @@ void CInode::_stored_backtrace(version_t v, Context *fin) { dout(10) << "_stored_backtrace" << dendl; + auth_unpin(this); if (v == inode.backtrace_version) clear_dirty_parent(); - auth_unpin(this); if (fin) fin->complete(0); + mdcache->maybe_eval_stray(this); } void CInode::_mark_dirty_parent(LogSegment *ls, bool dirty_pool)