[djwong-xfs:zero-initialize-pmem-5.16 28/28] fs/ext4/extents.c:4488:4: error: use of undeclared identifier 'FALLOC_FL_ZEROINIT_RANGE'
From: kernel test robot
Date: Thu Oct 07 2021 - 08:08:49 EST
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@xxxxxxxxx>
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@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip