linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Cc: kbuild-all@lists.01.org, linux-ext4@vger.kernel.org,
	Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Subject: Re: [PATCH v4 19/20] ext4: add fast commit replay path
Date: Sat, 28 Dec 2019 06:51:40 +0800	[thread overview]
Message-ID: <201912280641.QyyfUJRx%lkp@intel.com> (raw)
In-Reply-To: <20191224081324.95807-19-harshadshirwadkar@gmail.com>

Hi Harshad,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tip/perf/core]
[cannot apply to ext4/dev linus/master v5.5-rc3 next-20191220]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Harshad-Shirwadkar/ext4-update-docs-for-fast-commit-feature/20191225-200339
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git ceb9e77324fa661b1001a0ae66f061b5fcb4e4e6
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-129-g341daf20-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

   fs/ext4/ext4_jbd2.c:612:5: sparse: sparse: symbol '__ext4_fc_track_range' was not declared. Should it be static?
   fs/ext4/ext4_jbd2.c:826:6: sparse: sparse: symbol 'submit_fc_bh' was not declared. Should it be static?
>> fs/ext4/ext4_jbd2.c:1398:13: sparse: sparse: cast to restricted __le16
>> fs/ext4/ext4_jbd2.c:1403:18: sparse: sparse: incorrect type in assignment (different base types)
>> fs/ext4/ext4_jbd2.c:1403:18: sparse:    expected unsigned int [usertype] old_csum
>> fs/ext4/ext4_jbd2.c:1403:18: sparse:    got restricted __le32 [usertype] fc_csum
   fs/ext4/ext4_jbd2.c:1406:25: sparse: sparse: incorrect type in assignment (different base types)
>> fs/ext4/ext4_jbd2.c:1406:25: sparse:    expected restricted __le32 [usertype] fc_csum
>> fs/ext4/ext4_jbd2.c:1406:25: sparse:    got unsigned int [usertype] old_csum
   fs/ext4/ext4_jbd2.c:1608:5: sparse: sparse: symbol 'ext4_fc_perform_hard_commit' was not declared. Should it be static?
   fs/ext4/ext4_jbd2.c:501:12: sparse: sparse: context imbalance in '__ext4_dentry_update' - unexpected unlock
   fs/ext4/ext4_jbd2.c:924:20: sparse: sparse: context imbalance in 'wait_all_inode_data' - unexpected unlock

