Skip to content

RFC xfs: prototype dynamic AG size grow for image mode

Brian Foster linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4xfs: factor out sb_agblocks usage in growfsfs/xfs/xfs_fsops.c+11 -70 replies
2/4xfs: transaction support for sb_agblocks updatesfs/xfs/libxfs/xfs_shared.h fs/xfs/xfs_trans.c fs/xfs/xfs_trans.h+17 -03 replies
3/4xfs: factor out a helper to calculate post-growfs agcountfs/xfs/xfs_fsops.c+29 -130 replies
4/4xfs: support dynamic AG size growing on single AG filesystemsfs/xfs/xfs_fsops.c+86 -30 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchBrian Foster
SeriesNot-Signed-off-by
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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/[email protected]/

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(-)
Signature · 1 line
2.46.2