Re: [PATCH] ublk: decouple hctx and ublk server threads

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

 



Hi Uday,

kernel test robot noticed the following build warnings:

[auto build test WARNING on ccb1526dda70e0c1bae7fe27aa3b0c96e6e2d0cd]

url:    https://github.com/intel-lab-lkp/linux/commits/Uday-Shankar/ublk-decouple-hctx-and-ublk-server-threads/20241003-064609
base:   ccb1526dda70e0c1bae7fe27aa3b0c96e6e2d0cd
patch link:    https://lore.kernel.org/r/20241002224437.3088981-1-ushankar%40purestorage.com
patch subject: [PATCH] ublk: decouple hctx and ublk server threads
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20241006/202410060518.wRBlN5hY-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241006/202410060518.wRBlN5hY-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410060518.wRBlN5hY-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/block/ublk_drv.c: In function 'ublk_uring_cmd_cancel_fn':
>> drivers/block/ublk_drv.c:1446:29: warning: variable 'task' set but not used [-Wunused-but-set-variable]
    1446 |         struct task_struct *task;
         |                             ^~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for MODVERSIONS
   Depends on [n]: MODULES [=y] && !COMPILE_TEST [=y]
   Selected by [y]:
   - RANDSTRUCT_FULL [=y] && (CC_HAS_RANDSTRUCT [=n] || GCC_PLUGINS [=y]) && MODULES [=y]
   WARNING: unmet direct dependencies detected for GET_FREE_REGION
   Depends on [n]: SPARSEMEM [=n]
   Selected by [y]:
   - RESOURCE_KUNIT_TEST [=y] && RUNTIME_TESTING_MENU [=y] && KUNIT [=y]


vim +/task +1446 drivers/block/ublk_drv.c

216c8f5ef0f209 Ming Lei    2023-10-09  1436  
216c8f5ef0f209 Ming Lei    2023-10-09  1437  /*
216c8f5ef0f209 Ming Lei    2023-10-09  1438   * The ublk char device won't be closed when calling cancel fn, so both
216c8f5ef0f209 Ming Lei    2023-10-09  1439   * ublk device and queue are guaranteed to be live
216c8f5ef0f209 Ming Lei    2023-10-09  1440   */
216c8f5ef0f209 Ming Lei    2023-10-09  1441  static void ublk_uring_cmd_cancel_fn(struct io_uring_cmd *cmd,
216c8f5ef0f209 Ming Lei    2023-10-09  1442  		unsigned int issue_flags)
216c8f5ef0f209 Ming Lei    2023-10-09  1443  {
216c8f5ef0f209 Ming Lei    2023-10-09  1444  	struct ublk_uring_cmd_pdu *pdu = ublk_get_uring_cmd_pdu(cmd);
216c8f5ef0f209 Ming Lei    2023-10-09  1445  	struct ublk_queue *ubq = pdu->ubq;
216c8f5ef0f209 Ming Lei    2023-10-09 @1446  	struct task_struct *task;
216c8f5ef0f209 Ming Lei    2023-10-09  1447  	struct ublk_device *ub;
216c8f5ef0f209 Ming Lei    2023-10-09  1448  	bool need_schedule;
216c8f5ef0f209 Ming Lei    2023-10-09  1449  	struct ublk_io *io;
216c8f5ef0f209 Ming Lei    2023-10-09  1450  
216c8f5ef0f209 Ming Lei    2023-10-09  1451  	if (WARN_ON_ONCE(!ubq))
216c8f5ef0f209 Ming Lei    2023-10-09  1452  		return;
216c8f5ef0f209 Ming Lei    2023-10-09  1453  
216c8f5ef0f209 Ming Lei    2023-10-09  1454  	if (WARN_ON_ONCE(pdu->tag >= ubq->q_depth))
bd23f6c2c2d005 Ming Lei    2023-10-09  1455  		return;
bd23f6c2c2d005 Ming Lei    2023-10-09  1456  
216c8f5ef0f209 Ming Lei    2023-10-09  1457  	task = io_uring_cmd_get_task(cmd);
bd23f6c2c2d005 Ming Lei    2023-10-09  1458  
216c8f5ef0f209 Ming Lei    2023-10-09  1459  	ub = ubq->dev;
216c8f5ef0f209 Ming Lei    2023-10-09  1460  	need_schedule = ublk_abort_requests(ub, ubq);
216c8f5ef0f209 Ming Lei    2023-10-09  1461  
216c8f5ef0f209 Ming Lei    2023-10-09  1462  	io = &ubq->ios[pdu->tag];
216c8f5ef0f209 Ming Lei    2023-10-09  1463  	WARN_ON_ONCE(io->cmd != cmd);
b4e1353f465147 Ming Lei    2023-10-09  1464  	ublk_cancel_cmd(ubq, io, issue_flags);
216c8f5ef0f209 Ming Lei    2023-10-09  1465  
216c8f5ef0f209 Ming Lei    2023-10-09  1466  	if (need_schedule) {
bd23f6c2c2d005 Ming Lei    2023-10-09  1467  		if (ublk_can_use_recovery(ub))
bbae8d1f526b56 ZiyangZhang 2022-09-23  1468  			schedule_work(&ub->quiesce_work);
bbae8d1f526b56 ZiyangZhang 2022-09-23  1469  		else
71f28f3136aff5 Ming Lei    2022-07-13  1470  			schedule_work(&ub->stop_work);
216c8f5ef0f209 Ming Lei    2023-10-09  1471  	}
71f28f3136aff5 Ming Lei    2022-07-13  1472  }
71f28f3136aff5 Ming Lei    2022-07-13  1473  

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




[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