From: kernel test robot <lkp@intel.com>
To: chuguangqing <chuguangqing@inspur.com>,
Theodore Ts'o <tytso@mit.edu>,
Andreas Dilger <adilger.kernel@dilger.ca>
Cc: oe-kbuild-all@lists.linux.dev, linux-ext4@vger.kernel.org,
linux-kernel@vger.kernel.org,
chuguangqing <chuguangqing@inspur.com>
Subject: Re: [PATCH 1/1] Add FALLOC_FL_ALLOCATE_RANGE to the set of supported fallocate mode flags. This change improves code clarity and maintains by explicitly showing this flag in the supported flags mask.
Date: Tue, 15 Jul 2025 22:08:10 +0800 [thread overview]
Message-ID: <202507152101.0vyIZZfK-lkp@intel.com> (raw)
In-Reply-To: <20250715031531.1693-2-chuguangqing@inspur.com>
Hi chuguangqing,
kernel test robot noticed the following build errors:
[auto build test ERROR on next-20250714]
[cannot apply to tytso-ext4/dev v6.16-rc6 v6.16-rc5 v6.16-rc4 linus/master v6.16-rc6]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/chuguangqing/Add-FALLOC_FL_ALLOCATE_RANGE-to-the-set-of-supported-fallocate-mode-flags-This-change-improves-code-clarity-and-maintain/20250715-111753
base: next-20250714
patch link: https://lore.kernel.org/r/20250715031531.1693-2-chuguangqing%40inspur.com
patch subject: [PATCH 1/1] Add FALLOC_FL_ALLOCATE_RANGE to the set of supported fallocate mode flags. This change improves code clarity and maintains by explicitly showing this flag in the supported flags mask.
config: arc-randconfig-002-20250715 (https://download.01.org/0day-ci/archive/20250715/202507152101.0vyIZZfK-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250715/202507152101.0vyIZZfK-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507152101.0vyIZZfK-lkp@intel.com/
All errors (new ones prefixed by >>):
fs/ext4/extents.c: In function 'ext4_fallocate':
>> fs/ext4/extents.c:4787:22: error: 'FALL_C_FL_ALLOCATE_RANGE' undeclared (first use in this function); did you mean 'FALLOC_FL_ALLOCATE_RANGE'?
4787 | if (mode & ~(FALL_C_FL_ALLOCATE_RANGE | FALLOC_FL_KEEP_SIZE |
| ^~~~~~~~~~~~~~~~~~~~~~~~
| FALLOC_FL_ALLOCATE_RANGE
fs/ext4/extents.c:4787:22: note: each undeclared identifier is reported only once for each function it appears in
vim +4787 fs/ext4/extents.c
4755
4756 /*
4757 * preallocate space for a file. This implements ext4's fallocate file
4758 * operation, which gets called from sys_fallocate system call.
4759 * For block-mapped files, posix_fallocate should fall back to the method
4760 * of writing zeroes to the required new blocks (the same behavior which is
4761 * expected for file systems which do not support fallocate() system call).
4762 */
4763 long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
4764 {
4765 struct inode *inode = file_inode(file);
4766 struct address_space *mapping = file->f_mapping;
4767 int ret;
4768
4769 /*
4770 * Encrypted inodes can't handle collapse range or insert
4771 * range since we would need to re-encrypt blocks with a
4772 * different IV or XTS tweak (which are based on the logical
4773 * block number).
4774 */
4775 if (IS_ENCRYPTED(inode) &&
4776 (mode & (FALLOC_FL_COLLAPSE_RANGE | FALLOC_FL_INSERT_RANGE)))
4777 return -EOPNOTSUPP;
4778 /*
4779 * Don't allow writing zeroes if the underlying device does not
4780 * enable the unmap write zeroes operation.
4781 */
4782 if ((mode & FALLOC_FL_WRITE_ZEROES) &&
4783 !bdev_write_zeroes_unmap_sectors(inode->i_sb->s_bdev))
4784 return -EOPNOTSUPP;
4785
4786 /* Return error if mode is not supported */
> 4787 if (mode & ~(FALL_C_FL_ALLOCATE_RANGE | FALLOC_FL_KEEP_SIZE |
4788 FALLOC_FL_PUNCH_HOLE | FALLOC_FL_COLLAPSE_RANGE |
4789 FALLOC_FL_ZERO_RANGE | FALLOC_FL_INSERT_RANGE))
4790 return -EOPNOTSUPP;
4791
4792 inode_lock(inode);
4793 ret = ext4_convert_inline_data(inode);
4794 if (ret)
4795 goto out_inode_lock;
4796
4797 /* Wait all existing dio workers, newcomers will block on i_rwsem */
4798 inode_dio_wait(inode);
4799
4800 ret = file_modified(file);
4801 if (ret)
4802 goto out_inode_lock;
4803
4804 if ((mode & FALLOC_FL_MODE_MASK) == FALLOC_FL_ALLOCATE_RANGE) {
4805 ret = ext4_do_fallocate(file, offset, len, mode);
4806 goto out_inode_lock;
4807 }
4808
4809 /*
4810 * Follow-up operations will drop page cache, hold invalidate lock
4811 * to prevent page faults from reinstantiating pages we have
4812 * released from page cache.
4813 */
4814 filemap_invalidate_lock(mapping);
4815
4816 ret = ext4_break_layouts(inode);
4817 if (ret)
4818 goto out_invalidate_lock;
4819
4820 switch (mode & FALLOC_FL_MODE_MASK) {
4821 case FALLOC_FL_PUNCH_HOLE:
4822 ret = ext4_punch_hole(file, offset, len);
4823 break;
4824 case FALLOC_FL_COLLAPSE_RANGE:
4825 ret = ext4_collapse_range(file, offset, len);
4826 break;
4827 case FALLOC_FL_INSERT_RANGE:
4828 ret = ext4_insert_range(file, offset, len);
4829 break;
4830 case FALLOC_FL_ZERO_RANGE:
4831 case FALLOC_FL_WRITE_ZEROES:
4832 ret = ext4_zero_range(file, offset, len, mode);
4833 break;
4834 default:
4835 ret = -EOPNOTSUPP;
4836 }
4837
4838 out_invalidate_lock:
4839 filemap_invalidate_unlock(mapping);
4840 out_inode_lock:
4841 inode_unlock(inode);
4842 return ret;
4843 }
4844
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-07-15 14:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 3:15 [PATCH 0/1] ext4: add FALLOC_FL_ALLOCATE_RANGE to supported flags mask chuguangqing
2025-07-15 3:15 ` [PATCH 1/1] Add FALLOC_FL_ALLOCATE_RANGE to the set of supported fallocate mode flags. This change improves code clarity and maintains by explicitly showing this flag in the " chuguangqing
2025-07-15 14:08 ` kernel test robot [this message]
2025-07-15 4:37 ` [PATCH 0/1] ext4: add FALLOC_FL_ALLOCATE_RANGE to " chuguangqing
2025-07-15 4:37 ` [PATCH 1/1] " chuguangqing
2025-07-15 6:45 ` chuguangqing
2025-07-15 12:34 ` Theodore Ts'o
2025-07-16 2:28 ` [PATCH v2 0/1] " chuguangqing
2025-07-16 2:28 ` [PATCH v2 1/1] " chuguangqing
2025-07-16 2:44 ` Re: [PATCH " chuguangqing
2025-07-15 12:50 ` Zhang Yi
2025-07-16 3:04 ` [PATCH v3 0/1] Re: " chuguangqing
2025-07-16 3:04 ` [PATCH v3] " chuguangqing
2025-07-16 7:05 ` Zhang Yi
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=202507152101.0vyIZZfK-lkp@intel.com \
--to=lkp@intel.com \
--cc=adilger.kernel@dilger.ca \
--cc=chuguangqing@inspur.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=tytso@mit.edu \
/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).