[RFC PATCH 03/21] nbd: use lib tagset init helper

Chaitanya Kulkarni
2022-10-05T03:24:29Z

drivers/block/nbd.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 2a2a1d996a57..01be68d1f722 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -1749,14 +1749,9 @@ 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;
+ blk_mq_init_tag_set(&nbd->tag_set, &nbd_mq_ops, 1, 128,
+ sizeof(struct nbd_cmd), NUMA_NO_NODE, 0,
+ BLK_MQ_F_SHOULD_MERGE | BLK_MQ_F_BLOCKING, nbd);
INIT_WORK(&nbd->remove_work, nbd_dev_remove_work);
nbd->backend = NULL;

--
2.29.0