From patchwork Mon Nov 19 02:43:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 1762161 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 E216A3FCDE for ; Mon, 19 Nov 2012 02:44:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752926Ab2KSCoA (ORCPT ); Sun, 18 Nov 2012 21:44:00 -0500 Received: from mga11.intel.com ([192.55.52.93]:17039 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752899Ab2KSCn7 (ORCPT ); Sun, 18 Nov 2012 21:43:59 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 18 Nov 2012 18:43:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.83,275,1352102400"; d="scan'208";a="251134096" Received: from zyan5-mobl.sh.intel.com ([10.239.36.18]) by fmsmga002.fm.intel.com with ESMTP; 18 Nov 2012 18:43:58 -0800 From: "Yan, Zheng" To: ceph-devel@vger.kernel.org, sage@inktank.com Cc: "Yan, Zheng" Subject: [PATCH 07/16] mds: call eval() after caps are exported Date: Mon, 19 Nov 2012 10:43:39 +0800 Message-Id: <1353293028-15238-8-git-send-email-zheng.z.yan@intel.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1353293028-15238-1-git-send-email-zheng.z.yan@intel.com> References: <1353293028-15238-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" For an inode just changed authority, if the new auth MDS want to change a lock in the inode from 'sync' to 'lock' state before caps are exported. The lock in replica can be in 'sync->lock' state because client caps prevent it from transitting to 'lock' state. So we should call eval() after clearing client caps. Signed-off-by: Yan, Zheng --- src/mds/Migrator.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 9829d68..41d97e9 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -1052,6 +1052,7 @@ void Migrator::finish_export_inode_caps(CInode *in) mds->send_message_client_counted(m, it->first); } in->clear_client_caps_after_export(); + mds->locker->eval(in, CEPH_CAP_LOCKS); } void Migrator::finish_export_inode(CInode *in, utime_t now, list& finished)