linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Daniel Rosenberg <drosen@google.com>
Cc: kbuild-all@01.org, Jaegeuk Kim <jaegeuk@kernel.org>,
	Chao Yu <yuchao0@huawei.com>, Jonathan Corbet <corbet@lwn.net>,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, kernel-team@android.com,
	Daniel Rosenberg <drosen@google.com>
Subject: Re: [PATCH v2] f2fs: checkpoint disabling
Date: Sat, 28 Jul 2018 07:22:31 +0800	[thread overview]
Message-ID: <201807280708.gj6tiNQz%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180726001909.18252-1-drosen@google.com>

[-- Attachment #1: Type: text/plain, Size: 4264 bytes --]

Hi Daniel,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on f2fs/dev-test]
[cannot apply to v4.18-rc6 next-20180727]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Daniel-Rosenberg/f2fs-checkpoint-disabling/20180728-035921
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test
config: i386-randconfig-x0-07280409 (attached as .config)
compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   fs/f2fs/data.o: In function `inc_valid_block_count':
>> fs/f2fs/f2fs.h:1717: undefined reference to `__umoddi3'

vim +1717 fs/f2fs/f2fs.h

  1657	
  1658	static inline void f2fs_i_blocks_write(struct inode *, block_t, bool, bool);
  1659	static inline int inc_valid_block_count(struct f2fs_sb_info *sbi,
  1660					 struct inode *inode, blkcnt_t *count)
  1661	{
  1662		blkcnt_t diff = 0, release = 0, seg_diff = 0, seg_rel = 0;
  1663		block_t avail_user_block_count;
  1664		int ret;
  1665	
  1666		ret = dquot_reserve_block(inode, *count);
  1667		if (ret)
  1668			return ret;
  1669	
  1670	#ifdef CONFIG_F2FS_FAULT_INJECTION
  1671		if (time_to_inject(sbi, FAULT_BLOCK)) {
  1672			f2fs_show_injection_info(FAULT_BLOCK);
  1673			release = *count;
  1674			goto enospc;
  1675		}
  1676	#endif
  1677		/*
  1678		 * let's increase this in prior to actual block count change in order
  1679		 * for f2fs_sync_file to avoid data races when deciding checkpoint.
  1680		 */
  1681		percpu_counter_add(&sbi->alloc_valid_block_count, (*count));
  1682	
  1683		spin_lock(&sbi->stat_lock);
  1684		sbi->total_valid_block_count += (block_t)(*count);
  1685		avail_user_block_count = sbi->user_block_count -
  1686						sbi->current_reserved_blocks;
  1687	
  1688		if (!__allow_reserved_blocks(sbi, inode, true))
  1689			avail_user_block_count -= F2FS_OPTION(sbi).root_reserved_blocks;
  1690		if (test_opt(sbi, DISABLE_CHECKPOINT))
  1691			avail_user_block_count -= sbi->unusable_block_count;
  1692	
  1693		if (unlikely(sbi->total_valid_block_count > avail_user_block_count)) {
  1694			diff = sbi->total_valid_block_count - avail_user_block_count;
  1695			if (diff > *count)
  1696				diff = *count;
  1697			*count -= diff;
  1698			release = diff;
  1699			sbi->total_valid_block_count -= diff;
  1700			if (!*count) {
  1701				spin_unlock(&sbi->stat_lock);
  1702				goto enospc;
  1703			}
  1704		}
  1705		if (likely(!test_opt(sbi, DISABLE_CHECKPOINT)))
  1706			goto normal;
  1707		if (unlikely(*count > sbi->free_ssr_data_block)) {
  1708			/* We'll need to pull from free. */
  1709			blkcnt_t needed = *count - sbi->free_ssr_data_block;
  1710			blkcnt_t new_segs = ((needed - 1) >>
  1711						sbi->log_blocks_per_seg) + 1;
  1712	
  1713			/* Check if we have enough free */
  1714			if (unlikely(new_segs > sbi->free_segments)) {
  1715				seg_diff = new_segs - sbi->free_segments;
  1716	
> 1717				seg_rel = ((needed - 1) % sbi->log_blocks_per_seg) + 1;
  1718				seg_rel += (seg_diff - 1) << sbi->log_blocks_per_seg;
  1719				new_segs -= seg_diff;
  1720				*count -= seg_rel;
  1721				release += seg_rel;
  1722				if (!*count) {
  1723					spin_unlock(&sbi->stat_lock);
  1724					goto enospc;
  1725				}
  1726			}
  1727	
  1728			sbi->free_segments -= new_segs;
  1729			sbi->free_ssr_data_block += new_segs << sbi->log_blocks_per_seg;
  1730	
  1731		}
  1732		sbi->free_ssr_data_block -= *count;
  1733	normal:
  1734		spin_unlock(&sbi->stat_lock);
  1735	
  1736		if (unlikely(release)) {
  1737			percpu_counter_sub(&sbi->alloc_valid_block_count, release);
  1738			dquot_release_reservation_block(inode, release);
  1739		}
  1740		f2fs_i_blocks_write(inode, *count, true, true);
  1741		return 0;
  1742	
  1743	enospc:
  1744		percpu_counter_sub(&sbi->alloc_valid_block_count, release);
  1745		dquot_release_reservation_block(inode, release);
  1746		return -ENOSPC;
  1747	}
  1748	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30480 bytes --]

  reply	other threads:[~2018-07-28  0:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-26  0:19 [PATCH v2] f2fs: checkpoint disabling Daniel Rosenberg
2018-07-27 23:22 ` kbuild test robot [this message]
2018-07-28  0:19 ` kbuild test robot
2018-08-04 22:31 ` Jaegeuk Kim

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=201807280708.gj6tiNQz%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=corbet@lwn.net \
    --cc=drosen@google.com \
    --cc=jaegeuk@kernel.org \
    --cc=kbuild-all@01.org \
    --cc=kernel-team@android.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuchao0@huawei.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;
as well as URLs for NNTP newsgroup(s).