mbox series

[v6,0/7] xfs: support shrinking free space in the last AG

Message ID 20210126125621.3846735-1-hsiangkao@redhat.com (mailing list archive)
Headers show
Series xfs: support shrinking free space in the last AG | expand

Message

Gao Xiang Jan. 26, 2021, 12:56 p.m. UTC
Hi folks,

v5: https://lore.kernel.org/r/20210118083700.2384277-1-hsiangkao@redhat.com

This patchset attempts to support shrinking free space in the last AG.
This version addresses Darrick's review of v5, aside from that I'm not
sure if seperating the whole shrink functionality is a good idea (I just
tried but it seemed that ~90% is duplicated code.) IMHO, It'd be better
to separate when needed (I'm investigating shrinking the whole AGs as
well, it seems not too much invasive than the current approach...) Yet
if people have strong opinion of this, I will resend the next version
instead.

Thanks for the time!

Thanks,
Gao Xiang

xfsprogs: https://lore.kernel.org/r/20201028114010.545331-1-hsiangkao@redhat.com
xfstests: https://lore.kernel.org/r/20201028230909.639698-1-hsiangkao@redhat.com

Changes since v5 (Darrick):
 - [3/7] use a separate patch to update lazy sb counters;
 - [5/7] introduce the xfs_ag_shrink_space() helper first
         as a seperate patch... I think it'd be better to "define
         xfs_ag_shrink_space() as a stub that returns EOPNOSUPP..."
 - [5/7] roll the transaction in advance so the new trans can be
         canceled safely.
 - [6/7] "nagcount != oagcount" ==> "nagcount < oagcount"

Gao Xiang (7):
  xfs: rename `new' to `delta' in xfs_growfs_data_private()
  xfs: get rid of xfs_growfs_{data,log}_t
  xfs: update lazy sb counters immediately for resizefs
  xfs: hoist out xfs_resizefs_init_new_ags()
  xfs: introduce xfs_ag_shrink_space()
  xfs: support shrinking unused space in the last AG
  xfs: add error injection for per-AG resv failure when shrinkfs

 fs/xfs/libxfs/xfs_ag.c       | 113 +++++++++++++++++++++++++
 fs/xfs/libxfs/xfs_ag.h       |   2 +
 fs/xfs/libxfs/xfs_errortag.h |   4 +-
 fs/xfs/xfs_error.c           |   2 +
 fs/xfs/xfs_fsops.c           | 158 ++++++++++++++++++++++-------------
 fs/xfs/xfs_fsops.h           |   4 +-
 fs/xfs/xfs_ioctl.c           |   4 +-
 fs/xfs/xfs_trans.c           |   1 -
 8 files changed, 224 insertions(+), 64 deletions(-)