From patchwork Thu Nov 1 09:03:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 1683621 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2BEB8DF264 for ; Thu, 1 Nov 2012 09:03:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758697Ab2KAJDt (ORCPT ); Thu, 1 Nov 2012 05:03:49 -0400 Received: from mga01.intel.com ([192.55.52.88]:13445 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758572Ab2KAJDr (ORCPT ); Thu, 1 Nov 2012 05:03:47 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 01 Nov 2012 02:03:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,692,1344236400"; d="scan'208";a="241265483" Received: from zyan5-mobl.sh.intel.com ([10.239.36.138]) by fmsmga001.fm.intel.com with ESMTP; 01 Nov 2012 02:03:42 -0700 From: "Yan, Zheng" To: sage@inktank.com, ceph-devel@vger.kernel.org Cc: "Yan, Zheng" Subject: [PATCH 2/2] mds: Allow try_eval to eval unstable locks in freezing object Date: Thu, 1 Nov 2012 17:03:38 +0800 Message-Id: <1351760618-19874-4-git-send-email-zheng.z.yan@intel.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1351760618-19874-1-git-send-email-zheng.z.yan@intel.com> References: <1351760618-19874-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" Unstable locks hold auth_pins on the object, it prevents the freezing object become frozen and then unfreeze. So try_eval() should not wait for freezing object Signed-off-by: Yan, Zheng --- src/mds/Locker.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 6474743..68ecc16 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -837,8 +837,8 @@ void Locker::try_eval(MDSCacheObject *p, int mask) return; } - if (p->is_auth() && !p->can_auth_pin()) { - dout(7) << "try_eval can't auth_pin, waiting on " << *p << dendl; + if (p->is_auth() && p->is_frozen()) { + dout(7) << "try_eval frozen, waiting on " << *p << dendl; p->add_waiter(MDSCacheObject::WAIT_UNFREEZE, new C_Locker_Eval(this, p, mask)); return; }