linux/fs/xfs
Carlos Maiolino bd7c193319 XFS: fix zoned gc threshold math for 32-bit arches
xfs_zoned_need_gc makes use of mult_frac() to calculate the threshold
for triggering the zoned garbage collector, but, turns out mult_frac()
doesn't properly work with 64-bit data types and this caused build
failures on some 32-bit architectures.

Fix this by essentially open coding mult_frac() in a 64-bit friendly
way.

Notice we don't need to bother with counters underflow here because
xfs_estimate_freecounter() will always return a positive value, as it
leverages percpu_counter_read_positive to read such counters.

Fixes: 845abeb1f0 ("xfs: add tunable threshold parameter for triggering zone GC")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202504181233.F7D9Atra-lkp@intel.com/
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
2025-04-22 16:03:14 +02:00
..
libxfs xfs: remove the flags argument to xfs_buf_get_uncached 2025-03-18 14:47:45 +01:00
scrub XFS - new code for 6.15 2025-03-27 13:07:00 -07:00
Kconfig lib/crc: remove CONFIG_LIBCRC32C 2025-04-04 11:31:42 -07:00
Makefile
xfs.h
xfs_acl.c
xfs_acl.h
xfs_aops.c vfs-6.15-rc1.iomap 2025-03-24 10:19:31 -07:00
xfs_aops.h
xfs_attr_inactive.c
xfs_attr_item.c
xfs_attr_item.h
xfs_attr_list.c
xfs_bio_io.c
xfs_bmap_item.c
xfs_bmap_item.h
xfs_bmap_util.c
xfs_bmap_util.h
xfs_buf.c xfs: mark xfs_buf_free as might_sleep() 2025-04-14 10:24:30 +02:00
xfs_buf.h xfs: remove the flags argument to xfs_buf_get_uncached 2025-03-18 14:47:45 +01:00
xfs_buf_item.c
xfs_buf_item.h
xfs_buf_item_recover.c
xfs_buf_mem.c xfs: compute buffer address correctly in xmbuf_map_backing_mem 2025-04-14 11:22:52 +02:00
xfs_buf_mem.h
xfs_dahash_test.c
xfs_dahash_test.h
xfs_dir2_readdir.c
xfs_discard.c
xfs_discard.h
xfs_dquot.c xfs: remove the leftover xfs_{set,clear}_li_failed infrastructure 2025-04-14 10:24:30 +02:00
xfs_dquot.h
xfs_dquot_item.c
xfs_dquot_item.h
xfs_dquot_item_recover.c
xfs_drain.c
xfs_drain.h
xfs_error.c
xfs_error.h
xfs_exchmaps_item.c
xfs_exchmaps_item.h
xfs_exchrange.c
xfs_exchrange.h
xfs_export.c
xfs_export.h
xfs_extent_busy.c
xfs_extent_busy.h
xfs_extfree_item.c
xfs_extfree_item.h
xfs_file.c vfs-6.15-rc1.iomap 2025-03-24 10:19:31 -07:00
xfs_file.h
xfs_filestream.c
xfs_filestream.h
xfs_fsmap.c xfs: fix fsmap for internal zoned devices 2025-04-16 12:56:10 +02:00
xfs_fsmap.h
xfs_fsops.c xfs: remove the flags argument to xfs_buf_read_uncached 2025-03-18 14:47:45 +01:00
xfs_fsops.h
xfs_globals.c
xfs_handle.c
xfs_handle.h
xfs_health.c
xfs_hooks.c
xfs_hooks.h
xfs_icache.c - The 7 patch series "powerpc/crash: use generic crashkernel 2025-04-01 10:06:52 -07:00
xfs_icache.h
xfs_icreate_item.c
xfs_icreate_item.h
xfs_inode.c - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
xfs_inode.h - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
xfs_inode_item.c xfs: remove the leftover xfs_{set,clear}_li_failed infrastructure 2025-04-14 10:24:30 +02:00
xfs_inode_item.h
xfs_inode_item_recover.c
xfs_ioctl.c
xfs_ioctl.h
xfs_ioctl32.c
xfs_ioctl32.h
xfs_iomap.c XFS - new code for 6.15 2025-03-27 13:07:00 -07:00
xfs_iomap.h
xfs_iops.c XFS - new code for 6.15 2025-03-27 13:07:00 -07:00
xfs_iops.h
xfs_itable.c
xfs_itable.h
xfs_iunlink_item.c
xfs_iunlink_item.h
xfs_iwalk.c
xfs_iwalk.h
xfs_linux.h
xfs_log.c xfs: Fix spelling mistake "drity" -> "dirty" 2025-04-16 10:43:23 +02:00
xfs_log.h
xfs_log_cil.c
xfs_log_priv.h
xfs_log_recover.c
xfs_message.c
xfs_message.h
xfs_mount.c xfs: remove the flags argument to xfs_buf_read_uncached 2025-03-18 14:47:45 +01:00
xfs_mount.h xfs: add tunable threshold parameter for triggering zone GC 2025-04-14 10:41:33 +02:00
xfs_mru_cache.c
xfs_mru_cache.h
xfs_notify_failure.c
xfs_notify_failure.h
xfs_pnfs.c
xfs_pnfs.h
xfs_pwork.c
xfs_pwork.h
xfs_qm.c
xfs_qm.h
xfs_qm_bhv.c
xfs_qm_syscalls.c
xfs_quota.h
xfs_quotaops.c
xfs_refcount_item.c
xfs_refcount_item.h
xfs_reflink.c
xfs_reflink.h
xfs_rmap_item.c
xfs_rmap_item.h
xfs_rtalloc.c xfs: remove the flags argument to xfs_buf_get_uncached 2025-03-18 14:47:45 +01:00
xfs_rtalloc.h
xfs_stats.c
xfs_stats.h
xfs_super.c - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
xfs_super.h
xfs_symlink.c
xfs_symlink.h
xfs_sysctl.c
xfs_sysctl.h
xfs_sysfs.c xfs: add tunable threshold parameter for triggering zone GC 2025-04-14 10:41:33 +02:00
xfs_sysfs.h
xfs_trace.c
xfs_trace.h
xfs_trans.c
xfs_trans.h
xfs_trans_ail.c xfs: remove the leftover xfs_{set,clear}_li_failed infrastructure 2025-04-14 10:24:30 +02:00
xfs_trans_buf.c
xfs_trans_dquot.c
xfs_trans_priv.h xfs: remove the leftover xfs_{set,clear}_li_failed infrastructure 2025-04-14 10:24:30 +02:00
xfs_xattr.c
xfs_xattr.h
xfs_zone_alloc.c xfs: add tunable threshold parameter for triggering zone GC 2025-04-14 10:41:33 +02:00
xfs_zone_alloc.h
xfs_zone_gc.c XFS: fix zoned gc threshold math for 32-bit arches 2025-04-22 16:03:14 +02:00
xfs_zone_info.c
xfs_zone_priv.h
xfs_zone_space_resv.c