[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7f7ckuqso5tg634u5462vhn2er2itref3xeggrm7yukotoc7l2@shh2y4sskhtg>
Date: Mon, 23 Jun 2025 23:30:22 -0400
From: Kent Overstreet <kent.overstreet@...ux.dev>
To: Hongbo Li <lihongbo22@...wei.com>
Cc: kernel test robot <lkp@...el.com>, llvm@...ts.linux.dev,
oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: fs/bcachefs/fs.c:867:12: warning: stack frame size (1056)
exceeds limit (1024) in 'bch2_rename2'
On Tue, Jun 24, 2025 at 09:49:58AM +0800, Hongbo Li wrote:
>
>
> On 2025/6/24 2:22, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: 86731a2a651e58953fc949573895f2fa6d456841
> > commit: e614a6c52d32c9c7ff545ca842eb2de4aeb1d2d9 bcachefs: make directory i_size meaningful
> > date: 5 months ago
> > config: s390-defconfig (https://download.01.org/0day-ci/archive/20250624/202506240200.Fsm6BEST-lkp@intel.com/config)
> > compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 875b36a8742437b95f623bab1e0332562c7b4b3f)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250624/202506240200.Fsm6BEST-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@...el.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202506240200.Fsm6BEST-lkp@intel.com/
> >
> > All warnings (new ones prefixed by >>):
> >
> > In file included from fs/bcachefs/fs.c:4:
> > In file included from fs/bcachefs/bcachefs.h:188:
> > In file included from include/linux/bio.h:10:
> > In file included from include/linux/blk_types.h:10:
> > In file included from include/linux/bvec.h:10:
> > In file included from include/linux/highmem.h:10:
> > In file included from include/linux/mm.h:2223:
> > include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> > 504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> > | ~~~~~~~~~~~~~~~~~~~~~ ^
> > 505 | item];
> > | ~~~~
> > include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> > 511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> > | ~~~~~~~~~~~~~~~~~~~~~ ^
> > 512 | NR_VM_NUMA_EVENT_ITEMS +
> > | ~~~~~~~~~~~~~~~~~~~~~~
> > include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
> > 518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
> > | ~~~~~~~~~~~ ^ ~~~
> > include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
> > 524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
> > | ~~~~~~~~~~~~~~~~~~~~~ ^
> > 525 | NR_VM_NUMA_EVENT_ITEMS +
> > | ~~~~~~~~~~~~~~~~~~~~~~
> > > > fs/bcachefs/fs.c:867:12: warning: stack frame size (1056) exceeds limit (1024) in 'bch2_rename2' [-Wframe-larger-than]
> > 867 | static int bch2_rename2(struct mnt_idmap *idmap,
> > | ^
> > 5 warnings generated.
> >
> >
> > vim +/bch2_rename2 +867 fs/bcachefs/fs.c
>
> It is very common for bcachefs functions with high stack usage, but it seems
> a non issue. The same disscussion in [1], what about use a larger stack?
>
> [1] https://lkml.org/lkml/2025/5/22/1058
No, we don't really want to increase the warning just for bcachefs.
It is annoying, but we do need to fix it.
Powered by blists - more mailing lists