mbox series

[RFC,0/4] xfs: prototype dynamic AG size grow for image mode

Message ID 20241008131348.81013-1-bfoster@redhat.com (mailing list archive)
Headers show
Series xfs: prototype dynamic AG size grow for image mode | expand

Message

Brian Foster Oct. 8, 2024, 1:13 p.m. UTC
Hi all,

This is a followup to the discussion here [1] on some ideas on how to
better deal with the growfs agcount scalability problem that cloud use
cases tend to run into. This series prototypes the concept of using an
agcount=1 mkfs format to facilitate more dynamic growfs behavior. More
specifically, we can grow the AG size of the filesystem up until a
second AG is added, so therefore we can use the target growfs size to
set a more suitable AG size at growfs time.

As per the previous discussion, there are multiple different ways this
can go, in xfsprogs and the kernel. For example, a size hint could be
provided to mkfs to avoid growfs time changes, a feature bit could be
used to manage functionality, AG size changes could be separated into a
different ioctl to lift the heuristic into userspace, etc. The purpose
here is simply to implement some of the core mechanism as conveniently
as possible and to explore whether it is a workable and potentially
useful improvement.

Patches 1-3 are prep/cleanup patches and not worth digging too much
into. Patch 4 hacks AG size growth into the typical growfs path and uses
a simple heuristic to provide fairly conservative behavior in the case
of unexpectedly small grows. See the commit logs and code comments for
more details and discussion points. Finally, note that this has only
seen light and targeted testing. Thoughts?

Brian

[1] https://lore.kernel.org/linux-xfs/20240812135652.250798-1-bfoster@redhat.com/

Brian Foster (4):
  xfs: factor out sb_agblocks usage in growfs
  xfs: transaction support for sb_agblocks updates
  xfs: factor out a helper to calculate post-growfs agcount
  xfs: support dynamic AG size growing on single AG filesystems

 fs/xfs/libxfs/xfs_shared.h |   1 +
 fs/xfs/xfs_fsops.c         | 137 ++++++++++++++++++++++++++++++++-----
 fs/xfs/xfs_trans.c         |  15 ++++
 fs/xfs/xfs_trans.h         |   1 +
 4 files changed, 137 insertions(+), 17 deletions(-)