All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <kch@nvidia.com>
To: <linux-block@vger.kernel.org>
Cc: <axboe@kernel.dk>, <kch@nvidia.com>, <hch@lst.de>,
	<damien.lemoal@opensource.wdc.com>, <johannes.thumshirn@wdc.com>,
	<bvanassche@acm.org>, <ming.lei@redhat.com>,
	<shinichiro.kawasaki@wdc.com>, <vincent.fu@samsung.com>
Subject: [RFC PATCH 2/6] nbd: use init alloc tagset helper
Date: Mon, 10 Oct 2022 10:00:22 -0700	[thread overview]
Message-ID: <20221010170026.49808-3-kch@nvidia.com> (raw)
In-Reply-To: <20221010170026.49808-1-kch@nvidia.com>

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
 drivers/block/nbd.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 2a2a1d996a57..7a304812c280 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -1749,18 +1749,15 @@ static struct nbd_device *nbd_dev_add(int index, unsigned int refs)
 	if (!nbd)
 		goto out;
 
-	nbd->tag_set.ops = &nbd_mq_ops;
-	nbd->tag_set.nr_hw_queues = 1;
-	nbd->tag_set.queue_depth = 128;
 	nbd->tag_set.numa_node = NUMA_NO_NODE;
 	nbd->tag_set.cmd_size = sizeof(struct nbd_cmd);
 	nbd->tag_set.flags = BLK_MQ_F_SHOULD_MERGE |
 		BLK_MQ_F_BLOCKING;
-	nbd->tag_set.driver_data = nbd;
 	INIT_WORK(&nbd->remove_work, nbd_dev_remove_work);
 	nbd->backend = NULL;
 
-	err = blk_mq_alloc_tag_set(&nbd->tag_set);
+	err = blk_mq_init_alloc_tag_set(&nbd->tag_set, &nbd_mq_ops, 1, 128,
+					nbd);
 	if (err)
 		goto out_free_nbd;
 
-- 
2.29.0


  parent reply	other threads:[~2022-10-10 17:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10 17:00 [RFC PATCH 0/6] block: add and use tagset init helper Chaitanya Kulkarni
2022-10-10 17:00 ` [RFC PATCH 1/6] " Chaitanya Kulkarni
2022-10-10 17:00 ` Chaitanya Kulkarni [this message]
2022-10-10 17:00 ` [RFC PATCH 3/6] virtio-blk: use init alloc tagset helper Chaitanya Kulkarni
2022-10-10 17:00 ` [RFC PATCH 4/6] nvme-apple: " Chaitanya Kulkarni
2022-10-11 11:53   ` kernel test robot
2022-10-11 13:07     ` Chaitanya Kulkarni
2022-10-11 13:07       ` Chaitanya Kulkarni
2022-10-10 17:00 ` [RFC PATCH 5/6] nvme-core: " Chaitanya Kulkarni
2022-10-10 17:00 ` [RFC PATCH 6/6] nvme-pci: " Chaitanya Kulkarni
2022-10-10 17:40 ` [RFC PATCH 0/6] block: add and use tagset init helper Chaitanya Kulkarni
2022-10-11  6:06 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221010170026.49808-3-kch@nvidia.com \
    --to=kch@nvidia.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=hch@lst.de \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=shinichiro.kawasaki@wdc.com \
    --cc=vincent.fu@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.