vim +1398 fs/ext4/ext4_jbd2.c

  1364	
  1365	static int ext4_journal_fc_replay_scan(journal_t *journal,
  1366					       struct buffer_head *bh, int off)
  1367	{
  1368		struct super_block *sb = journal->j_private;
  1369		struct ext4_sb_info *sbi = EXT4_SB(sb);
  1370		struct ext4_fc_replay_state *state;
  1371		struct ext4_fc_commit_hdr *fc_hdr;
  1372		__u32 csum, old_csum;
  1373		__u8 *start, *end;
  1374	
  1375		state = &sbi->s_fc_replay_state;
  1376		fc_hdr = (struct ext4_fc_commit_hdr *)
  1377			  ((__u8 *)bh->b_data + sizeof(journal_header_t));
  1378	
  1379		start = (u8 *)fc_hdr;
  1380		end = (__u8 *)bh->b_data + journal->j_blocksize;
  1381	
  1382		/* Check if we already concluded that this fast commit is not useful */
  1383		if (state->fc_replay_expected_off && state->fc_replay_error)
  1384			goto out_err;
  1385	
  1386		if (le32_to_cpu(fc_hdr->fc_magic) != EXT4_FC_MAGIC) {
  1387			state->fc_replay_error = -ENOENT;
  1388			goto out_err;
  1389		}
  1390	
  1391		if (off != state->fc_replay_expected_off) {
  1392			state->fc_replay_error = -EFSCORRUPTED;
  1393			goto out_err;
  1394		}
  1395	
  1396		state->fc_replay_expected_off++;
  1397	
> 1398		if (le16_to_cpu(fc_hdr->fc_features)) {
  1399			state->fc_replay_error = -EOPNOTSUPP;
  1400			goto out_err;
  1401		}
  1402	
> 1403		old_csum = fc_hdr->fc_csum;
  1404		fc_hdr->fc_csum = 0;
  1405		csum = ext4_chksum(sbi, 0, start, end - start);
> 1406		fc_hdr->fc_csum = old_csum;
  1407	
  1408		if (csum != le32_to_cpu(fc_hdr->fc_csum)) {
  1409			state->fc_replay_error = -EFSBADCRC;
  1410			goto out_err;
  1411		}
  1412	
  1413		trace_ext4_journal_fc_replay_scan(sb, state->fc_replay_error, off);
  1414		return 0;
  1415	
  1416	out_err:
  1417		trace_ext4_journal_fc_replay_scan(sb, state->fc_replay_error, off);
  1418		return state->fc_replay_error;
  1419	}
  1420	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

  reply	other threads:[~2019-12-27 22:52 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-24  8:13 [PATCH v4 01/20] ext4: update docs for fast commit feature Harshad Shirwadkar
2019-12-24  8:13 ` [PATCH v4 02/20] ext4: add handling for extended mount options Harshad Shirwadkar
2019-12-24  8:13 ` [PATCH v4 03/20] ext4, jbd2: add fast commit initialization routines Harshad Shirwadkar
2019-12-24  8:13 ` [PATCH v4 04/20] jbd2: add fast commit block tracker variables Harshad Shirwadkar
2019-12-24  8:13 ` [PATCH v4 05/20] jbd2: disable fast commits if journal is empty Harshad Shirwadkar
2019-12-24  8:13 ` [PATCH v4 06/20] jbd2: fast commit main commit path changes Harshad Shirwadkar
2019-12-24  8:13 ` [PATCH v4 07/20] ext4: add generic diff tracking routines and range tracking Harshad Shirwadkar
2019-12-27 11:15   ` kbuild test robot
2019-12-27 11:16   ` [RFC PATCH] ext4: __ext4_fc_track_range() can be static kbuild test robot
2019-12-24  8:13 ` [PATCH v4 08/20] ext4: add directory entry tracking routines Harshad Shirwadkar
2019-12-24  8:13 ` [PATCH v4 09/20] ext4: add inode tracking and ineligible marking routines Harshad Shirwadkar
2019-12-24  8:13 ` [PATCH v4 10/20] ext4: break ext4_unlink() and ext4_link() Harshad Shirwadkar
2019-12-24  8:13 ` [PATCH v4 11/20] ext4: add fast commit track points Harshad Shirwadkar
2019-12-24  8:13 ` [PATCH v4 12/20] ext4: add fast commit on-disk format structs and helpers Harshad Shirwadkar
2019-12-24  8:13 ` [PATCH v4 13/20] jbd2: add new APIs for commit path of fast commits Harshad Shirwadkar
2019-12-24  8:13 ` [PATCH v4 14/20] ext4: main commit routine for " Harshad Shirwadkar
2019-12-27 16:36   ` kbuild test robot
2019-12-27 16:36   ` [RFC PATCH] ext4: submit_fc_bh() can be static kbuild test robot
2019-12-24  8:13 ` [PATCH v4 15/20] jbd2: add fast commit recovery path support Harshad Shirwadkar
2019-12-24  8:13 ` [PATCH v4 16/20] ext4: fast commit recovery path preparation Harshad Shirwadkar
2019-12-24  8:13 ` [PATCH v4 17/20] ext4: add idempotent helpers to manipulate bitmaps Harshad Shirwadkar
2019-12-27 19:36   ` kbuild test robot
2019-12-27 19:36   ` [RFC PATCH] ext4: ext4_free_blocks_simple() can be static kbuild test robot
2019-12-24  8:13 ` [PATCH v4 18/20] ext4: disable certain features in replay path Harshad Shirwadkar
2019-12-24  8:13 ` [PATCH v4 19/20] ext4: add fast commit " Harshad Shirwadkar
2019-12-27 22:51   ` kbuild test robot [this message]
2019-12-24  8:13 ` [PATCH v4 20/20] ext4: add debug mount option to test fast commit replay Harshad Shirwadkar
2020-01-09  4:29 ` [PATCH v4 01/20] ext4: update docs for fast commit feature xiaohui li
2020-01-10  9:49   ` xiaohui li
2020-01-11  2:13     ` harshad shirwadkar
2020-01-12  3:45   ` Theodore Y. Ts'o

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=201912280641.QyyfUJRx%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=harshadshirwadkar@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-ext4@vger.kernel.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 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).