From patchwork Mon Nov 11 18:02:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13871113 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86B691BBBDC; Mon, 11 Nov 2024 18:02:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731348169; cv=none; b=PZgi7Z6KK2GPjDxds3TpBzKzpkjEOa2bE8ZnwDUVRn9ADGOzmGKstrahISrS/6E/qNLHmZzv50m/P9xGbkk1G7mCO/tC+9rD8/E/tauWMufBx7vEvgwcorqrZXhHXSK+cqRFlnQJ1bWyC9u2ms9vIB0UYGJ1b/9yTwwSZGnQHKc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731348169; c=relaxed/simple; bh=Vx5p+m9iGWXTMeWxv2yXtAZl1YKL5LF17c7Lkr/9Yws=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PgQXuMJbh4H38Ll9cXL+C0Mn+n49AcEIdKNKNepnBNrLQLS+Hal0aJJQVqxe9xbdulIDL1zBJJA2KExR2v/yjCnzE6CjXxU+HGikQZfxW1MTkG42zU+B6wrgc6p0my9HqEg+b1W7qiakD9c8uJnI+ZFy3OLo083CDFuI6JJk6Rs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GhEe1Lzw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GhEe1Lzw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7065AC4CECF; Mon, 11 Nov 2024 18:02:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731348168; bh=Vx5p+m9iGWXTMeWxv2yXtAZl1YKL5LF17c7Lkr/9Yws=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=GhEe1LzwYPDX8CvUWizPCEN2/5myM/JyJnn3utEFqQyogUErU2NZix93wKpQr+B0k 8YmaoQ/7TydDCWb/HLg8C8dk510GXNhsd0L04rgSbZaUzruuJ4+1lxA4Ic2RI1P6Z5 kB0mt3LEDD6o6ITa/PnfLVEjHc6MAXN/CSp0EwsNH9WYxdBFMsACPhKrDa0VZqRwq5 0SvMzYv11+qyV27uLTzaEtc6EJRoJVG9pfrth8h00Mf9Ac+0W/xLsz7Sw8sKok4KBT MtPJLgMUoVDhwYYKlWimFYYls3KWJiBCgw8oWsvnQEJhViCz1YqrGE381qCV7JkcT6 fXf1wyQk2wsAA== From: Daniel Wagner Date: Mon, 11 Nov 2024 19:02:13 +0100 Subject: [PATCH v2 5/6] virtio: blk/scsi: replace blk_mq_virtio_map_queues with blk_mq_hctx_map_queues Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241111-refactor-blk-affinity-helpers-v2-5-f360ddad231a@kernel.org> References: <20241111-refactor-blk-affinity-helpers-v2-0-f360ddad231a@kernel.org> In-Reply-To: <20241111-refactor-blk-affinity-helpers-v2-0-f360ddad231a@kernel.org> To: Jens Axboe , Bjorn Helgaas , "Michael S. Tsirkin" , Jason Wang , "Martin K. Petersen" , Keith Busch , Christoph Hellwig , Sagi Grimberg Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, virtualization@lists.linux.dev, linux-scsi@vger.kernel.org, megaraidlinux.pdl@broadcom.com, mpi3mr-linuxdrv.pdl@broadcom.com, MPT-FusionLinux.pdl@broadcom.com, storagedev@microchip.com, linux-nvme@lists.infradead.org, Daniel Wagner , Daniel Wagner X-Mailer: b4 0.14.2 From: Daniel Wagner Replace all users of blk_mq_virtio_map_queues with the more generic blk_mq_hctx_map_queues. This in preparation to retire blk_mq_virtio_map_queues. Signed-off-by: Daniel Wagner Reviewed-by: Christoph Hellwig --- drivers/block/virtio_blk.c | 4 ++-- drivers/scsi/virtio_scsi.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 0e99a4714928478c1ba81777b8e98448eb5b992a..3fa1e982e4f225ae1dcc02b413459b3578d9d9ca 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -1186,7 +1185,8 @@ static void virtblk_map_queues(struct blk_mq_tag_set *set) if (i == HCTX_TYPE_POLL) blk_mq_map_queues(&set->map[i]); else - blk_mq_virtio_map_queues(&set->map[i], vblk->vdev, 0); + blk_mq_hctx_map_queues(&set->map[i], &vblk->vdev->dev, + 0, NULL); } } diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 8471f38b730e205eb57052305c154260864bee95..8fdac72212bd4864029231684bb4b297131cee31 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -29,7 +29,6 @@ #include #include #include -#include #include "sd.h" @@ -746,7 +745,7 @@ static void virtscsi_map_queues(struct Scsi_Host *shost) if (i == HCTX_TYPE_POLL) blk_mq_map_queues(map); else - blk_mq_virtio_map_queues(map, vscsi->vdev, 2); + blk_mq_hctx_map_queues(map, &vscsi->vdev->dev, 2, NULL); } }