[linux-next:master 2662/2853] fs/btrfs/qgroup.c:2014:13: error: 'bytenr' undeclared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   33ce24234fca4c083e6685a18b460a18ebb5d5c1
commit: 5c0ea18d992fffc948e087c0002560d747e6edd9 [2662/2853] btrfs: use sector numbers as keys for the dirty extents xarray
config: powerpc-randconfig-r071-20241009 (https://download.01.org/0day-ci/archive/20241009/202410090702.KpvUQde2-lkp@xxxxxxxxx/config)
compiler: powerpc-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241009/202410090702.KpvUQde2-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410090702.KpvUQde2-lkp@xxxxxxxxx/

Note: the linux-next/master HEAD 33ce24234fca4c083e6685a18b460a18ebb5d5c1 builds fine.
      It may have been fixed somewhere.

All errors (new ones prefixed by >>):

   fs/btrfs/qgroup.c: In function 'btrfs_qgroup_trace_extent_nolock':
>> fs/btrfs/qgroup.c:2014:13: error: 'bytenr' undeclared (first use in this function)
    2014 |         if (bytenr >= MAX_LFS_FILESIZE) {
         |             ^~~~~~
   fs/btrfs/qgroup.c:2014:13: note: each undeclared identifier is reported only once for each function it appears in


vim +/bytenr +2014 fs/btrfs/qgroup.c

  1991	
  1992	/*
  1993	 * Inform qgroup to trace one dirty extent, its info is recorded in @record.
  1994	 * So qgroup can account it at transaction committing time.
  1995	 *
  1996	 * No lock version, caller must acquire delayed ref lock and allocated memory,
  1997	 * then call btrfs_qgroup_trace_extent_post() after exiting lock context.
  1998	 *
  1999	 * Return 0 for success insert
  2000	 * Return >0 for existing record, caller can free @record safely.
  2001	 * Return <0 for insertion failure, caller can free @record safely.
  2002	 */
  2003	int btrfs_qgroup_trace_extent_nolock(struct btrfs_fs_info *fs_info,
  2004					struct btrfs_delayed_ref_root *delayed_refs,
  2005					struct btrfs_qgroup_extent_record *record)
  2006	{
  2007		struct btrfs_qgroup_extent_record *existing, *ret;
  2008		const unsigned long index = (record->bytenr >> fs_info->sectorsize_bits);
  2009	
  2010		if (!btrfs_qgroup_full_accounting(fs_info))
  2011			return 1;
  2012	
  2013	#if BITS_PER_LONG == 32
> 2014		if (bytenr >= MAX_LFS_FILESIZE) {
  2015			btrfs_err_rl(fs_info,
  2016	"qgroup record for extent at %llu is beyond 32bit page cache and xarray index limit",
  2017				     bytenr);
  2018			btrfs_err_32bit_limit(fs_info);
  2019			return -EOVERFLOW;
  2020		}
  2021	#endif
  2022	
  2023		lockdep_assert_held(&delayed_refs->lock);
  2024		trace_btrfs_qgroup_trace_extent(fs_info, record);
  2025	
  2026		xa_lock(&delayed_refs->dirty_extents);
  2027		existing = xa_load(&delayed_refs->dirty_extents, index);
  2028		if (existing) {
  2029			if (record->data_rsv && !existing->data_rsv) {
  2030				existing->data_rsv = record->data_rsv;
  2031				existing->data_rsv_refroot = record->data_rsv_refroot;
  2032			}
  2033			xa_unlock(&delayed_refs->dirty_extents);
  2034			return 1;
  2035		}
  2036	
  2037		ret = __xa_store(&delayed_refs->dirty_extents, index, record, GFP_ATOMIC);
  2038		xa_unlock(&delayed_refs->dirty_extents);
  2039		if (xa_is_err(ret)) {
  2040			qgroup_mark_inconsistent(fs_info);
  2041			return xa_err(ret);
  2042		}
  2043	
  2044		return 0;
  2045	}
  2046	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux