From: Christoph Hellwig <hch@lst.de>
To: Damien Le Moal <Damien.LeMoal@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
Jens Axboe <axboe@kernel.dk>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
Keith Busch <Keith.Busch@wdc.com>,
Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
Subject: Re: [PATCH v4 2/8] nvme: cleanup zone information initialization
Date: Thu, 28 Jan 2021 10:32:40 +0100 [thread overview]
Message-ID: <20210128093240.GA3212@lst.de> (raw)
In-Reply-To: <BL0PR04MB6514F6AD357E545CBCAB877DE7BA9@BL0PR04MB6514.namprd04.prod.outlook.com>
On Thu, Jan 28, 2021 at 09:27:41AM +0000, Damien Le Moal wrote:
>
> I tried that first, but it did not work. I end up with
> blk_revalidate_disk_zones() undefined error with !CONFIG_BLK_DEV_ZONED.
> This is because blk_queue_is_zoned() is *not* stubbed for !CONFIG_BLK_DEV_ZONED.
> It will simply always return 0/none in that case. We would need to have:
Hmm. blk_queue_is_zoned is calls blk_queue_zoned_model, which
always returns BLK_ZONED_NONE for !CONFIG_BLK_DEV_ZONED, and I thought we
rely on that elsewhere in nvme. That is a fairly recent change from me,
though.
>
> if (IS_ENABLED(CONFIG_BLK_DEV_ZONED) && blk_queue_is_zoned()) {
> ret = blk_revalidate_disk_zones(ns->disk, NULL);
> ...
>
> Or stub blk_queue_is_zoned()...
If the above really doesn't work we should properly stub it out.
Anyway, I think we can go with your current patch:
Reviewed-by: Christoph Hellwig <hch@lst.de>
and refine all the zoned stubs later. I have a few more ideas for
improvements there anyway.
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Damien Le Moal <Damien.LeMoal@wdc.com>
Cc: Jens Axboe <axboe@kernel.dk>, Keith Busch <Keith.Busch@wdc.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v4 2/8] nvme: cleanup zone information initialization
Date: Thu, 28 Jan 2021 10:32:40 +0100 [thread overview]
Message-ID: <20210128093240.GA3212@lst.de> (raw)
In-Reply-To: <BL0PR04MB6514F6AD357E545CBCAB877DE7BA9@BL0PR04MB6514.namprd04.prod.outlook.com>
On Thu, Jan 28, 2021 at 09:27:41AM +0000, Damien Le Moal wrote:
>
> I tried that first, but it did not work. I end up with
> blk_revalidate_disk_zones() undefined error with !CONFIG_BLK_DEV_ZONED.
> This is because blk_queue_is_zoned() is *not* stubbed for !CONFIG_BLK_DEV_ZONED.
> It will simply always return 0/none in that case. We would need to have:
Hmm. blk_queue_is_zoned is calls blk_queue_zoned_model, which
always returns BLK_ZONED_NONE for !CONFIG_BLK_DEV_ZONED, and I thought we
rely on that elsewhere in nvme. That is a fairly recent change from me,
though.
>
> if (IS_ENABLED(CONFIG_BLK_DEV_ZONED) && blk_queue_is_zoned()) {
> ret = blk_revalidate_disk_zones(ns->disk, NULL);
> ...
>
> Or stub blk_queue_is_zoned()...
If the above really doesn't work we should properly stub it out.
Anyway, I think we can go with your current patch:
Reviewed-by: Christoph Hellwig <hch@lst.de>
and refine all the zoned stubs later. I have a few more ideas for
improvements there anyway.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2021-01-28 9:36 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-28 4:47 [PATCH v4 0/8] block: add zone write granularity limit Damien Le Moal
2021-01-28 4:47 ` Damien Le Moal
2021-01-28 4:47 ` [PATCH v4 1/8] block: document zone_append_max_bytes attribute Damien Le Moal
2021-01-28 4:47 ` Damien Le Moal
2021-01-28 10:20 ` Johannes Thumshirn
2021-01-28 10:20 ` Johannes Thumshirn
2021-01-28 4:47 ` [PATCH v4 2/8] nvme: cleanup zone information initialization Damien Le Moal
2021-01-28 4:47 ` Damien Le Moal
2021-01-28 9:17 ` Christoph Hellwig
2021-01-28 9:17 ` Christoph Hellwig
2021-01-28 9:27 ` Damien Le Moal
2021-01-28 9:27 ` Damien Le Moal
2021-01-28 9:32 ` Christoph Hellwig [this message]
2021-01-28 9:32 ` Christoph Hellwig
2021-01-28 4:47 ` [PATCH v4 3/8] nullb: use blk_queue_set_zoned() to setup zoned devices Damien Le Moal
2021-01-28 4:47 ` Damien Le Moal
2021-01-28 5:12 ` Chaitanya Kulkarni
2021-01-28 5:12 ` Chaitanya Kulkarni
2021-01-28 9:17 ` Christoph Hellwig
2021-01-28 9:17 ` Christoph Hellwig
2021-01-28 11:17 ` Johannes Thumshirn
2021-01-28 11:17 ` Johannes Thumshirn
2021-01-28 4:47 ` [PATCH v4 4/8] block: use blk_queue_set_zoned in add_partition() Damien Le Moal
2021-01-28 4:47 ` Damien Le Moal
2021-01-28 5:16 ` Chaitanya Kulkarni
2021-01-28 5:16 ` Chaitanya Kulkarni
2021-01-28 9:17 ` Christoph Hellwig
2021-01-28 9:17 ` Christoph Hellwig
2021-01-28 11:28 ` Johannes Thumshirn
2021-01-28 11:28 ` Johannes Thumshirn
2021-01-28 4:47 ` [PATCH v4 5/8] block: introduce zone_write_granularity limit Damien Le Moal
2021-01-28 4:47 ` Damien Le Moal
2021-01-28 9:19 ` Christoph Hellwig
2021-01-28 9:19 ` Christoph Hellwig
2021-01-28 11:32 ` Johannes Thumshirn
2021-01-28 11:32 ` Johannes Thumshirn
2021-02-05 2:54 ` Martin K. Petersen
2021-02-05 2:54 ` Martin K. Petersen
2021-01-28 4:47 ` [PATCH v4 6/8] zonefs: use zone write granularity as block size Damien Le Moal
2021-01-28 4:47 ` Damien Le Moal
2021-01-28 5:17 ` Chaitanya Kulkarni
2021-01-28 5:17 ` Chaitanya Kulkarni
2021-01-28 11:33 ` Johannes Thumshirn
2021-01-28 11:33 ` Johannes Thumshirn
2021-01-28 4:47 ` [PATCH v4 7/8] block: introduce blk_queue_clear_zone_settings() Damien Le Moal
2021-01-28 4:47 ` Damien Le Moal
2021-01-28 5:26 ` Chaitanya Kulkarni
2021-01-28 5:26 ` Chaitanya Kulkarni
2021-01-28 9:21 ` Christoph Hellwig
2021-01-28 9:21 ` Christoph Hellwig
2021-01-28 9:32 ` Damien Le Moal
2021-01-28 9:32 ` Damien Le Moal
2021-01-28 9:33 ` Christoph Hellwig
2021-01-28 9:33 ` Christoph Hellwig
2021-01-28 11:43 ` Johannes Thumshirn
2021-01-28 11:43 ` Johannes Thumshirn
2021-01-28 4:47 ` [PATCH v4 8/8] sd_zbc: clear zone resources for non-zoned case Damien Le Moal
2021-01-28 4:47 ` Damien Le Moal
2021-01-28 5:38 ` Chaitanya Kulkarni
2021-01-28 5:38 ` Chaitanya Kulkarni
2021-01-28 5:40 ` Damien Le Moal
2021-01-28 5:40 ` Damien Le Moal
2021-01-28 9:24 ` Christoph Hellwig
2021-01-28 9:24 ` Christoph Hellwig
2021-01-28 9:36 ` Damien Le Moal
2021-01-28 9:36 ` Damien Le Moal
2021-01-28 11:48 ` Johannes Thumshirn
2021-01-28 11:48 ` Johannes Thumshirn
2021-02-05 2:56 ` Martin K. Petersen
2021-02-05 2:56 ` Martin K. Petersen
2021-02-04 8:47 ` [PATCH v4 0/8] block: add zone write granularity limit Damien Le Moal
2021-02-04 8:47 ` Damien Le Moal
2021-02-08 17:17 ` Christoph Hellwig
2021-02-08 17:17 ` Christoph Hellwig
2021-02-10 14:45 ` Jens Axboe
2021-02-10 14:45 ` 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=20210128093240.GA3212@lst.de \
--to=hch@lst.de \
--cc=Chaitanya.Kulkarni@wdc.com \
--cc=Damien.LeMoal@wdc.com \
--cc=Keith.Busch@wdc.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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.