Commit b22a194c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'xfs-fixes-6.15-rc4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs fixes from Carlos Maiolino:
 "This contains a fix for a build failure on some 32-bit architectures
  and a warning generating docs"

* tag 'xfs-fixes-6.15-rc4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: remove duplicate Zoned Filesystems sections in admin-guide
  XFS: fix zoned gc threshold math for 32-bit arches
parents eef0dc0b f0447f80
Loading
Loading
Loading
Loading
+8 −21
Original line number Diff line number Diff line
@@ -562,19 +562,6 @@ The interesting knobs for XFS workqueues are as follows:
Zoned Filesystems
=================

For zoned file systems, the following attribute is exposed in:

  /sys/fs/xfs/<dev>/zoned/

  max_open_zones		(Min:  1  Default:  Varies  Max:  UINTMAX)
	This read-only attribute exposes the maximum number of open zones
	available for data placement. The value is determined at mount time and
	is limited by the capabilities of the backing zoned device, file system
	size and the max_open_zones mount option.

Zoned Filesystems
=================

For zoned file systems, the following attributes are exposed in:

  /sys/fs/xfs/<dev>/zoned/
+8 −2
Original line number Diff line number Diff line
@@ -170,7 +170,8 @@ bool
xfs_zoned_need_gc(
	struct xfs_mount	*mp)
{
	s64			available, free;
	s64			available, free, threshold;
	s32			remainder;

	if (!xfs_group_marked(mp, XG_TYPE_RTG, XFS_RTG_RECLAIMABLE))
		return false;
@@ -183,7 +184,12 @@ xfs_zoned_need_gc(
		return true;

	free = xfs_estimate_freecounter(mp, XC_FREE_RTEXTENTS);
	if (available < mult_frac(free, mp->m_zonegc_low_space, 100))

	threshold = div_s64_rem(free, 100, &remainder);
	threshold = threshold * mp->m_zonegc_low_space +
		    remainder * div_s64(mp->m_zonegc_low_space, 100);

	if (available < threshold)
		return true;

	return false;