From patchwork Wed Jan 23 03:08:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 2021981 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 DDAFADF2EB for ; Wed, 23 Jan 2013 03:09:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753242Ab3AWDJg (ORCPT ); Tue, 22 Jan 2013 22:09:36 -0500 Received: from mga11.intel.com ([192.55.52.93]:51770 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753118Ab3AWDJV (ORCPT ); Tue, 22 Jan 2013 22:09:21 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 22 Jan 2013 19:09:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,518,1355126400"; d="scan'208";a="280925041" Received: from zyan5-mobl.sh.intel.com ([10.239.36.31]) by fmsmga002.fm.intel.com with ESMTP; 22 Jan 2013 19:09:20 -0800 From: "Yan, Zheng" To: ceph-devel@vger.kernel.org, sage@inktank.com Cc: "Yan, Zheng" Subject: [PATCH 19/25] mds: fix for MDCache::disambiguate_imports Date: Wed, 23 Jan 2013 11:08:55 +0800 Message-Id: <1358910541-15535-20-git-send-email-zheng.z.yan@intel.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1358910541-15535-1-git-send-email-zheng.z.yan@intel.com> References: <1358910541-15535-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" In the resolve stage, if no MDS claims other MDS's disambiguous subtree import, the subtree's dir_auth is undefined. Signed-off-by: Yan, Zheng --- src/mds/MDCache.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index e951a39..f258451 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -3077,7 +3077,8 @@ void MDCache::disambiguate_imports() CDir *dir = get_force_dirfrag(q->first); if (!dir) continue; - if (dir->is_ambiguous_auth()) { // works for me_ambig or if i am a surviving bystander + if (dir->is_ambiguous_auth() || // works for me_ambig or if i am a surviving bystander + dir->get_dir_auth() == CDIR_AUTH_UNDEF) { // resolving dout(10) << " mds." << who << " did import " << *dir << dendl; adjust_bounded_subtree_auth(dir, q->second, who); try_subtree_merge(dir);