Linux EXT4 FS development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Shuai Liu <847807867@qq.com>, linux-ext4@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, tytso@mit.edu, jack@suse.cz,
	adilger.kernel@dilger.ca, libaokun@linux.alibaba.com,
	ojaswin@linux.ibm.com, ritesh.list@gmail.com,
	yi.zhang@huawei.com, djwong@kernel.org,
	zhaimingbing@cmss.chinamobile.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	syzbot+68178aa1e39c8606392e@syzkaller.appspotmail.com,
	Shuai Liu <847807867@qq.com>
Subject: Re: [PATCH v3] ext4: fix NULL s_encoding after runtime tune_sb enables casefold
Date: Thu, 3 Dec 2026 19:40:35 +0800	[thread overview]
Message-ID: <20261203190908.N2uDMQlX-lkp@intel.com> (raw)
In-Reply-To: <tencent_F27193C546272ADCA5A46D593AE4139ABE09@qq.com>

Hi Shuai,

kernel test robot noticed the following build errors:

[auto build test ERROR on tytso-ext4/dev]
[also build test ERROR on linus/master v7.4-rc5 next-20261202]
[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/Shuai-Liu/ext4-fix-NULL-s_encoding-after-runtime-tune_sb-enables-casefold/20261203-093038
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
patch link:    https://lore.kernel.org/r/tencent_F27193C546272ADCA5A46D593AE4139ABE09%40qq.com
patch subject: [PATCH v3] ext4: fix NULL s_encoding after runtime tune_sb enables casefold
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20261203/20261203190908.N2uDMQlX-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261203/20261203190908.N2uDMQlX-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/20261203190908.N2uDMQlX-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from <command-line>:
   fs/ext4/ioctl.c: In function 'ext4_ioctl_set_tune_sb':
>> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding'
    1566 |         if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
         |                                               ^~
   include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert'
     682 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
     702 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |         ^~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                            ^~~~~~~~~~~~~
   include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE'
    1566 |         if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
         |                                   ^~~~~~~~~
>> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding'
    1566 |         if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
         |                                               ^~
   include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert'
     682 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
     702 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |         ^~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                            ^~~~~~~~~~~~~
   include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE'
    1566 |         if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
         |                                   ^~~~~~~~~
>> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding'
    1566 |         if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
         |                                               ^~
   include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert'
     682 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
     702 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |         ^~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                            ^~~~~~~~~~~~~
   include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE'
    1566 |         if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
         |                                   ^~~~~~~~~
>> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding'
    1566 |         if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
         |                                               ^~
   include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert'
     682 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
     702 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |         ^~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                            ^~~~~~~~~~~~~
   include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE'
    1566 |         if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
         |                                   ^~~~~~~~~
>> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding'
    1566 |         if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
         |                                               ^~
   include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert'
     682 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
     702 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |         ^~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE'
    1566 |         if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
         |                                   ^~~~~~~~~
>> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding'
    1566 |         if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
         |                                               ^~
   include/linux/compiler_types.h:635:53: note: in definition of macro '__unqual_scalar_typeof'
     635 | #define __unqual_scalar_typeof(x) __typeof_unqual__(x)
         |                                                     ^
   include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE'
      50 |         __READ_ONCE(x);                                                 \
         |         ^~~~~~~~~~~
   fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE'
    1566 |         if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
         |                                   ^~~~~~~~~
   In file included from ./arch/x86/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:394,
                    from include/linux/export.h:5,
                    from include/linux/linkage.h:7,
                    from arch/x86/include/asm/cache.h:5,
                    from include/vdso/cache.h:5,
                    from include/linux/cache.h:6,
                    from include/linux/time.h:5,
                    from include/linux/stat.h:19,
                    from include/linux/fs_dirent.h:5,
                    from include/linux/fs/super_types.h:5,
                    from include/linux/fs/super.h:5,
                    from include/linux/fs.h:5,
                    from fs/ext4/ioctl.c:11:
>> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding'
    1566 |         if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
         |                                               ^~
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE'
    1566 |         if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
         |                                   ^~~~~~~~~


vim +1566 fs/ext4/ioctl.c

  1536	
  1537	static int ext4_ioctl_set_tune_sb(struct file *filp,
  1538					  struct ext4_tune_sb_params __user *in)
  1539	{
  1540		struct ext4_tune_sb_params params;
  1541		struct super_block *sb = file_inode(filp)->i_sb;
  1542		struct ext4_sb_info *sbi = EXT4_SB(sb);
  1543		int ret;
  1544		bool enabling_casefold;
  1545	
  1546		if (!capable(CAP_SYS_ADMIN))
  1547			return -EPERM;
  1548	
  1549		if (copy_from_user(&params, in, sizeof(params)))
  1550			return -EFAULT;
  1551	
  1552		ret = ext4_validate_tune_sb_params(sb, &params);
  1553		if (ret)
  1554			return ret;
  1555	
  1556		enabling_casefold = (params.set_flags & EXT4_TUNE_FL_EDIT_FEATURES) &&
  1557			(params.set_feature_incompat_mask &
  1558			 EXT4_FEATURE_INCOMPAT_CASEFOLD) &&
  1559			!ext4_has_feature_casefold(sb);
  1560	
  1561		ret = mnt_want_write_file(filp);
  1562		if (ret)
  1563			return ret;
  1564	
  1565		/* A failed utf8_load() after commit leaves an unmountable fs. */
> 1566		if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
  1567			ret = ext4_encoding_probe(sb, params.encoding);
  1568			if (ret) {
  1569				mnt_drop_write_file(filp);
  1570				return ret;
  1571			}
  1572		}
  1573	
  1574		ret = ext4_update_superblocks_fn(sb, ext4_sb_setparams, &params);
  1575	
  1576		/* Serialise concurrent callers: only one unicode_map may load. */
  1577		if (ret == 0 && enabling_casefold) {
  1578			static DEFINE_MUTEX(casefold_enable_lock);
  1579	
  1580			mutex_lock(&casefold_enable_lock);
  1581			ret = ext4_encoding_init(sb, sbi->s_es);
  1582			mutex_unlock(&casefold_enable_lock);
  1583			if (ret)
  1584				ext4_msg(sb, KERN_ERR,
  1585					 "runtime tune_sb: encoding_init failed (%d)",
  1586					 ret);
  1587		}
  1588	
  1589		mnt_drop_write_file(filp);
  1590	
  1591		if (params.set_flags & EXT4_TUNE_FL_DEF_HASH_ALG)
  1592			sbi->s_def_hash_version = params.def_hash_alg;
  1593	
  1594		return ret;
  1595	}
  1596	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2026-12-03 11:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  1:30 [PATCH v3] ext4: fix NULL s_encoding after runtime tune_sb enables casefold Shuai Liu
2026-12-03  1:47 ` sashiko-bot
2026-12-03 11:40 ` kernel test robot [this message]

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=20261203190908.N2uDMQlX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=847807867@qq.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=djwong@kernel.org \
    --cc=jack@suse.cz \
    --cc=libaokun@linux.alibaba.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ojaswin@linux.ibm.com \
    --cc=ritesh.list@gmail.com \
    --cc=syzbot+68178aa1e39c8606392e@syzkaller.appspotmail.com \
    --cc=tytso@mit.edu \
    --cc=yi.zhang@huawei.com \
    --cc=zhaimingbing@cmss.chinamobile.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