[PATCH v9 03/13] block: allow blk-zoned devices to have non-power-of-2 zone size

Pankaj Raghav p.raghav at samsung.com
Thu Aug 11 06:13:31 PDT 2022


>>  static inline bool disk_zone_is_seq(struct gendisk *disk, sector_t sector)
>>  {
>>  	if (!blk_queue_is_zoned(disk->queue))
>> @@ -753,6 +777,12 @@ static inline unsigned int disk_zone_no(struct gendisk *disk, sector_t sector)
>>  {
>>  	return 0;
>>  }
>> +
>> +static inline bool bdev_is_zone_start(struct block_device *bdev, sector_t sec)
>> +{
>> +	return false;
>> +}
> 
> Is this one really necessary ? Any caller of this would also depend on
> CONFIG_BLK_DEV_ZONED and not compiled if not enabled. So there should be no
> callers of this for the !CONFIG_BLK_DEV_ZONED case.
> 
We are using it in dm-table.c in device_area_is_invalid() function. So
it can be called without being compiled with CONFIG_BLK_DEV_ZONED like
bdev_is_zoned() in dm-table.c.
>> +
>>  static inline unsigned int bdev_max_open_zones(struct block_device *bdev)
>>  {
>>  	return 0;
> 
> 



More information about the Linux-nvme mailing list