All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Subject: [PATCH 1/3] null_blk: Do not set disk->nr_zones
Date: Fri, 21 Jun 2024 12:15:04 +0900	[thread overview]
Message-ID: <20240621031506.759397-2-dlemoal@kernel.org> (raw)
In-Reply-To: <20240621031506.759397-1-dlemoal@kernel.org>

In null_register_zoned_dev(), there is no need to set disk->nr_zones as
the now uncoditional call to blk_revalidate_disk_zones() will do that.
So remove the assignment using bdev_nr_zones().

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
 drivers/block/null_blk/zoned.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/block/null_blk/zoned.c b/drivers/block/null_blk/zoned.c
index b42c00f13132..9f7151ad93cf 100644
--- a/drivers/block/null_blk/zoned.c
+++ b/drivers/block/null_blk/zoned.c
@@ -171,8 +171,6 @@ int null_register_zoned_dev(struct nullb *nullb)
 	struct request_queue *q = nullb->q;
 	struct gendisk *disk = nullb->disk;
 
-	disk->nr_zones = bdev_nr_zones(disk->part0);
-
 	pr_info("%s: using %s zone append\n",
 		disk->disk_name,
 		queue_emulates_zone_append(q) ? "emulated" : "native");
-- 
2.45.2


  reply	other threads:[~2024-06-21  3:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-21  3:15 [PATCH 0/3] Cleanup blkdev zone helpers Damien Le Moal
2024-06-21  3:15 ` Damien Le Moal [this message]
2024-06-21  5:14   ` [PATCH 1/3] null_blk: Do not set disk->nr_zones Christoph Hellwig
2024-06-21 10:41   ` Johannes Thumshirn
2024-06-21  3:15 ` [PATCH 2/3] block: Define bdev_nr_zones() as an inline function Damien Le Moal
2024-06-21  5:14   ` Christoph Hellwig
2024-06-21 10:42   ` Johannes Thumshirn
2024-06-21  3:15 ` [PATCH 3/3] block: Cleanup block device zone helpers Damien Le Moal
2024-06-21  5:15   ` Christoph Hellwig
2024-06-21 10:44   ` Johannes Thumshirn
2024-06-21 10:57   ` [PATCH 1/3] null_blk: Do not set disk->nr_zones Zhu Yanjun
2024-06-21 18:32 ` [PATCH 0/3] Cleanup blkdev zone helpers Jens Axboe

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=20240621031506.759397-2-dlemoal@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=axboe@kernel.dk \
    --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 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.