Re: [PATCH] block: ublk: enable zoned storage support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andreas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v6.2]
[cannot apply to axboe-block/for-next linus/master next-20230224]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andreas-Hindborg/block-ublk-enable-zoned-storage-support/20230224-210205
patch link:    https://lore.kernel.org/r/20230224125950.214779-1-nmi%40metaspace.dk
patch subject: [PATCH] block: ublk: enable zoned storage support
config: ia64-buildonly-randconfig-r006-20230222 (https://download.01.org/0day-ci/archive/20230225/202302250222.XOrw9j6z-lkp@xxxxxxxxx/config)
compiler: ia64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/6d088fc1b115a63e8888b12fa47aabd45be97460
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Andreas-Hindborg/block-ublk-enable-zoned-storage-support/20230224-210205
        git checkout 6d088fc1b115a63e8888b12fa47aabd45be97460
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202302250222.XOrw9j6z-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/block/ublk_drv.c: In function 'ublk_dev_param_basic_apply':
>> drivers/block/ublk_drv.c:221:28: error: 'struct gendisk' has no member named 'nr_zones'
     221 |                 ub->ub_disk->nr_zones = p->dev_sectors / p->chunk_sectors;
         |                            ^~
   drivers/block/ublk_drv.c: In function 'ublk_dev_param_zoned_apply':
>> drivers/block/ublk_drv.c:244:17: error: implicit declaration of function 'disk_set_max_active_zones'; did you mean 'bdev_max_active_zones'? [-Werror=implicit-function-declaration]
     244 |                 disk_set_max_active_zones(ub->ub_disk, p->max_active_zones);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
         |                 bdev_max_active_zones
>> drivers/block/ublk_drv.c:245:17: error: implicit declaration of function 'disk_set_max_open_zones'; did you mean 'bdev_max_open_zones'? [-Werror=implicit-function-declaration]
     245 |                 disk_set_max_open_zones(ub->ub_disk, p->max_open_zones);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~
         |                 bdev_max_open_zones
   drivers/block/ublk_drv.c: In function 'ublk_ctrl_start_dev':
>> drivers/block/ublk_drv.c:1663:23: error: implicit declaration of function 'blk_revalidate_disk_zones' [-Werror=implicit-function-declaration]
    1663 |                 ret = blk_revalidate_disk_zones(disk, NULL);
         |                       ^~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +221 drivers/block/ublk_drv.c

   192	
   193	static void ublk_dev_param_basic_apply(struct ublk_device *ub)
   194	{
   195		struct request_queue *q = ub->ub_disk->queue;
   196		const struct ublk_param_basic *p = &ub->params.basic;
   197	
   198		blk_queue_logical_block_size(q, 1 << p->logical_bs_shift);
   199		blk_queue_physical_block_size(q, 1 << p->physical_bs_shift);
   200		blk_queue_io_min(q, 1 << p->io_min_shift);
   201		blk_queue_io_opt(q, 1 << p->io_opt_shift);
   202	
   203		blk_queue_write_cache(q, p->attrs & UBLK_ATTR_VOLATILE_CACHE,
   204				p->attrs & UBLK_ATTR_FUA);
   205		if (p->attrs & UBLK_ATTR_ROTATIONAL)
   206			blk_queue_flag_clear(QUEUE_FLAG_NONROT, q);
   207		else
   208			blk_queue_flag_set(QUEUE_FLAG_NONROT, q);
   209	
   210		blk_queue_max_hw_sectors(q, p->max_sectors);
   211		blk_queue_chunk_sectors(q, p->chunk_sectors);
   212		blk_queue_virt_boundary(q, p->virt_boundary_mask);
   213	
   214		if (p->attrs & UBLK_ATTR_READ_ONLY)
   215			set_disk_ro(ub->ub_disk, true);
   216	
   217		set_capacity(ub->ub_disk, p->dev_sectors);
   218	
   219		if (IS_ENABLED(CONFIG_BLK_DEV_ZONED) &&
   220		    ub->dev_info.flags & UBLK_F_ZONED && p->chunk_sectors) {
 > 221			ub->ub_disk->nr_zones = p->dev_sectors / p->chunk_sectors;
   222		}
   223	}
   224	
   225	static void ublk_dev_param_discard_apply(struct ublk_device *ub)
   226	{
   227		struct request_queue *q = ub->ub_disk->queue;
   228		const struct ublk_param_discard *p = &ub->params.discard;
   229	
   230		q->limits.discard_alignment = p->discard_alignment;
   231		q->limits.discard_granularity = p->discard_granularity;
   232		blk_queue_max_discard_sectors(q, p->max_discard_sectors);
   233		blk_queue_max_write_zeroes_sectors(q,
   234				p->max_write_zeroes_sectors);
   235		blk_queue_max_discard_segments(q, p->max_discard_segments);
   236	}
   237	
   238	static void ublk_dev_param_zoned_apply(struct ublk_device *ub)
   239	{
   240		const struct ublk_param_zoned *p = &ub->params.zoned;
   241	
   242		if (IS_ENABLED(CONFIG_BLK_DEV_ZONED) &&
   243		    ub->dev_info.flags & UBLK_F_ZONED) {
 > 244			disk_set_max_active_zones(ub->ub_disk, p->max_active_zones);
 > 245			disk_set_max_open_zones(ub->ub_disk, p->max_open_zones);
   246			/* We do not support zone append yet */
   247			//blk_queue_max_zone_append_sectors(q, zone_size);
   248		}
   249	}
   250	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux