From patchwork Mon Jan 28 02:28:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 2052931 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 03C85DFE86 for ; Mon, 28 Jan 2013 02:28:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752086Ab3A1C2c (ORCPT ); Sun, 27 Jan 2013 21:28:32 -0500 Received: from mga01.intel.com ([192.55.52.88]:58841 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751934Ab3A1C2b (ORCPT ); Sun, 27 Jan 2013 21:28:31 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 27 Jan 2013 18:28:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,548,1355126400"; d="scan'208";a="279067341" Received: from zyan5-mobl.sh.intel.com ([10.239.36.156]) by fmsmga001.fm.intel.com with ESMTP; 27 Jan 2013 18:28:30 -0800 From: "Yan, Zheng" To: ceph-devel@vger.kernel.org, sage@inktank.com Cc: "Yan, Zheng" Subject: [PATCH 2/6] mds: add projected rename's subtree bounds to ESubtreeMap Date: Mon, 28 Jan 2013 10:28:22 +0800 Message-Id: <1359340106-24257-3-git-send-email-zheng.z.yan@intel.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1359340106-24257-1-git-send-email-zheng.z.yan@intel.com> References: <1359340106-24257-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 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 5d88075..9ad6919 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -2343,11 +2343,17 @@ ESubtreeMap *MDCache::create_subtree_map() if (oldparent->get_dir_auth() != newparent->get_dir_auth()) { dout(10) << " creating subtree for " << dir->dirfrag() << dendl; // if oldparent is auth, subtree is mine; include it. - if (oldparent->get_dir_auth().first == mds->whoami) + if (oldparent->get_dir_auth().first == mds->whoami) { le->subtrees[dir->dirfrag()].clear(); + le->metablob.add_dir_context(dir, EMetaBlob::TO_ROOT); + le->metablob.add_dir(dir, false); + } // if newparent is auth, subtree is a new bound - if (le->subtrees.count(newparent->dirfrag())) + if (le->subtrees.count(newparent->dirfrag())) { le->subtrees[newparent->dirfrag()].push_back(dir->dirfrag()); // newparent is auth; new bound + le->metablob.add_dir_context(dir, EMetaBlob::TO_ROOT); + le->metablob.add_dir(dir, false); + } newparent = dir; }