Files
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
..
2025-04-04 11:31:42 -07:00
2025-03-10 14:29:44 +01:00
2024-04-23 07:47:00 -07:00
2024-04-23 07:47:00 -07:00
2024-11-03 01:28:06 -05:00
2024-04-23 07:47:00 -07:00
2024-12-23 13:06:17 -08:00
2025-03-03 08:16:56 -07:00
2024-04-23 07:46:50 -07:00