Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nvmet: zns: Do not reference the gendisk conv_zones_bitmap

The gendisk conventional zone bitmap is going away. So to check for the
presence of conventional zones on a zoned target device, always use
report zones.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Tested-by: Hans Holmberg <hans.holmberg@wdc.com>
Tested-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240408014128.205141-19-dlemoal@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Damien Le Moal and committed by
Jens Axboe
d2a9b5fd f4f84586

+3 -7
+3 -7
drivers/nvme/target/zns.c
··· 52 52 if (get_capacity(bd_disk) & (bdev_zone_sectors(ns->bdev) - 1)) 53 53 return false; 54 54 /* 55 - * ZNS does not define a conventional zone type. If the underlying 56 - * device has a bitmap set indicating the existence of conventional 57 - * zones, reject the device. Otherwise, use report zones to detect if 58 - * the device has conventional zones. 55 + * ZNS does not define a conventional zone type. Use report zones 56 + * to detect if the device has conventional zones and reject it if 57 + * it does. 59 58 */ 60 - if (ns->bdev->bd_disk->conv_zones_bitmap) 61 - return false; 62 - 63 59 ret = blkdev_report_zones(ns->bdev, 0, bdev_nr_zones(ns->bdev), 64 60 validate_conv_zones_cb, NULL); 65 61 if (ret < 0)