linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Damien Le Moal <dlemoal@kernel.org>,
	Hannes Reinecke <hare@suse.de>,
	Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: [PATCH 2/5] null_blk: initialize the tag_set timeout in null_init_tag_set
Date: Tue, 20 Feb 2024 10:32:45 +0100	[thread overview]
Message-ID: <20240220093248.3290292-3-hch@lst.de> (raw)
In-Reply-To: <20240220093248.3290292-1-hch@lst.de>

Otherwise it will be reset to the always same value when initializing a
device using the shared tag_set.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Tested-by: Damien Le Moal <dlemoal@kernel.org>
---
 drivers/block/null_blk/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index d6836327eefb42..89e63d1c610362 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -1797,6 +1797,7 @@ static int null_init_tag_set(struct nullb *nullb, struct blk_mq_tag_set *set)
 	set->nr_hw_queues = hw_queues;
 	set->queue_depth = queue_depth;
 	set->numa_node = numa_node;
+	set->timeout = 5 * HZ;
 	if (poll_queues) {
 		set->nr_hw_queues += poll_queues;
 		set->nr_maps = 3;
@@ -1921,7 +1922,6 @@ static int null_add_dev(struct nullb_device *dev)
 	if (rv)
 		goto out_cleanup_queues;
 
-	nullb->tag_set->timeout = 5 * HZ;
 	nullb->disk = blk_mq_alloc_disk(nullb->tag_set, NULL, nullb);
 	if (IS_ERR(nullb->disk)) {
 		rv = PTR_ERR(nullb->disk);
-- 
2.39.2


  parent reply	other threads:[~2024-02-20  9:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20  9:32 drop bio mode from null_blk and convert it to atomic queue limits v4 Christoph Hellwig
2024-02-20  9:32 ` [PATCH 1/5] null_blk: remove the bio based I/O path Christoph Hellwig
2024-02-20 11:02   ` John Garry
2024-02-20  9:32 ` Christoph Hellwig [this message]
2024-02-20  9:32 ` [PATCH 3/5] null_blk: refactor tag_set setup Christoph Hellwig
2024-02-20  9:32 ` [PATCH 4/5] null_blk: remove null_gendisk_register Christoph Hellwig
2024-02-20  9:32 ` [PATCH 5/5] null_blk: pass queue_limits to blk_mq_alloc_disk Christoph Hellwig
2024-02-20 13:22 ` drop bio mode from null_blk and convert it to atomic queue limits v4 Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2024-02-20  5:32 drop bio mode from null_blk and convert it to atomic queue limits v3 Christoph Hellwig
2024-02-20  5:33 ` [PATCH 2/5] null_blk: initialize the tag_set timeout in null_init_tag_set Christoph Hellwig
2024-02-20  7:21   ` Hannes Reinecke
2024-02-19  6:29 drop bio mode from null_blk and convert it to atomic queue limits v2 Christoph Hellwig
2024-02-19  6:29 ` [PATCH 2/5] null_blk: initialize the tag_set timeout in null_init_tag_set Christoph Hellwig
2024-02-14  9:54 drop bio mode from null_blk and convert it to atomic queue limits Christoph Hellwig
2024-02-14  9:54 ` [PATCH 2/5] null_blk: initialize the tag_set timeout in null_init_tag_set Christoph Hellwig
2024-02-14 11:26   ` Damien Le Moal

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=20240220093248.3290292-3-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --cc=hare@suse.de \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-block@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).