From: kernel test robot <lkp@intel.com>
To: Harshad Shirwadkar <harshadshirwadkar@gmail.com>,
linux-ext4@vger.kernel.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
tytso@mit.edu, Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Subject: Re: [PATCH v9 7/9] ext4: fast commit recovery path
Date: Sat, 19 Sep 2020 22:15:07 +0800 [thread overview]
Message-ID: <202009192250.jPdDeDhQ%lkp@intel.com> (raw)
In-Reply-To: <20200919005451.3899779-8-harshadshirwadkar@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 6026 bytes --]
Hi Harshad,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on ext4/dev]
[also build test WARNING on linus/master v5.9-rc5 next-20200918]
[cannot apply to tip/perf/core]
[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/Harshad-Shirwadkar/ext4-add-fast-commits-feature/20200919-085652
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: x86_64-randconfig-a006-20200917 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed79827aea444e6995fb3d36abc2bfd36331773c)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/ext4/mballoc.c:5226:6: warning: no previous prototype for function 'ext4_free_blocks_simple' [-Wmissing-prototypes]
void ext4_free_blocks_simple(struct inode *inode, ext4_fsblk_t block,
^
fs/ext4/mballoc.c:5226:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ext4_free_blocks_simple(struct inode *inode, ext4_fsblk_t block,
^
static
1 warning generated.
--
fs/ext4/fast_commit.c:1091:6: warning: variable 'start_time' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (!test_opt2(sb, JOURNAL_FAST_COMMIT) ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ext4/fast_commit.c:1147:51: note: uninitialized use occurs here
commit_time = ktime_to_ns(ktime_sub(ktime_get(), start_time));
^~~~~~~~~~
include/linux/ktime.h:46:39: note: expanded from macro 'ktime_sub'
#define ktime_sub(lhs, rhs) ((lhs) - (rhs))
^~~
fs/ext4/fast_commit.c:1091:2: note: remove the 'if' if its condition is always false
if (!test_opt2(sb, JOURNAL_FAST_COMMIT) ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ext4/fast_commit.c:1091:6: warning: variable 'start_time' is used uninitialized whenever '||' condition is true [-Wsometimes-uninitialized]
if (!test_opt2(sb, JOURNAL_FAST_COMMIT) ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ext4/fast_commit.c:1147:51: note: uninitialized use occurs here
commit_time = ktime_to_ns(ktime_sub(ktime_get(), start_time));
^~~~~~~~~~
include/linux/ktime.h:46:39: note: expanded from macro 'ktime_sub'
#define ktime_sub(lhs, rhs) ((lhs) - (rhs))
^~~
fs/ext4/fast_commit.c:1091:6: note: remove the '||' if its condition is always false
if (!test_opt2(sb, JOURNAL_FAST_COMMIT) ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ext4/fast_commit.c:1087:20: note: initialize the variable 'start_time' to silence this warning
ktime_t start_time, commit_time;
^
= 0
>> fs/ext4/fast_commit.c:1787:6: warning: no previous prototype for function 'ext4_fc_set_bitmaps_and_counters' [-Wmissing-prototypes]
void ext4_fc_set_bitmaps_and_counters(struct super_block *sb)
^
fs/ext4/fast_commit.c:1787:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ext4_fc_set_bitmaps_and_counters(struct super_block *sb)
^
static
3 warnings generated.
# https://github.com/0day-ci/linux/commit/e027573763bf3d778cd1c279f9b08698817c00f1
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Harshad-Shirwadkar/ext4-add-fast-commits-feature/20200919-085652
git checkout e027573763bf3d778cd1c279f9b08698817c00f1
vim +/ext4_free_blocks_simple +5226 fs/ext4/mballoc.c
5225
> 5226 void ext4_free_blocks_simple(struct inode *inode, ext4_fsblk_t block,
5227 unsigned long count)
5228 {
5229 struct buffer_head *bitmap_bh;
5230 struct super_block *sb = inode->i_sb;
5231 struct ext4_group_desc *gdp;
5232 struct buffer_head *gdp_bh;
5233 ext4_group_t group;
5234 ext4_grpblk_t blkoff;
5235 int already_freed = 0, err, i;
5236
5237 ext4_get_group_no_and_offset(sb, block, &group, &blkoff);
5238 bitmap_bh = ext4_read_block_bitmap(sb, group);
5239 if (IS_ERR(bitmap_bh)) {
5240 err = PTR_ERR(bitmap_bh);
5241 pr_warn("Failed to read block bitmap\n");
5242 return;
5243 }
5244 gdp = ext4_get_group_desc(sb, group, &gdp_bh);
5245 if (!gdp)
5246 return;
5247
5248 for (i = 0; i < count; i++) {
5249 if (!mb_test_bit(blkoff + i, bitmap_bh->b_data))
5250 already_freed++;
5251 }
5252 mb_clear_bits(bitmap_bh->b_data, blkoff, count);
5253 err = ext4_handle_dirty_metadata(NULL, NULL, bitmap_bh);
5254 if (err)
5255 return;
5256 ext4_free_group_clusters_set(
5257 sb, gdp, ext4_free_group_clusters(sb, gdp) +
5258 count - already_freed);
5259 ext4_block_bitmap_csum_set(sb, group, gdp, bitmap_bh);
5260 ext4_group_desc_csum_set(sb, group, gdp);
5261 ext4_handle_dirty_metadata(NULL, NULL, gdp_bh);
5262 sync_dirty_buffer(bitmap_bh);
5263 sync_dirty_buffer(gdp_bh);
5264 brelse(bitmap_bh);
5265 }
5266
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 43605 bytes --]
next prev parent reply other threads:[~2020-09-19 14:18 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-19 0:54 [PATCH v9 0/9] ext4: add fast commits feature Harshad Shirwadkar
2020-09-19 0:54 ` [PATCH v9 1/9] doc: update ext4 and journalling docs to include fast commit feature Harshad Shirwadkar
2020-09-22 17:50 ` Darrick J. Wong
2020-09-24 6:56 ` harshad shirwadkar
2020-10-09 18:28 ` Theodore Y. Ts'o
2020-10-13 0:27 ` harshad shirwadkar
2020-09-19 0:54 ` [PATCH v9 2/9] ext4: add fast_commit feature and handling for extended mount options Harshad Shirwadkar
2020-10-09 17:58 ` Theodore Y. Ts'o
2020-10-13 0:27 ` harshad shirwadkar
2020-09-19 0:54 ` [PATCH v9 3/9] ext4 / jbd2: add fast commit initialization Harshad Shirwadkar
2020-09-19 15:22 ` kernel test robot
2020-10-09 16:10 ` Ritesh Harjani
2020-10-13 0:28 ` harshad shirwadkar
2020-09-19 0:54 ` [PATCH v9 4/9] jbd2: add fast commit machinery Harshad Shirwadkar
2020-10-09 16:16 ` Ritesh Harjani
2020-10-13 0:27 ` harshad shirwadkar
2020-09-19 0:54 ` [PATCH v9 5/9] ext4: main fast-commit commit path Harshad Shirwadkar
2020-09-19 8:19 ` kernel test robot
2020-10-09 17:04 ` Ritesh Harjani
2020-10-13 0:25 ` harshad shirwadkar
2020-10-09 19:14 ` Theodore Y. Ts'o
2020-10-13 0:27 ` harshad shirwadkar
2020-09-19 0:54 ` [PATCH v9 6/9] jbd2: fast commit recovery path Harshad Shirwadkar
2020-09-19 0:54 ` [PATCH v9 7/9] ext4: " Harshad Shirwadkar
2020-09-19 14:15 ` kernel test robot [this message]
2020-10-09 17:14 ` Ritesh Harjani
2020-10-13 0:27 ` harshad shirwadkar
2020-09-19 0:54 ` [PATCH v9 8/9] ext4: add a mount opt to forcefully turn fast commits on Harshad Shirwadkar
2020-09-19 0:54 ` [PATCH v9 9/9] ext4: add fast commit stats in procfs Harshad Shirwadkar
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=202009192250.jPdDeDhQ%lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=harshadshirwadkar@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-ext4@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).