From: kernel test robot <lkp@intel.com>
To: Kemeng Shi <shikemeng@huaweicloud.com>,
tytso@mit.edu, adilger.kernel@dilger.ca, ojaswin@linux.ibm.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
shikemeng@huaweicloud.com
Subject: Re: [PATCH v2 18/19] ext4: add some kunit stub for mballoc kunit test
Date: Thu, 13 Apr 2023 02:16:51 +0800 [thread overview]
Message-ID: <202304130244.S0jqbqkn-lkp@intel.com> (raw)
In-Reply-To: <20230412172833.2317696-19-shikemeng@huaweicloud.com>
Hi Kemeng,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tytso-ext4/dev]
[also build test WARNING on next-20230412]
[cannot apply to linus/master v6.3-rc6]
[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/Kemeng-Shi/ext4-fix-wrong-unit-use-in-ext4_mb_normalize_request/20230412-172757
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
patch link: https://lore.kernel.org/r/20230412172833.2317696-19-shikemeng%40huaweicloud.com
patch subject: [PATCH v2 18/19] ext4: add some kunit stub for mballoc kunit test
config: powerpc-randconfig-r006-20230409 (https://download.01.org/0day-ci/archive/20230413/202304130244.S0jqbqkn-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 2c57868e2e877f73c339796c3374ae660bb77f0d)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/357d528a1ead868fa038c4bfe426744ac7c34ea6
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Kemeng-Shi/ext4-fix-wrong-unit-use-in-ext4_mb_normalize_request/20230412-172757
git checkout 357d528a1ead868fa038c4bfe426744ac7c34ea6
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash fs/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304130244.S0jqbqkn-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/ext4/balloc.c:275:15: warning: mixing declarations and code is incompatible with standards before C99 [-Wdeclaration-after-statement]
unsigned int group_desc;
^
fs/ext4/balloc.c:435:26: warning: mixing declarations and code is incompatible with standards before C99 [-Wdeclaration-after-statement]
struct ext4_group_desc *desc;
^
fs/ext4/balloc.c:538:26: warning: mixing declarations and code is incompatible with standards before C99 [-Wdeclaration-after-statement]
struct ext4_group_desc *desc;
^
3 warnings generated.
--
>> fs/ext4/mballoc.c:3752:12: warning: mixing declarations and code is incompatible with standards before C99 [-Wdeclaration-after-statement]
handle_t *handle = mc->handle;
^
1 warning generated.
vim +275 fs/ext4/balloc.c
717d50e4971b81 Andreas Dilger 2007-10-16 248
ac27a0ec112a08 Dave Kleikamp 2006-10-11 249 /*
ac27a0ec112a08 Dave Kleikamp 2006-10-11 250 * The free blocks are managed by bitmaps. A file system contains several
ac27a0ec112a08 Dave Kleikamp 2006-10-11 251 * blocks groups. Each group contains 1 bitmap block for blocks, 1 bitmap
ac27a0ec112a08 Dave Kleikamp 2006-10-11 252 * block for inodes, N blocks for the inode table and data blocks.
ac27a0ec112a08 Dave Kleikamp 2006-10-11 253 *
ac27a0ec112a08 Dave Kleikamp 2006-10-11 254 * The file system contains group descriptors which are located after the
ac27a0ec112a08 Dave Kleikamp 2006-10-11 255 * super block. Each descriptor contains the number of the bitmap block and
ac27a0ec112a08 Dave Kleikamp 2006-10-11 256 * the free blocks count in the block. The descriptors are loaded in memory
e627432c2948d5 Aneesh Kumar K.V 2007-02-20 257 * when a file system is mounted (see ext4_fill_super).
ac27a0ec112a08 Dave Kleikamp 2006-10-11 258 */
ac27a0ec112a08 Dave Kleikamp 2006-10-11 259
ac27a0ec112a08 Dave Kleikamp 2006-10-11 260 /**
617ba13b31fbf5 Mingming Cao 2006-10-11 261 * ext4_get_group_desc() -- load group descriptor from disk
ac27a0ec112a08 Dave Kleikamp 2006-10-11 262 * @sb: super block
ac27a0ec112a08 Dave Kleikamp 2006-10-11 263 * @block_group: given block group
ac27a0ec112a08 Dave Kleikamp 2006-10-11 264 * @bh: pointer to the buffer head to store the block
ac27a0ec112a08 Dave Kleikamp 2006-10-11 265 * group descriptor
ac27a0ec112a08 Dave Kleikamp 2006-10-11 266 */
617ba13b31fbf5 Mingming Cao 2006-10-11 267 struct ext4_group_desc * ext4_get_group_desc(struct super_block *sb,
fd2d42912f9f09 Avantika Mathur 2008-01-28 268 ext4_group_t block_group,
ac27a0ec112a08 Dave Kleikamp 2006-10-11 269 struct buffer_head **bh)
ac27a0ec112a08 Dave Kleikamp 2006-10-11 270 {
357d528a1ead86 Kemeng Shi 2023-04-13 271 #ifdef CONFIG_EXT4_KUNIT_TESTS
357d528a1ead86 Kemeng Shi 2023-04-13 272 KUNIT_STATIC_STUB_REDIRECT(ext4_get_group_desc,
357d528a1ead86 Kemeng Shi 2023-04-13 273 sb, block_group, bh);
357d528a1ead86 Kemeng Shi 2023-04-13 274 #endif
498e5f24158da7 Theodore Ts'o 2008-11-05 @275 unsigned int group_desc;
498e5f24158da7 Theodore Ts'o 2008-11-05 276 unsigned int offset;
8df9675f8b498d Theodore Ts'o 2009-05-01 277 ext4_group_t ngroups = ext4_get_groups_count(sb);
617ba13b31fbf5 Mingming Cao 2006-10-11 278 struct ext4_group_desc *desc;
617ba13b31fbf5 Mingming Cao 2006-10-11 279 struct ext4_sb_info *sbi = EXT4_SB(sb);
1d0c3924a92e69 Theodore Ts'o 2020-02-15 280 struct buffer_head *bh_p;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 281
8df9675f8b498d Theodore Ts'o 2009-05-01 282 if (block_group >= ngroups) {
12062dddda4509 Eric Sandeen 2010-02-15 283 ext4_error(sb, "block_group >= groups_count - block_group = %u,"
12062dddda4509 Eric Sandeen 2010-02-15 284 " groups_count = %u", block_group, ngroups);
ac27a0ec112a08 Dave Kleikamp 2006-10-11 285
ac27a0ec112a08 Dave Kleikamp 2006-10-11 286 return NULL;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 287 }
ac27a0ec112a08 Dave Kleikamp 2006-10-11 288
617ba13b31fbf5 Mingming Cao 2006-10-11 289 group_desc = block_group >> EXT4_DESC_PER_BLOCK_BITS(sb);
617ba13b31fbf5 Mingming Cao 2006-10-11 290 offset = block_group & (EXT4_DESC_PER_BLOCK(sb) - 1);
1d0c3924a92e69 Theodore Ts'o 2020-02-15 291 bh_p = sbi_array_rcu_deref(sbi, s_group_desc, group_desc);
1d0c3924a92e69 Theodore Ts'o 2020-02-15 292 /*
1d0c3924a92e69 Theodore Ts'o 2020-02-15 293 * sbi_array_rcu_deref returns with rcu unlocked, this is ok since
1d0c3924a92e69 Theodore Ts'o 2020-02-15 294 * the pointer being dereferenced won't be dereferenced again. By
1d0c3924a92e69 Theodore Ts'o 2020-02-15 295 * looking at the usage in add_new_gdb() the value isn't modified,
1d0c3924a92e69 Theodore Ts'o 2020-02-15 296 * just the pointer, and so it remains valid.
1d0c3924a92e69 Theodore Ts'o 2020-02-15 297 */
1d0c3924a92e69 Theodore Ts'o 2020-02-15 298 if (!bh_p) {
12062dddda4509 Eric Sandeen 2010-02-15 299 ext4_error(sb, "Group descriptor not loaded - "
498e5f24158da7 Theodore Ts'o 2008-11-05 300 "block_group = %u, group_desc = %u, desc = %u",
ac27a0ec112a08 Dave Kleikamp 2006-10-11 301 block_group, group_desc, offset);
ac27a0ec112a08 Dave Kleikamp 2006-10-11 302 return NULL;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 303 }
ac27a0ec112a08 Dave Kleikamp 2006-10-11 304
0d1ee42f27d30e Alexandre Ratchov 2006-10-11 305 desc = (struct ext4_group_desc *)(
1d0c3924a92e69 Theodore Ts'o 2020-02-15 306 (__u8 *)bh_p->b_data +
0d1ee42f27d30e Alexandre Ratchov 2006-10-11 307 offset * EXT4_DESC_SIZE(sb));
ac27a0ec112a08 Dave Kleikamp 2006-10-11 308 if (bh)
1d0c3924a92e69 Theodore Ts'o 2020-02-15 309 *bh = bh_p;
0d1ee42f27d30e Alexandre Ratchov 2006-10-11 310 return desc;
ac27a0ec112a08 Dave Kleikamp 2006-10-11 311 }
ac27a0ec112a08 Dave Kleikamp 2006-10-11 312
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-04-12 18:17 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 17:28 [PATCH v2 00/19] Fixes, cleanups and unit test for mballoc Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 01/19] ext4: fix wrong unit use in ext4_mb_normalize_request Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 02/19] ext4: fix unit mismatch in ext4_mb_new_blocks_simple Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 03/19] ext4: fix wrong unit use in ext4_mb_find_by_goal Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 04/19] ext4: treat stripe in block unit Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 05/19] ext4: add EXT4_MB_HINT_GOAL_ONLY test in ext4_mb_use_preallocated Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 06/19] ext4: remove ext4_block_group and ext4_block_group_offset declaration Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 07/19] ext4: try all groups in ext4_mb_new_blocks_simple Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 08/19] ext4: get block from bh before pass it to ext4_free_blocks_simple in ext4_free_blocks Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 09/19] ext4: remove unsed parameter and unnecessary forward declaration of ext4_mb_new_blocks_simple Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 10/19] ext4: fix wrong unit use in ext4_mb_clear_bb Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 11/19] ext4: fix wrong unit use in ext4_mb_new_blocks Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 12/19] ext4: factor out codes to update block bitmap and group descriptor on disk from ext4_mb_mark_bb Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 13/19] ext4: call ext4_mb_mark_group_bb in ext4_free_blocks_simple Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 14/19] ext4: extent ext4_mb_mark_group_bb to support allocation under journal Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 15/19] ext4: call ext4_mb_mark_group_bb in ext4_mb_mark_diskspace_used Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 16/19] ext4: call ext4_mb_mark_group_bb in ext4_mb_clear_bb Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 17/19] ext4: call ext4_mb_mark_group_bb in ext4_group_add_blocks Kemeng Shi
2023-04-12 17:28 ` [PATCH v2 18/19] ext4: add some kunit stub for mballoc kunit test Kemeng Shi
2023-04-12 17:45 ` kernel test robot
2023-04-12 18:16 ` kernel test robot [this message]
2023-04-12 17:28 ` [PATCH v2 19/19] ext4: add first unit test for ext4_mb_new_blocks_simple in mballoc Kemeng Shi
2023-04-12 18:16 ` kernel test robot
2023-04-12 18:58 ` kernel test robot
2023-04-12 19:49 ` kernel test robot
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=202304130244.S0jqbqkn-lkp@intel.com \
--to=lkp@intel.com \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ojaswin@linux.ibm.com \
--cc=shikemeng@huaweicloud.com \
--cc=tytso@mit.edu \
/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