Hi folks, v3: https://lore.kernel.org/r/20210108190919.623672-1-hsiangkao@xxxxxxxxxx This patchset attempts to support shrinking free space in the last AG. Days ago I also made a shrinking the entire AGs prototype at, https://git.kernel.org/pub/scm/linux/kernel/git/xiang/linux.git/log/?h=xfs/shrink2 which is still WIP / rather incomplete, yet any directions/suggestions about that would be greatly helpful to me as well. Kindly leave your thoughts, insights about this. Thanks! xfsprogs: https://lore.kernel.org/r/20201028114010.545331-1-hsiangkao@xxxxxxxxxx xfstests: https://lore.kernel.org/r/20201028230909.639698-1-hsiangkao@xxxxxxxxxx Thanks, Gao Xiang Changes since v3: - [1/4] make division/mod have its own variable (Darrick); - [2/4] leave xfs_growfs_{data,log}_t definitions alone (Darrick, Eric, Dave); - [4/4] switch `delta' to int64_t (Darrick); * however, we couldn't let (delta {>,<} 0) be {growfs,shrinkfs} since laterly `delta' becomes the adjusted delta value of last AG due to the original growfs design, so I still keep `bool extend` variable this time. - collect some RVB tags from v3. Gao Xiang (4): xfs: rename `new' to `delta' in xfs_growfs_data_private() xfs: get rid of xfs_growfs_{data,log}_t xfs: hoist out xfs_resizefs_init_new_ags() xfs: support shrinking unused space in the last AG fs/xfs/libxfs/xfs_ag.c | 72 +++++++++++++++++++ fs/xfs/libxfs/xfs_ag.h | 2 + fs/xfs/xfs_fsops.c | 160 ++++++++++++++++++++++++++--------------- fs/xfs/xfs_fsops.h | 4 +- fs/xfs/xfs_ioctl.c | 4 +- fs/xfs/xfs_trans.c | 1 - 6 files changed, 181 insertions(+), 62 deletions(-) -- 2.27.0