From: kernel test robot <lkp@intel.com>
To: Qu Wenruo <wqu@suse.com>,
linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz
Subject: Re: [PATCH v2 5/6] btrfs: implement shutdown ioctl
Date: Wed, 2 Jul 2025 17:38:16 +0800 [thread overview]
Message-ID: <202507021710.jq2jhLL2-lkp@intel.com> (raw)
In-Reply-To: <7572ae432f4caebf074e0b9db8a88a502aed3217.1751347436.git.wqu@suse.com>
Hi Qu,
kernel test robot noticed the following build warnings:
[auto build test WARNING on kdave/for-next]
[also build test WARNING on brauner-vfs/vfs.all tytso-ext4/dev jaegeuk-f2fs/dev xfs-linux/for-next linus/master v6.16-rc4 next-20250701]
[cannot apply to jaegeuk-f2fs/dev-test]
[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/Qu-Wenruo/fs-enhance-and-rename-shutdown-callback-to-remove_bdev/20250701-133555
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
patch link: https://lore.kernel.org/r/7572ae432f4caebf074e0b9db8a88a502aed3217.1751347436.git.wqu%40suse.com
patch subject: [PATCH v2 5/6] btrfs: implement shutdown ioctl
config: arm-randconfig-001-20250702 (https://download.01.org/0day-ci/archive/20250702/202507021710.jq2jhLL2-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250702/202507021710.jq2jhLL2-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507021710.jq2jhLL2-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/btrfs/ioctl.c:5250:16: warning: unused variable 'flags' [-Wunused-variable]
5250 | unsigned long flags;
| ^~~~~
1 warning generated.
vim +/flags +5250 fs/btrfs/ioctl.c
5241
5242 long btrfs_ioctl(struct file *file, unsigned int
5243 cmd, unsigned long arg)
5244 {
5245 struct inode *inode = file_inode(file);
5246 struct btrfs_fs_info *fs_info = inode_to_fs_info(inode);
5247 struct btrfs_root *root = BTRFS_I(inode)->root;
5248 void __user *argp = (void __user *)arg;
5249 /* If @arg is just an unsigned long value. */
> 5250 unsigned long flags;
5251
5252 switch (cmd) {
5253 case FS_IOC_GETVERSION:
5254 return btrfs_ioctl_getversion(inode, argp);
5255 case FS_IOC_GETFSLABEL:
5256 return btrfs_ioctl_get_fslabel(fs_info, argp);
5257 case FS_IOC_SETFSLABEL:
5258 return btrfs_ioctl_set_fslabel(file, argp);
5259 case FITRIM:
5260 return btrfs_ioctl_fitrim(fs_info, argp);
5261 case BTRFS_IOC_SNAP_CREATE:
5262 return btrfs_ioctl_snap_create(file, argp, 0);
5263 case BTRFS_IOC_SNAP_CREATE_V2:
5264 return btrfs_ioctl_snap_create_v2(file, argp, 0);
5265 case BTRFS_IOC_SUBVOL_CREATE:
5266 return btrfs_ioctl_snap_create(file, argp, 1);
5267 case BTRFS_IOC_SUBVOL_CREATE_V2:
5268 return btrfs_ioctl_snap_create_v2(file, argp, 1);
5269 case BTRFS_IOC_SNAP_DESTROY:
5270 return btrfs_ioctl_snap_destroy(file, argp, false);
5271 case BTRFS_IOC_SNAP_DESTROY_V2:
5272 return btrfs_ioctl_snap_destroy(file, argp, true);
5273 case BTRFS_IOC_SUBVOL_GETFLAGS:
5274 return btrfs_ioctl_subvol_getflags(BTRFS_I(inode), argp);
5275 case BTRFS_IOC_SUBVOL_SETFLAGS:
5276 return btrfs_ioctl_subvol_setflags(file, argp);
5277 case BTRFS_IOC_DEFAULT_SUBVOL:
5278 return btrfs_ioctl_default_subvol(file, argp);
5279 case BTRFS_IOC_DEFRAG:
5280 return btrfs_ioctl_defrag(file, NULL);
5281 case BTRFS_IOC_DEFRAG_RANGE:
5282 return btrfs_ioctl_defrag(file, argp);
5283 case BTRFS_IOC_RESIZE:
5284 return btrfs_ioctl_resize(file, argp);
5285 case BTRFS_IOC_ADD_DEV:
5286 return btrfs_ioctl_add_dev(fs_info, argp);
5287 case BTRFS_IOC_RM_DEV:
5288 return btrfs_ioctl_rm_dev(file, argp);
5289 case BTRFS_IOC_RM_DEV_V2:
5290 return btrfs_ioctl_rm_dev_v2(file, argp);
5291 case BTRFS_IOC_FS_INFO:
5292 return btrfs_ioctl_fs_info(fs_info, argp);
5293 case BTRFS_IOC_DEV_INFO:
5294 return btrfs_ioctl_dev_info(fs_info, argp);
5295 case BTRFS_IOC_TREE_SEARCH:
5296 return btrfs_ioctl_tree_search(root, argp);
5297 case BTRFS_IOC_TREE_SEARCH_V2:
5298 return btrfs_ioctl_tree_search_v2(root, argp);
5299 case BTRFS_IOC_INO_LOOKUP:
5300 return btrfs_ioctl_ino_lookup(root, argp);
5301 case BTRFS_IOC_INO_PATHS:
5302 return btrfs_ioctl_ino_to_path(root, argp);
5303 case BTRFS_IOC_LOGICAL_INO:
5304 return btrfs_ioctl_logical_to_ino(fs_info, argp, 1);
5305 case BTRFS_IOC_LOGICAL_INO_V2:
5306 return btrfs_ioctl_logical_to_ino(fs_info, argp, 2);
5307 case BTRFS_IOC_SPACE_INFO:
5308 return btrfs_ioctl_space_info(fs_info, argp);
5309 case BTRFS_IOC_SYNC: {
5310 int ret;
5311
5312 ret = btrfs_start_delalloc_roots(fs_info, LONG_MAX, false);
5313 if (ret)
5314 return ret;
5315 ret = btrfs_sync_fs(inode->i_sb, 1);
5316 /*
5317 * There may be work for the cleaner kthread to do (subvolume
5318 * deletion, delayed iputs, defrag inodes, etc), so wake it up.
5319 */
5320 wake_up_process(fs_info->cleaner_kthread);
5321 return ret;
5322 }
5323 case BTRFS_IOC_START_SYNC:
5324 return btrfs_ioctl_start_sync(root, argp);
5325 case BTRFS_IOC_WAIT_SYNC:
5326 return btrfs_ioctl_wait_sync(fs_info, argp);
5327 case BTRFS_IOC_SCRUB:
5328 return btrfs_ioctl_scrub(file, argp);
5329 case BTRFS_IOC_SCRUB_CANCEL:
5330 return btrfs_ioctl_scrub_cancel(fs_info);
5331 case BTRFS_IOC_SCRUB_PROGRESS:
5332 return btrfs_ioctl_scrub_progress(fs_info, argp);
5333 case BTRFS_IOC_BALANCE_V2:
5334 return btrfs_ioctl_balance(file, argp);
5335 case BTRFS_IOC_BALANCE_CTL:
5336 return btrfs_ioctl_balance_ctl(fs_info, arg);
5337 case BTRFS_IOC_BALANCE_PROGRESS:
5338 return btrfs_ioctl_balance_progress(fs_info, argp);
5339 case BTRFS_IOC_SET_RECEIVED_SUBVOL:
5340 return btrfs_ioctl_set_received_subvol(file, argp);
5341 #ifdef CONFIG_64BIT
5342 case BTRFS_IOC_SET_RECEIVED_SUBVOL_32:
5343 return btrfs_ioctl_set_received_subvol_32(file, argp);
5344 #endif
5345 case BTRFS_IOC_SEND:
5346 return _btrfs_ioctl_send(root, argp, false);
5347 #if defined(CONFIG_64BIT) && defined(CONFIG_COMPAT)
5348 case BTRFS_IOC_SEND_32:
5349 return _btrfs_ioctl_send(root, argp, true);
5350 #endif
5351 case BTRFS_IOC_GET_DEV_STATS:
5352 return btrfs_ioctl_get_dev_stats(fs_info, argp);
5353 case BTRFS_IOC_QUOTA_CTL:
5354 return btrfs_ioctl_quota_ctl(file, argp);
5355 case BTRFS_IOC_QGROUP_ASSIGN:
5356 return btrfs_ioctl_qgroup_assign(file, argp);
5357 case BTRFS_IOC_QGROUP_CREATE:
5358 return btrfs_ioctl_qgroup_create(file, argp);
5359 case BTRFS_IOC_QGROUP_LIMIT:
5360 return btrfs_ioctl_qgroup_limit(file, argp);
5361 case BTRFS_IOC_QUOTA_RESCAN:
5362 return btrfs_ioctl_quota_rescan(file, argp);
5363 case BTRFS_IOC_QUOTA_RESCAN_STATUS:
5364 return btrfs_ioctl_quota_rescan_status(fs_info, argp);
5365 case BTRFS_IOC_QUOTA_RESCAN_WAIT:
5366 return btrfs_ioctl_quota_rescan_wait(fs_info);
5367 case BTRFS_IOC_DEV_REPLACE:
5368 return btrfs_ioctl_dev_replace(fs_info, argp);
5369 case BTRFS_IOC_GET_SUPPORTED_FEATURES:
5370 return btrfs_ioctl_get_supported_features(argp);
5371 case BTRFS_IOC_GET_FEATURES:
5372 return btrfs_ioctl_get_features(fs_info, argp);
5373 case BTRFS_IOC_SET_FEATURES:
5374 return btrfs_ioctl_set_features(file, argp);
5375 case BTRFS_IOC_GET_SUBVOL_INFO:
5376 return btrfs_ioctl_get_subvol_info(inode, argp);
5377 case BTRFS_IOC_GET_SUBVOL_ROOTREF:
5378 return btrfs_ioctl_get_subvol_rootref(root, argp);
5379 case BTRFS_IOC_INO_LOOKUP_USER:
5380 return btrfs_ioctl_ino_lookup_user(file, argp);
5381 case FS_IOC_ENABLE_VERITY:
5382 return fsverity_ioctl_enable(file, (const void __user *)argp);
5383 case FS_IOC_MEASURE_VERITY:
5384 return fsverity_ioctl_measure(file, argp);
5385 case FS_IOC_READ_VERITY_METADATA:
5386 return fsverity_ioctl_read_metadata(file, argp);
5387 case BTRFS_IOC_ENCODED_READ:
5388 return btrfs_ioctl_encoded_read(file, argp, false);
5389 case BTRFS_IOC_ENCODED_WRITE:
5390 return btrfs_ioctl_encoded_write(file, argp, false);
5391 #if defined(CONFIG_64BIT) && defined(CONFIG_COMPAT)
5392 case BTRFS_IOC_ENCODED_READ_32:
5393 return btrfs_ioctl_encoded_read(file, argp, true);
5394 case BTRFS_IOC_ENCODED_WRITE_32:
5395 return btrfs_ioctl_encoded_write(file, argp, true);
5396 #endif
5397 case BTRFS_IOC_SUBVOL_SYNC_WAIT:
5398 return btrfs_ioctl_subvol_sync(fs_info, argp);
5399 #ifdef CONFIG_BTRFS_EXPERIMENTAL
5400 case BTRFS_IOC_SHUTDOWN:
5401 if (!capable(CAP_SYS_ADMIN))
5402 return -EPERM;
5403 if (get_user(flags, (__u32 __user *)arg))
5404 return -EFAULT;
5405 return btrfs_emergency_shutdown(fs_info, flags);
5406 #endif
5407 }
5408
5409 return -ENOTTY;
5410 }
5411
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-07-02 9:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 5:32 [PATCH v2 0/6] btrfs: add remove_bdev() callback Qu Wenruo
2025-07-01 5:32 ` [PATCH v2 1/6] fs: enhance and rename shutdown() callback to remove_bdev() Qu Wenruo
2025-07-01 5:54 ` Darrick J. Wong
2025-07-01 6:14 ` Christoph Hellwig
2025-07-01 6:35 ` Qu Wenruo
2025-07-01 6:40 ` Christoph Hellwig
2025-07-01 8:41 ` Christian Brauner
2025-07-01 8:46 ` Qu Wenruo
2025-07-01 7:52 ` Jan Kara
2025-07-01 5:32 ` [PATCH v2 2/6] btrfs: introduce a new fs state, EMERGENCY_SHUTDOWN Qu Wenruo
2025-07-01 5:32 ` [PATCH v2 3/6] btrfs: reject file operations if in shutdown state Qu Wenruo
2025-07-01 5:32 ` [PATCH v2 4/6] btrfs: reject delalloc ranges " Qu Wenruo
2025-07-01 5:32 ` [PATCH v2 5/6] btrfs: implement shutdown ioctl Qu Wenruo
2025-07-02 9:38 ` kernel test robot [this message]
2025-07-01 5:32 ` [PATCH v2 6/6] btrfs: implement remove_bdev super operation callback Qu Wenruo
2025-07-01 8:21 ` Anand Jain
2025-07-01 8:30 ` Qu Wenruo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202507021710.jq2jhLL2-lkp@intel.com \
--to=lkp@intel.com \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=viro@zeniv.linux.org.uk \
--cc=wqu@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox