All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	linux-kernel@vger.kernel.org
Subject: [djwong-xfs:zero-initialize-pmem-5.16 28/28] fs/ext4/extents.c:4488:4: error: use of undeclared identifier 'FALLOC_FL_ZEROINIT_RANGE'
Date: Thu, 7 Oct 2021 20:07:33 +0800	[thread overview]
Message-ID: <202110072029.e9ym5OhH-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git zero-initialize-pmem-5.16
head:   34b80c3d1203abd5fd64242ef25898c7d64166ca
commit: 34b80c3d1203abd5fd64242ef25898c7d64166ca [28/28] ext4: implement FALLOC_FL_ZEROINIT_RANGE
config: hexagon-randconfig-r045-20211007 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 58b68e70ebf6308f982426a2618782f473218eed)
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://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/commit/?id=34b80c3d1203abd5fd64242ef25898c7d64166ca
        git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
        git fetch --no-tags djwong-xfs zero-initialize-pmem-5.16
        git checkout 34b80c3d1203abd5fd64242ef25898c7d64166ca
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash fs/

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

All errors (new ones prefixed by >>):

>> fs/ext4/extents.c:4488:4: error: use of undeclared identifier 'FALLOC_FL_ZEROINIT_RANGE'
                           FALLOC_FL_ZEROINIT_RANGE | FALLOC_FL_KEEP_SIZE);
                           ^
   fs/ext4/extents.c:4743:33: error: use of undeclared identifier 'FALLOC_FL_ZEROINIT_RANGE'
                        FALLOC_FL_INSERT_RANGE | FALLOC_FL_ZEROINIT_RANGE))
                                                 ^
   fs/ext4/extents.c:4772:13: error: use of undeclared identifier 'FALLOC_FL_ZEROINIT_RANGE'
           if (mode & FALLOC_FL_ZEROINIT_RANGE) {
                      ^
   3 errors generated.


vim +/FALLOC_FL_ZEROINIT_RANGE +4488 fs/ext4/extents.c

  4478	
  4479	static long ext4_zeroinit_range(struct file *file, loff_t offset, loff_t len)
  4480	{
  4481		struct inode *inode = file_inode(file);
  4482		struct address_space *mapping = inode->i_mapping;
  4483		handle_t *handle = NULL;
  4484		loff_t end = offset + len;
  4485		long ret;
  4486	
  4487		trace_ext4_zeroinit_range(inode, offset, len,
> 4488				FALLOC_FL_ZEROINIT_RANGE | FALLOC_FL_KEEP_SIZE);
  4489	
  4490		/* We don't support data=journal mode */
  4491		if (ext4_should_journal_data(inode))
  4492			return -EOPNOTSUPP;
  4493	
  4494		inode_lock(inode);
  4495	
  4496		/*
  4497		 * Indirect files do not support unwritten extents
  4498		 */
  4499		if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) {
  4500			ret = -EOPNOTSUPP;
  4501			goto out_mutex;
  4502		}
  4503	
  4504		/* Wait all existing dio workers, newcomers will block on i_mutex */
  4505		inode_dio_wait(inode);
  4506	
  4507		/*
  4508		 * Prevent page faults from reinstantiating pages we have released from
  4509		 * page cache.
  4510		 */
  4511		filemap_invalidate_lock(mapping);
  4512	
  4513		ret = ext4_break_layouts(inode);
  4514		if (ret)
  4515			goto out_mmap;
  4516	
  4517		/* Now release the pages and zero block aligned part of pages */
  4518		truncate_pagecache_range(inode, offset, end - 1);
  4519		inode->i_mtime = inode->i_ctime = current_time(inode);
  4520	
  4521		if (IS_DAX(inode))
  4522			ret = dax_zeroinit_range(inode, offset, len,
  4523					&ext4_iomap_report_ops);
  4524		else
  4525			ret = iomap_zeroout_range(inode, offset, len,
  4526					&ext4_iomap_report_ops);
  4527		if (ret == -ECANCELED)
  4528			ret = -EOPNOTSUPP;
  4529		if (ret)
  4530			goto out_mmap;
  4531	
  4532		handle = ext4_journal_start(inode, EXT4_HT_MISC, 1);
  4533		if (IS_ERR(handle)) {
  4534			ret = PTR_ERR(handle);
  4535			ext4_std_error(inode->i_sb, ret);
  4536			goto out_mmap;
  4537		}
  4538	
  4539		inode->i_mtime = inode->i_ctime = current_time(inode);
  4540		ret = ext4_mark_inode_dirty(handle, inode);
  4541		if (unlikely(ret))
  4542			goto out_handle;
  4543		ext4_fc_track_range(handle, inode, offset >> inode->i_sb->s_blocksize_bits,
  4544				(offset + len - 1) >> inode->i_sb->s_blocksize_bits);
  4545		ext4_update_inode_fsync_trans(handle, inode, 1);
  4546	
  4547		if (file->f_flags & O_SYNC)
  4548			ext4_handle_sync(handle);
  4549	
  4550	out_handle:
  4551		ext4_journal_stop(handle);
  4552	out_mmap:
  4553		filemap_invalidate_unlock(mapping);
  4554	out_mutex:
  4555		inode_unlock(inode);
  4556		return ret;
  4557	}
  4558	

---
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: 25202 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [djwong-xfs:zero-initialize-pmem-5.16 28/28] fs/ext4/extents.c:4488:4: error: use of undeclared identifier 'FALLOC_FL_ZEROINIT_RANGE'
Date: Thu, 07 Oct 2021 20:07:33 +0800	[thread overview]
Message-ID: <202110072029.e9ym5OhH-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git zero-initialize-pmem-5.16
head:   34b80c3d1203abd5fd64242ef25898c7d64166ca
commit: 34b80c3d1203abd5fd64242ef25898c7d64166ca [28/28] ext4: implement FALLOC_FL_ZEROINIT_RANGE
config: hexagon-randconfig-r045-20211007 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 58b68e70ebf6308f982426a2618782f473218eed)
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://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/commit/?id=34b80c3d1203abd5fd64242ef25898c7d64166ca
        git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
        git fetch --no-tags djwong-xfs zero-initialize-pmem-5.16
        git checkout 34b80c3d1203abd5fd64242ef25898c7d64166ca
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash fs/

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

All errors (new ones prefixed by >>):

>> fs/ext4/extents.c:4488:4: error: use of undeclared identifier 'FALLOC_FL_ZEROINIT_RANGE'
                           FALLOC_FL_ZEROINIT_RANGE | FALLOC_FL_KEEP_SIZE);
                           ^
   fs/ext4/extents.c:4743:33: error: use of undeclared identifier 'FALLOC_FL_ZEROINIT_RANGE'
                        FALLOC_FL_INSERT_RANGE | FALLOC_FL_ZEROINIT_RANGE))
                                                 ^
   fs/ext4/extents.c:4772:13: error: use of undeclared identifier 'FALLOC_FL_ZEROINIT_RANGE'
           if (mode & FALLOC_FL_ZEROINIT_RANGE) {
                      ^
   3 errors generated.


vim +/FALLOC_FL_ZEROINIT_RANGE +4488 fs/ext4/extents.c

  4478	
  4479	static long ext4_zeroinit_range(struct file *file, loff_t offset, loff_t len)
  4480	{
  4481		struct inode *inode = file_inode(file);
  4482		struct address_space *mapping = inode->i_mapping;
  4483		handle_t *handle = NULL;
  4484		loff_t end = offset + len;
  4485		long ret;
  4486	
  4487		trace_ext4_zeroinit_range(inode, offset, len,
> 4488				FALLOC_FL_ZEROINIT_RANGE | FALLOC_FL_KEEP_SIZE);
  4489	
  4490		/* We don't support data=journal mode */
  4491		if (ext4_should_journal_data(inode))
  4492			return -EOPNOTSUPP;
  4493	
  4494		inode_lock(inode);
  4495	
  4496		/*
  4497		 * Indirect files do not support unwritten extents
  4498		 */
  4499		if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) {
  4500			ret = -EOPNOTSUPP;
  4501			goto out_mutex;
  4502		}
  4503	
  4504		/* Wait all existing dio workers, newcomers will block on i_mutex */
  4505		inode_dio_wait(inode);
  4506	
  4507		/*
  4508		 * Prevent page faults from reinstantiating pages we have released from
  4509		 * page cache.
  4510		 */
  4511		filemap_invalidate_lock(mapping);
  4512	
  4513		ret = ext4_break_layouts(inode);
  4514		if (ret)
  4515			goto out_mmap;
  4516	
  4517		/* Now release the pages and zero block aligned part of pages */
  4518		truncate_pagecache_range(inode, offset, end - 1);
  4519		inode->i_mtime = inode->i_ctime = current_time(inode);
  4520	
  4521		if (IS_DAX(inode))
  4522			ret = dax_zeroinit_range(inode, offset, len,
  4523					&ext4_iomap_report_ops);
  4524		else
  4525			ret = iomap_zeroout_range(inode, offset, len,
  4526					&ext4_iomap_report_ops);
  4527		if (ret == -ECANCELED)
  4528			ret = -EOPNOTSUPP;
  4529		if (ret)
  4530			goto out_mmap;
  4531	
  4532		handle = ext4_journal_start(inode, EXT4_HT_MISC, 1);
  4533		if (IS_ERR(handle)) {
  4534			ret = PTR_ERR(handle);
  4535			ext4_std_error(inode->i_sb, ret);
  4536			goto out_mmap;
  4537		}
  4538	
  4539		inode->i_mtime = inode->i_ctime = current_time(inode);
  4540		ret = ext4_mark_inode_dirty(handle, inode);
  4541		if (unlikely(ret))
  4542			goto out_handle;
  4543		ext4_fc_track_range(handle, inode, offset >> inode->i_sb->s_blocksize_bits,
  4544				(offset + len - 1) >> inode->i_sb->s_blocksize_bits);
  4545		ext4_update_inode_fsync_trans(handle, inode, 1);
  4546	
  4547		if (file->f_flags & O_SYNC)
  4548			ext4_handle_sync(handle);
  4549	
  4550	out_handle:
  4551		ext4_journal_stop(handle);
  4552	out_mmap:
  4553		filemap_invalidate_unlock(mapping);
  4554	out_mutex:
  4555		inode_unlock(inode);
  4556		return ret;
  4557	}
  4558	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

             reply	other threads:[~2021-10-07 12:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07 12:07 kernel test robot [this message]
2021-10-07 12:07 ` [djwong-xfs:zero-initialize-pmem-5.16 28/28] fs/ext4/extents.c:4488:4: error: use of undeclared identifier 'FALLOC_FL_ZEROINIT_RANGE' 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=202110072029.e9ym5OhH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=darrick.wong@oracle.com \
    --cc=djwong@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    /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.