[RFC PATCH 09/21] block: use lib tagset init helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the block layer helper to initialize the common fields of tag_set
such as blk_mq_ops, number of h/w queues, queue depth, command size,
numa_node, timeout, BLK_MQ_F_XXX flags, driver data. This initialization
is spread all over the block drivers. This avoids the code repetation of
the inialization code of the tag set in current block drivers and any
future ones.

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

diff --git a/block/blk-mq.c b/block/blk-mq.c
index e3a8dd81bbe2..d4cb5c44a53d 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -4455,12 +4455,9 @@ int blk_mq_alloc_sq_tag_set(struct blk_mq_tag_set *set,
 		unsigned int set_flags)
 {
 	memset(set, 0, sizeof(*set));
-	set->ops = ops;
-	set->nr_hw_queues = 1;
+	blk_mq_init_tag_set(set, ops, 1, queue_depth, 0, NUMA_NO_NODE, 0,
+			set_flags, NULL);
 	set->nr_maps = 1;
-	set->queue_depth = queue_depth;
-	set->numa_node = NUMA_NO_NODE;
-	set->flags = set_flags;
 	return blk_mq_alloc_tag_set(set);
 }
 EXPORT_SYMBOL_GPL(blk_mq_alloc_sq_tag_set);
-- 
2.29.0




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux