All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] xfs: support shrinking empty AGs
@ 2021-04-14 19:52 Gao Xiang
  2021-04-14 19:52 ` [RFC PATCH 1/4] xfs: support deactivating AGs Gao Xiang
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Gao Xiang @ 2021-04-14 19:52 UTC (permalink / raw)
  To: linux-xfs; +Cc: Gao Xiang

Hi folks,

Sorry for some delay... After "support shrinking unused space in
the last AG" patchset was settled for-next, I spent some time working
on arranging this patchset in order to shrink empty AGs as well.

As mentioned before, freespace can be shrinked atomicly with the
following steps:

 - make sure the pending-for-discard AGs are all stablized as empty;
 - a transaction to
     fix up freespace btrees for the target tail AG;
     decrease agcount to the target value.

All pending-for-discard per-ags will be marked as inactive in advance
and excluded from most fs paths. A per-ag lock is used to stablize
the inactive status together with agi/agf buffer lock. It also
introduces a new max_agcount in order to free such inactive perags.

This patchset has been preliminary manually tested by hand and it
seems work. but I still haven't tested with other fs workloads
together. I will work on refine previous fstests to cover this.
But meanwhile I think it'd be better hear more ideas about this
first.

Kindly point out any strange or what I'm missing so I could revise
it and get it in shape as soon as possible...

xfsprogs is still:
https://lore.kernel.org/r/20210326024631.12921-1-hsiangkao@aol.com

Thanks for your time!

Thanks,
Gao Xiang

Gao Xiang (4):
  xfs: support deactivating AGs
  xfs: check ag is empty
  xfs: introduce max_agcount
  xfs: support shrinking empty AGs

 fs/xfs/libxfs/xfs_ag.c     |  17 ++++-
 fs/xfs/libxfs/xfs_ag.h     |   2 +-
 fs/xfs/libxfs/xfs_alloc.c  | 111 +++++++++++++++++++++++++++-
 fs/xfs/libxfs/xfs_alloc.h  |   4 +
 fs/xfs/libxfs/xfs_bmap.c   |   8 +-
 fs/xfs/libxfs/xfs_ialloc.c |  28 ++++++-
 fs/xfs/libxfs/xfs_sb.c     |   1 +
 fs/xfs/xfs_extent_busy.c   |   2 +-
 fs/xfs/xfs_fsops.c         | 148 ++++++++++++++++++++++++++++++++++---
 fs/xfs/xfs_mount.c         |  89 ++++++++++++++++++----
 fs/xfs/xfs_mount.h         |   7 ++
 fs/xfs/xfs_trans.c         |   3 +-
 12 files changed, 379 insertions(+), 41 deletions(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-04-15 21:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14 19:52 [RFC PATCH 0/4] xfs: support shrinking empty AGs Gao Xiang
2021-04-14 19:52 ` [RFC PATCH 1/4] xfs: support deactivating AGs Gao Xiang
2021-04-15  3:42   ` Dave Chinner
2021-04-15  4:28     ` Gao Xiang
2021-04-15  6:28       ` Dave Chinner
2021-04-15  7:08         ` Gao Xiang
2021-04-15  8:44           ` Dave Chinner
2021-04-14 19:52 ` [RFC PATCH 2/4] xfs: check ag is empty Gao Xiang
2021-04-15  3:52   ` Dave Chinner
2021-04-15  4:34     ` Gao Xiang
2021-04-14 19:52 ` [RFC PATCH 3/4] xfs: introduce max_agcount Gao Xiang
2021-04-15  3:59   ` Dave Chinner
2021-04-14 19:52 ` [RFC PATCH 4/4] xfs: support shrinking empty AGs Gao Xiang
2021-04-15  4:25   ` Dave Chinner
2021-04-15  5:22     ` Gao Xiang
2021-04-15  8:33       ` Dave Chinner
2021-04-15 17:00         ` Darrick J. Wong
2021-04-15 21:24           ` Dave Chinner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.