From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH RFC] btrfs: sysfs: add <uuid>/debug/io_accounting/ directory
Date: Wed, 26 Jan 2022 03:17:43 +0800 [thread overview]
Message-ID: <202201260130.4VVHtyiM-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 13528 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20220121052445.37692-1-wqu@suse.com>
References: <20220121052445.37692-1-wqu@suse.com>
TO: Qu Wenruo <wqu@suse.com>
Hi Qu,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on kdave/for-next]
[also build test WARNING on v5.17-rc1 next-20220125]
[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]
url: https://github.com/0day-ci/linux/commits/Qu-Wenruo/btrfs-sysfs-add-uuid-debug-io_accounting-directory/20220121-132629
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago
config: x86_64-randconfig-c007-20220124 (https://download.01.org/0day-ci/archive/20220126/202201260130.4VVHtyiM-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 997e128e2a78f5a5434fc75997441ae1ee76f8a4)
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/0day-ci/linux/commit/879aebce4c7d6a684b93b92545978dc75bf4abd5
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Qu-Wenruo/btrfs-sysfs-add-uuid-debug-io_accounting-directory/20220121-132629
git checkout 879aebce4c7d6a684b93b92545978dc75bf4abd5
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^ ~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:3784:7: warning: Access to field 'flags' results in a dereference of a null pointer (loaded from variable 'bargs') [clang-analyzer-core.NullDereference]
if ((bargs->flags & BTRFS_BALANCE_ARGS_PROFILES) &&
^
fs/btrfs/volumes.c:3875:6: note: Assuming 'path' is non-null
if (!path) {
^~~~~
fs/btrfs/volumes.c:3875:2: note: Taking false branch
if (!path) {
^
fs/btrfs/volumes.c:3885:7: note: 'counting' is true
if (!counting) {
^~~~~~~~
fs/btrfs/volumes.c:3885:2: note: Taking false branch
if (!counting) {
^
fs/btrfs/volumes.c:3898:2: note: Loop condition is true. Entering loop body
while (1) {
^
fs/btrfs/volumes.c:3899:9: note: 'counting' is true
if ((!counting && atomic_read(&fs_info->balance_pause_req)) ||
^~~~~~~~
fs/btrfs/volumes.c:3899:18: note: Left side of '&&' is false
if ((!counting && atomic_read(&fs_info->balance_pause_req)) ||
^
fs/btrfs/volumes.c:3900:7: note: Assuming the condition is false
atomic_read(&fs_info->balance_cancel_req)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:3899:3: note: Taking false branch
if ((!counting && atomic_read(&fs_info->balance_pause_req)) ||
^
fs/btrfs/volumes.c:3907:7: note: Assuming 'ret' is >= 0
if (ret < 0) {
^~~~~~~
fs/btrfs/volumes.c:3907:3: note: Taking false branch
if (ret < 0) {
^
fs/btrfs/volumes.c:3916:7: note: Assuming 'ret' is not equal to 0
if (ret == 0)
^~~~~~~~
fs/btrfs/volumes.c:3916:3: note: Taking false branch
if (ret == 0)
^
fs/btrfs/volumes.c:3921:7: note: Assuming 'ret' is 0
if (ret) {
^~~
fs/btrfs/volumes.c:3921:3: note: Taking false branch
if (ret) {
^
fs/btrfs/volumes.c:3931:7: note: Assuming 'found_key.objectid' is equal to 'key.objectid'
if (found_key.objectid != key.objectid) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:3931:3: note: Taking false branch
if (found_key.objectid != key.objectid) {
^
fs/btrfs/volumes.c:3939:8: note: 'counting' is true
if (!counting) {
^~~~~~~~
fs/btrfs/volumes.c:3939:3: note: Taking false branch
if (!counting) {
^
fs/btrfs/volumes.c:3945:9: note: Calling 'should_balance_chunk'
ret = should_balance_chunk(leaf, chunk, found_key.offset);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:3767:2: note: 'bargs' initialized to a null pointer value
struct btrfs_balance_args *bargs = NULL;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:3771:6: note: Assuming the condition is false
if (!((chunk_type & BTRFS_BLOCK_GROUP_TYPE_MASK) &
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:3771:2: note: Taking false branch
if (!((chunk_type & BTRFS_BLOCK_GROUP_TYPE_MASK) &
^
fs/btrfs/volumes.c:3776:6: note: Assuming the condition is false
if (chunk_type & BTRFS_BLOCK_GROUP_DATA)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:3776:2: note: Taking false branch
if (chunk_type & BTRFS_BLOCK_GROUP_DATA)
^
fs/btrfs/volumes.c:3778:11: note: Assuming the condition is false
else if (chunk_type & BTRFS_BLOCK_GROUP_SYSTEM)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:3778:7: note: Taking false branch
else if (chunk_type & BTRFS_BLOCK_GROUP_SYSTEM)
^
fs/btrfs/volumes.c:3780:11: note: Assuming the condition is false
else if (chunk_type & BTRFS_BLOCK_GROUP_METADATA)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:3780:7: note: Taking false branch
else if (chunk_type & BTRFS_BLOCK_GROUP_METADATA)
^
fs/btrfs/volumes.c:3784:7: note: Access to field 'flags' results in a dereference of a null pointer (loaded from variable 'bargs')
if ((bargs->flags & BTRFS_BALANCE_ARGS_PROFILES) &&
^~~~~
fs/btrfs/volumes.c:4903:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = 0;
^ ~
fs/btrfs/volumes.c:4903:4: note: Value stored to 'ret' is never read
ret = 0;
^ ~
>> fs/btrfs/volumes.c:6780:6: warning: Value stored to 'length' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
u32 length = bio->bi_iter.bi_size;
^~~~~~ ~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:6780:6: note: Value stored to 'length' during its initialization is never read
u32 length = bio->bi_iter.bi_size;
^~~~~~ ~~~~~~~~~~~~~~~~~~~~
>> fs/btrfs/volumes.c:6781:7: warning: Value stored to 'metadata' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
bool metadata = bio->bi_opf & REQ_META;
^~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:6781:7: note: Value stored to 'metadata' during its initialization is never read
bool metadata = bio->bi_opf & REQ_META;
^~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:6855:9: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
dev = bioc->stripes[dev_nr].dev;
^~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:6821:6: note: Assuming 'ret' is 0
if (ret) {
^~~
fs/btrfs/volumes.c:6821:2: note: Taking false branch
if (ret) {
^
fs/btrfs/volumes.c:6832:7: note: Assuming the condition is false
if ((bioc->map_type & BTRFS_BLOCK_GROUP_RAID56_MASK) &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:6832:55: note: Left side of '&&' is false
if ((bioc->map_type & BTRFS_BLOCK_GROUP_RAID56_MASK) &&
^
fs/btrfs/volumes.c:6847:6: note: Assuming 'map_length' is >= 'length'
if (map_length < length) {
^~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:6847:2: note: Taking false branch
if (map_length < length) {
^
fs/btrfs/volumes.c:6854:19: note: Assuming 'dev_nr' is < 'total_devs'
for (dev_nr = 0; dev_nr < total_devs; dev_nr++) {
^~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:6854:2: note: Loop condition is true. Entering loop body
for (dev_nr = 0; dev_nr < total_devs; dev_nr++) {
^
fs/btrfs/volumes.c:6856:7: note: Assuming 'dev' is null
if (!dev || !dev->bdev || test_bit(BTRFS_DEV_STATE_MISSING,
^~~~
fs/btrfs/volumes.c:6856:12: note: Left side of '||' is true
if (!dev || !dev->bdev || test_bit(BTRFS_DEV_STATE_MISSING,
^
fs/btrfs/volumes.c:6860:4: note: Calling 'bioc_error'
bioc_error(bioc, first_bio, logical);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:6764:6: note: Assuming the condition is true
if (atomic_dec_and_test(&bioc->stripes_pending)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:6764:2: note: Taking true branch
if (atomic_dec_and_test(&bioc->stripes_pending)) {
^
fs/btrfs/volumes.c:6766:3: note: Taking false branch
WARN_ON(bio != bioc->orig_bio);
^
include/asm-generic/bug.h:122:2: note: expanded from macro 'WARN_ON'
if (unlikely(__ret_warn_on)) \
^
fs/btrfs/volumes.c:6770:7: note: Assuming the condition is false
if (atomic_read(&bioc->error) > bioc->max_errors)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:6770:3: note: Taking false branch
if (atomic_read(&bioc->error) > bioc->max_errors)
^
fs/btrfs/volumes.c:6774:3: note: Calling 'btrfs_end_bioc'
btrfs_end_bioc(bioc, bio);
^~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:6668:2: note: Calling 'btrfs_put_bioc'
btrfs_put_bioc(bioc);
^~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:5947:7: note: 'bioc' is non-null
if (!bioc)
^~~~
fs/btrfs/volumes.c:5947:2: note: Taking false branch
if (!bioc)
^
fs/btrfs/volumes.c:5949:2: note: Taking true branch
if (refcount_dec_and_test(&bioc->refs))
^
fs/btrfs/volumes.c:5950:3: note: Memory is released
kfree(bioc);
^~~~~~~~~~~
fs/btrfs/volumes.c:6668:2: note: Returning; memory was released via 1st parameter
btrfs_put_bioc(bioc);
^~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:6774:3: note: Returning; memory was released via 1st parameter
btrfs_end_bioc(bioc, bio);
^~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:6860:4: note: Returning; memory was released via 1st parameter
bioc_error(bioc, first_bio, logical);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:6861:4: note: Execution continues on line 6854
continue;
^
fs/btrfs/volumes.c:6854:19: note: Assuming 'dev_nr' is < 'total_devs'
for (dev_nr = 0; dev_nr < total_devs; dev_nr++) {
^~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:6854:2: note: Loop condition is true. Entering loop body
for (dev_nr = 0; dev_nr < total_devs; dev_nr++) {
^
fs/btrfs/volumes.c:6855:9: note: Use of memory after it is freed
dev = bioc->stripes[dev_nr].dev;
^~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/volumes.c:8280:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = 0;
vim +/length +6780 fs/btrfs/volumes.c
de1ee92ac3bce4 Josef Bacik 2012-10-19 6777
879aebce4c7d6a Qu Wenruo 2022-01-21 6778 static void update_io_accounting(struct btrfs_fs_info *fs_info, struct bio *bio)
879aebce4c7d6a Qu Wenruo 2022-01-21 6779 {
879aebce4c7d6a Qu Wenruo 2022-01-21 @6780 u32 length = bio->bi_iter.bi_size;
879aebce4c7d6a Qu Wenruo 2022-01-21 @6781 bool metadata = bio->bi_opf & REQ_META;
879aebce4c7d6a Qu Wenruo 2022-01-21 6782
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next reply other threads:[~2022-01-25 19:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-25 19:17 kernel test robot [this message]
2022-01-27 6:09 ` [PATCH RFC] btrfs: sysfs: add <uuid>/debug/io_accounting/ directory kernel test robot
2022-01-27 8:36 ` Qu Wenruo
2022-01-27 8:36 ` Qu Wenruo
-- strict thread matches above, loose matches on Subject: below --
2022-01-21 5:24 Qu Wenruo
2022-01-21 9:14 ` Anand Jain
2022-01-21 9:20 ` 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=202201260130.4VVHtyiM-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.