From patchwork Thu Dec 24 11:23:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 7917071 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C73F6BEEE5 for ; Thu, 24 Dec 2015 11:24:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EED2420519 for ; Thu, 24 Dec 2015 11:24:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 239EA203AB for ; Thu, 24 Dec 2015 11:24:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754316AbbLXLYf (ORCPT ); Thu, 24 Dec 2015 06:24:35 -0500 Received: from [193.47.165.129] ([193.47.165.129]:43824 "EHLO mellanox.co.il" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754297AbbLXLYc (ORCPT ); Thu, 24 Dec 2015 06:24:32 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from sagig@mellanox.com) with ESMTPS (AES256-SHA encrypted); 24 Dec 2015 13:24:08 +0200 Received: from r-vnc05.mtr.labs.mlnx (r-vnc05.mtr.labs.mlnx [10.208.0.115]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id tBOBO71R007949; Thu, 24 Dec 2015 13:24:07 +0200 Received: from r-vnc05.mtr.labs.mlnx (localhost [127.0.0.1]) by r-vnc05.mtr.labs.mlnx (8.14.4/8.14.4) with ESMTP id tBOBO7Gx004749; Thu, 24 Dec 2015 13:24:07 +0200 Received: (from sagig@localhost) by r-vnc05.mtr.labs.mlnx (8.14.4/8.14.4/Submit) id tBOBO7kt004748; Thu, 24 Dec 2015 13:24:07 +0200 From: Sagi Grimberg To: linux-nvme@lists.infradead.org, linux-block@vger.kernel.org Cc: Keith Busch , Christoph Hellwig Subject: [PATCH RFC 2/4] nvme: Add a controller reference to the admin tagset Date: Thu, 24 Dec 2015 13:23:59 +0200 Message-Id: <1450956241-4626-3-git-send-email-sagig@mellanox.com> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1450956241-4626-1-git-send-email-sagig@mellanox.com> References: <1450956241-4626-1-git-send-email-sagig@mellanox.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We will need it in order to move the IO failure helpers to the core. Signed-off-by: Sagi Grimberg --- drivers/nvme/host/nvme.h | 1 + drivers/nvme/host/pci.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 8bc6660..2e3475e 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -49,6 +49,7 @@ struct nvme_ctrl { struct kref kref; int instance; struct blk_mq_tag_set *tagset; + struct blk_mq_tag_set *admin_tagset; struct list_head namespaces; struct device *device; /* char device */ struct list_head node; diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index a5c2390..0d78b3a 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1261,6 +1261,7 @@ static int nvme_alloc_admin_tags(struct nvme_dev *dev) blk_mq_free_tag_set(&dev->admin_tagset); return -ENOMEM; } + dev->ctrl.admin_tagset = &dev->admin_tagset; if (!blk_get_queue(dev->ctrl.admin_q)) { nvme_dev_remove_admin(dev); dev->ctrl.admin_q = NULL;