[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202110072019.dLe8DinL-lkp@intel.com>
Date: Thu, 7 Oct 2021 20:24:23 +0800
From: kernel test robot <lkp@...el.com>
To: "Darrick J. Wong" <djwong@...nel.org>
Cc: kbuild-all@...ts.01.org,
"Darrick J. Wong" <darrick.wong@...cle.com>,
linux-kernel@...r.kernel.org
Subject: [djwong-xfs:zero-initialize-pmem-5.16 28/28]
fs/ext4/extents.c:4488:4: error: 'FALLOC_FL_ZEROINIT_RANGE' undeclared; did
you mean 'FALLOC_FL_ZERO_RANGE'?
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: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# 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
make W=1 O=build_dir ARCH=um SUBARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
fs/ext4/extents.c: In function 'ext4_zeroinit_range':
>> fs/ext4/extents.c:4488:4: error: 'FALLOC_FL_ZEROINIT_RANGE' undeclared (first use in this function); did you mean 'FALLOC_FL_ZERO_RANGE'?
4488 | FALLOC_FL_ZEROINIT_RANGE | FALLOC_FL_KEEP_SIZE);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| FALLOC_FL_ZERO_RANGE
fs/ext4/extents.c:4488:4: note: each undeclared identifier is reported only once for each function it appears in
fs/ext4/extents.c: In function 'ext4_fallocate':
fs/ext4/extents.c:4743:33: error: 'FALLOC_FL_ZEROINIT_RANGE' undeclared (first use in this function); did you mean 'FALLOC_FL_ZERO_RANGE'?
4743 | FALLOC_FL_INSERT_RANGE | FALLOC_FL_ZEROINIT_RANGE))
| ^~~~~~~~~~~~~~~~~~~~~~~~
| FALLOC_FL_ZERO_RANGE
vim +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
Download attachment ".config.gz" of type "application/gzip" (9645 bytes)
Powered by blists - more mailing lists