From: kernel test robot <lkp@intel.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH 6/7] btrfs: scrub: unify and shorten the error message
Date: Fri, 15 Mar 2024 19:44:54 +0800 [thread overview]
Message-ID: <202403151954.2aDLBPQm-lkp@intel.com> (raw)
In-Reply-To: <6ba44b940e4e3eea573cad667ab8c0b2dd8f2c06.1710409033.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 linus/master v6.8 next-20240315]
[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/btrfs-scrub-fix-incorrectly-reported-logical-physical-address/20240314-215457
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
patch link: https://lore.kernel.org/r/6ba44b940e4e3eea573cad667ab8c0b2dd8f2c06.1710409033.git.wqu%40suse.com
patch subject: [PATCH 6/7] btrfs: scrub: unify and shorten the error message
config: hexagon-randconfig-r111-20240315 (https://download.01.org/0day-ci/archive/20240315/202403151954.2aDLBPQm-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 8f68022f8e6e54d1aeae4ed301f5a015963089b7)
reproduce: (https://download.01.org/0day-ci/archive/20240315/202403151954.2aDLBPQm-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/202403151954.2aDLBPQm-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/btrfs/scrub.c:430:17: sparse: sparse: non size-preserving integer to pointer cast
vim +430 fs/btrfs/scrub.c
a2de733c78fa7a Arne Jansen 2011-03-08 388
c7499a64dcf62b Filipe Manana 2022-11-01 389 static int scrub_print_warning_inode(u64 inum, u64 offset, u64 num_bytes,
c7499a64dcf62b Filipe Manana 2022-11-01 390 u64 root, void *warn_ctx)
558540c17771ea Jan Schmidt 2011-06-13 391 {
558540c17771ea Jan Schmidt 2011-06-13 392 int ret;
558540c17771ea Jan Schmidt 2011-06-13 393 int i;
de2491fdefe7e5 David Sterba 2017-05-31 394 unsigned nofs_flag;
ff023aac31198e Stefan Behrens 2012-11-06 395 struct scrub_warning *swarn = warn_ctx;
fb456252d3d9c0 Jeff Mahoney 2016-06-22 396 struct btrfs_fs_info *fs_info = swarn->dev->fs_info;
558540c17771ea Jan Schmidt 2011-06-13 397 struct inode_fs_paths *ipath = NULL;
558540c17771ea Jan Schmidt 2011-06-13 398 struct btrfs_root *local_root;
558540c17771ea Jan Schmidt 2011-06-13 399
56e9357a1e8167 David Sterba 2020-05-15 400 local_root = btrfs_get_fs_root(fs_info, root, true);
558540c17771ea Jan Schmidt 2011-06-13 401 if (IS_ERR(local_root)) {
558540c17771ea Jan Schmidt 2011-06-13 402 ret = PTR_ERR(local_root);
558540c17771ea Jan Schmidt 2011-06-13 403 goto err;
558540c17771ea Jan Schmidt 2011-06-13 404 }
558540c17771ea Jan Schmidt 2011-06-13 405
de2491fdefe7e5 David Sterba 2017-05-31 406 /*
de2491fdefe7e5 David Sterba 2017-05-31 407 * init_path might indirectly call vmalloc, or use GFP_KERNEL. Scrub
de2491fdefe7e5 David Sterba 2017-05-31 408 * uses GFP_NOFS in this context, so we keep it consistent but it does
de2491fdefe7e5 David Sterba 2017-05-31 409 * not seem to be strictly necessary.
de2491fdefe7e5 David Sterba 2017-05-31 410 */
de2491fdefe7e5 David Sterba 2017-05-31 411 nofs_flag = memalloc_nofs_save();
558540c17771ea Jan Schmidt 2011-06-13 412 ipath = init_ipath(4096, local_root, swarn->path);
de2491fdefe7e5 David Sterba 2017-05-31 413 memalloc_nofs_restore(nofs_flag);
26bdef541d26fd Dan Carpenter 2011-11-16 414 if (IS_ERR(ipath)) {
0024652895e347 Josef Bacik 2020-01-24 415 btrfs_put_root(local_root);
26bdef541d26fd Dan Carpenter 2011-11-16 416 ret = PTR_ERR(ipath);
26bdef541d26fd Dan Carpenter 2011-11-16 417 ipath = NULL;
26bdef541d26fd Dan Carpenter 2011-11-16 418 goto err;
26bdef541d26fd Dan Carpenter 2011-11-16 419 }
558540c17771ea Jan Schmidt 2011-06-13 420 ret = paths_from_inode(inum, ipath);
558540c17771ea Jan Schmidt 2011-06-13 421
558540c17771ea Jan Schmidt 2011-06-13 422 if (ret < 0)
558540c17771ea Jan Schmidt 2011-06-13 423 goto err;
558540c17771ea Jan Schmidt 2011-06-13 424
558540c17771ea Jan Schmidt 2011-06-13 425 /*
558540c17771ea Jan Schmidt 2011-06-13 426 * we deliberately ignore the bit ipath might have been too small to
558540c17771ea Jan Schmidt 2011-06-13 427 * hold all of the paths here
558540c17771ea Jan Schmidt 2011-06-13 428 */
558540c17771ea Jan Schmidt 2011-06-13 429 for (i = 0; i < ipath->fspath->elem_cnt; ++i)
5d163e0e68ce74 Jeff Mahoney 2016-09-20 @430 btrfs_warn_in_rcu(fs_info,
023af88ce10a69 Qu Wenruo 2024-03-14 431 "%s at inode %lld/%llu(%s) fileoff %llu, logical %llu(%u) physical %llu(%s)%llu",
023af88ce10a69 Qu Wenruo 2024-03-14 432 swarn->errstr, root, inum,
023af88ce10a69 Qu Wenruo 2024-03-14 433 (char *)ipath->fspath->val[i], offset,
023af88ce10a69 Qu Wenruo 2024-03-14 434 swarn->logical, swarn->mirror_num,
023af88ce10a69 Qu Wenruo 2024-03-14 435 swarn->dev->devid, btrfs_dev_name(swarn->dev),
023af88ce10a69 Qu Wenruo 2024-03-14 436 swarn->physical);
558540c17771ea Jan Schmidt 2011-06-13 437
0024652895e347 Josef Bacik 2020-01-24 438 btrfs_put_root(local_root);
558540c17771ea Jan Schmidt 2011-06-13 439 free_ipath(ipath);
558540c17771ea Jan Schmidt 2011-06-13 440 return 0;
558540c17771ea Jan Schmidt 2011-06-13 441
558540c17771ea Jan Schmidt 2011-06-13 442 err:
5d163e0e68ce74 Jeff Mahoney 2016-09-20 443 btrfs_warn_in_rcu(fs_info,
023af88ce10a69 Qu Wenruo 2024-03-14 444 "%s at inode %lld/%llu fileoff %llu, logical %llu(%u) physical %llu(%s)%llu",
023af88ce10a69 Qu Wenruo 2024-03-14 445 swarn->errstr, root, inum, offset,
023af88ce10a69 Qu Wenruo 2024-03-14 446 swarn->logical, swarn->mirror_num,
023af88ce10a69 Qu Wenruo 2024-03-14 447 swarn->dev->devid, btrfs_dev_name(swarn->dev),
023af88ce10a69 Qu Wenruo 2024-03-14 448 swarn->physical);
558540c17771ea Jan Schmidt 2011-06-13 449 free_ipath(ipath);
558540c17771ea Jan Schmidt 2011-06-13 450 return 0;
558540c17771ea Jan Schmidt 2011-06-13 451 }
558540c17771ea Jan Schmidt 2011-06-13 452
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-03-15 11:45 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-14 9:50 [PATCH 0/6] btrfs: scrub: refine the error messages Qu Wenruo
2024-03-14 9:50 ` [PATCH 1/7] btrfs: scrub: fix incorrectly reported logical/physical address Qu Wenruo
2024-03-14 12:24 ` Anand Jain
2024-03-14 20:15 ` Qu Wenruo
2024-04-04 20:01 ` David Sterba
2024-03-14 17:10 ` Filipe Manana
2024-03-14 9:50 ` [PATCH 2/7] btrfs: reduce the log level for btrfs_dev_stat_inc_and_print() Qu Wenruo
2024-03-14 17:17 ` Filipe Manana
2024-03-14 20:26 ` Qu Wenruo
2024-03-18 19:54 ` Filipe Manana
2024-03-14 9:50 ` [PATCH 3/7] btrfs: scrub: remove unused is_super parameter from scrub_print_common_warning() Qu Wenruo
2024-03-14 17:19 ` Filipe Manana
2024-03-14 9:50 ` [PATCH 4/7] btrfs: scrub: remove unnecessary dev/physical lookup for scrub_stripe_report_errors() Qu Wenruo
2024-03-14 17:26 ` Filipe Manana
2024-03-14 20:28 ` Qu Wenruo
2024-03-18 16:16 ` Filipe Manana
2024-03-18 19:53 ` Qu Wenruo
2024-03-14 9:50 ` [PATCH 5/7] btrfs: scrub: simplify the inode iteration output Qu Wenruo
2024-03-14 17:29 ` Filipe Manana
2024-03-14 9:50 ` [PATCH 6/7] btrfs: scrub: unify and shorten the error message Qu Wenruo
2024-03-14 17:40 ` Filipe Manana
2024-03-14 20:56 ` Qu Wenruo
2024-03-18 16:26 ` Filipe Manana
2024-03-18 20:00 ` Qu Wenruo
2024-03-14 23:05 ` kernel test robot
2024-03-15 11:44 ` kernel test robot [this message]
2024-03-14 9:50 ` [PATCH 7/7] btrfs: scrub: fix the frequency of error messages Qu Wenruo
2024-03-14 17:51 ` Filipe Manana
2024-03-14 20:32 ` Qu Wenruo
2024-03-14 17:35 ` [PATCH 0/6] btrfs: scrub: refine the " Boris Burkov
2024-03-14 20: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=202403151954.2aDLBPQm-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--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