From patchwork Wed Jan 23 03:08:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 2021901 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 879CADF2EB for ; Wed, 23 Jan 2013 03:09:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753158Ab3AWDJY (ORCPT ); Tue, 22 Jan 2013 22:09:24 -0500 Received: from mga11.intel.com ([192.55.52.93]:60962 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753101Ab3AWDJW (ORCPT ); Tue, 22 Jan 2013 22:09:22 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 22 Jan 2013 19:09:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,518,1355126400"; d="scan'208";a="280925046" Received: from zyan5-mobl.sh.intel.com ([10.239.36.31]) by fmsmga002.fm.intel.com with ESMTP; 22 Jan 2013 19:09:21 -0800 From: "Yan, Zheng" To: ceph-devel@vger.kernel.org, sage@inktank.com Cc: "Yan, Zheng" Subject: [PATCH 20/25] mds: journal inode's projected parent when doing link rollback Date: Wed, 23 Jan 2013 11:08:56 +0800 Message-Id: <1358910541-15535-21-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" Otherwise the journal entry will revert the effect of any on-going rename operation for the inode. Signed-off-by: Yan, Zheng --- src/mds/Server.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index de73a8c..4ea6d0e 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -4399,7 +4399,7 @@ void Server::do_link_rollback(bufferlist &rbl, int master, MDRequest *mdr) mut->add_projected_inode(in); // parent dir rctime - CDir *parent = in->get_parent_dn()->get_dir(); + CDir *parent = in->get_projected_parent_dn()->get_dir(); fnode_t *pf = parent->project_fnode(); mut->add_projected_fnode(parent); pf->version = parent->pre_dirty(); @@ -4424,7 +4424,7 @@ void Server::do_link_rollback(bufferlist &rbl, int master, MDRequest *mdr) mdlog->start_entry(le); le->commit.add_dir_context(parent); le->commit.add_dir(parent, true); - le->commit.add_primary_dentry(in->get_parent_dn(), true, 0); + le->commit.add_primary_dentry(in->get_projected_parent_dn(), true, 0); mdlog->submit_entry(le, new C_MDS_LoggedLinkRollback(this, mut, mdr)); mdlog->flush();