From patchwork Mon Jan 28 02:28:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 2052951 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 F092EDFE86 for ; Mon, 28 Jan 2013 02:28:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752185Ab3A1C2f (ORCPT ); Sun, 27 Jan 2013 21:28:35 -0500 Received: from mga01.intel.com ([192.55.52.88]:52188 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752122Ab3A1C2d (ORCPT ); Sun, 27 Jan 2013 21:28:33 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 27 Jan 2013 18:28:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,548,1355126400"; d="scan'208";a="279067348" Received: from zyan5-mobl.sh.intel.com ([10.239.36.156]) by fmsmga001.fm.intel.com with ESMTP; 27 Jan 2013 18:28:31 -0800 From: "Yan, Zheng" To: ceph-devel@vger.kernel.org, sage@inktank.com Cc: "Yan, Zheng" Subject: [PATCH 4/6] mds: allow handling slave request in the clientreplay stage Date: Mon, 28 Jan 2013 10:28:24 +0800 Message-Id: <1359340106-24257-5-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" replaying a client request may need to create slave request and the slave MDS can be also in the clientreplay stage. Signed-off-by: Yan, Zheng --- src/mds/Server.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 083c287..520d389 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -101,6 +101,10 @@ void Server::dispatch(Message *m) (m->get_type() == CEPH_MSG_CLIENT_REQUEST && ((MClientRequest*)m)->is_replay()))) { // replaying! + } else if (mds->is_clientreplay() && m->get_type() == MSG_MDS_SLAVE_REQUEST && + (((MMDSSlaveRequest*)m)->is_reply() || + !mds->mdsmap->is_active(m->get_source().num()))) { + // slave reply or the master is also in the clientreplay stage } else { dout(3) << "not active yet, waiting" << dendl; mds->wait_for_active(new C_MDS_RetryMessage(mds, m));