Re: [PATCH v4 2/8] nvme: cleanup zone information initialization

From
Christoph Hellwig <hch@lst.de>
Date
2021-01-28 09:36:06
Also in
linux-nvme, linux-scsi
Reply to
Damien Le Moal, 2021-01-28
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.
Thread (36 messages) 36 messages, 5 authors, last reply 2021-02-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help