From patchwork Wed Oct 3 11:40:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 1541151 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 9DD83DFF71 for ; Wed, 3 Oct 2012 11:40:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752028Ab2JCLkR (ORCPT ); Wed, 3 Oct 2012 07:40:17 -0400 Received: from mga11.intel.com ([192.55.52.93]:39917 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751942Ab2JCLkQ (ORCPT ); Wed, 3 Oct 2012 07:40:16 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 03 Oct 2012 04:40:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,527,1344236400"; d="scan'208";a="229400136" Received: from unknown (HELO zyan5-mobl.ccr.corp.intel.com) ([10.255.21.42]) by fmsmga001.fm.intel.com with ESMTP; 03 Oct 2012 04:40:14 -0700 From: "Yan, Zheng" To: sage@inktank.com, ceph-devel@vger.kernel.org Cc: "Yan, Zheng" Subject: [PATCH] mds: Use stray dir as base inode for stray reintegration Date: Wed, 3 Oct 2012 19:40:12 +0800 Message-Id: <1349264412-31444-1-git-send-email-zheng.z.yan@intel.com> X-Mailer: git-send-email 1.7.11.4 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org From: "Yan, Zheng" Server::handle_client_rename() only skips common ancestor check if source path's base inode is stray directory, but source path's base inode is mdsdir in the stray reintegration case. Signed-off-by: Yan, Zheng --- src/mds/MDCache.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 8b02b8b..32c9e36 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -8288,8 +8288,7 @@ void MDCache::reintegrate_stray(CDentry *straydn, CDentry *rdn) dout(10) << "reintegrate_stray " << *straydn << " into " << *rdn << dendl; // rename it to another mds. - filepath src; - straydn->make_path(src); + filepath src(straydn->get_name(), straydn->get_dir()->get_inode()->ino()); filepath dst; rdn->make_path(dst);