From patchwork Wed Jul 5 17:00:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 9826829 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6BC1560317 for ; Wed, 5 Jul 2017 17:00:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CD8C28574 for ; Wed, 5 Jul 2017 17:00:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 520B528583; Wed, 5 Jul 2017 17:00:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, URIBL_BLACK autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 086A828574 for ; Wed, 5 Jul 2017 17:00:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751707AbdGERAu (ORCPT ); Wed, 5 Jul 2017 13:00:50 -0400 Received: from merlin.infradead.org ([205.233.59.134]:33740 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751745AbdGERAt (ORCPT ); Wed, 5 Jul 2017 13:00:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0RyVWj8XWY01gUauloLnuNxDR/+O4ZKnCJ/nKqrOB94=; b=A9p17B2bg2YAQMiA/9X9Q6RgS 7spWNPlDBOu2p4GhwMQ4tmpQd2bnuG114vDrT8PVSg8n+Gs1gf2a3X4JLk/uZW8Om6RELHMNZHzx9 skG5tMGnS2JoD1zhWk885c5IQp6V8P+e0bgaGMivbouzKaqQhFzw39O/X3Jwj06PqgzKubw0j1r9P 8vWEAsHSIBvusqSvpCNfSU1Nx54kNIp+Mzha+4UD8evnRTiAXRej/LxTVH7zq6yZDdd5AHnvSUnmP 8opKIMcKvAR9PEkOlouIHj10fkduUg8ksK4UVW/MXXOs2aqW3G8Y358XQq0MTicKqElxcv5WQ7cyI 8U56TnJjQ==; Received: from bzq-82-81-101-184.red.bezeqint.net ([82.81.101.184] helo=bombadil.infradead.org) by merlin.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1dSnfS-000171-4n; Wed, 05 Jul 2017 17:00:46 +0000 From: Sagi Grimberg To: Jens Axboe , linux-block@vger.kernel.org Cc: linux-nvme@lists.infradead.org, Christoph Hellwig , Keith Busch , James Smart , Ming Lei Subject: [PATCH v3 3/8] nvme-loop: quiesce/unquiesce admin_q instead of start/stop its hw queues Date: Wed, 5 Jul 2017 20:00:32 +0300 Message-Id: <1499274037-17438-4-git-send-email-sagi@grimberg.me> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499274037-17438-1-git-send-email-sagi@grimberg.me> References: <1499274037-17438-1-git-send-email-sagi@grimberg.me> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP unlike blk_mq_stop_hw_queues and blk_mq_start_stopped_hw_queues quiescing/unquiescing respects the submission path rcu grace. Reviewed-by: Ming Lei Signed-off-by: Sagi Grimberg --- drivers/nvme/target/loop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c index 3d51341e62ee..6a0b70685e77 100644 --- a/drivers/nvme/target/loop.c +++ b/drivers/nvme/target/loop.c @@ -434,9 +434,10 @@ static void nvme_loop_shutdown_ctrl(struct nvme_loop_ctrl *ctrl) if (ctrl->ctrl.state == NVME_CTRL_LIVE) nvme_shutdown_ctrl(&ctrl->ctrl); - blk_mq_stop_hw_queues(ctrl->ctrl.admin_q); + blk_mq_quiesce_queue(ctrl->ctrl.admin_q); blk_mq_tagset_busy_iter(&ctrl->admin_tag_set, nvme_cancel_request, &ctrl->ctrl); + blk_mq_unquiesce_queue(ctrl->ctrl.admin_q); nvme_loop_destroy_admin_queue(ctrl); }