]> git.ipfire.org Git - people/ms/linux.git/commit - fs/xfs/xfs_fsops.c
xfs: support shrinking unused space in the last AG
authorGao Xiang <hsiangkao@redhat.com>
Wed, 24 Mar 2021 02:05:39 +0000 (19:05 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 25 Mar 2021 23:47:52 +0000 (16:47 -0700)
commitfb2fc172018599a6564aab4ac0dce79bf94bd6bc
treeb96fdb56b7752dc81416932b55191a1b79e32400
parent46141dc891f7d28cc5cac473ad1a54a312c021c1
xfs: support shrinking unused space in the last AG

As the first step of shrinking, this attempts to enable shrinking
unused space in the last allocation group by fixing up freespace
btree, agi, agf and adjusting super block and use a helper
xfs_ag_shrink_space() to fixup the last AG.

This can be all done in one transaction for now, so I think no
additional protection is needed.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_fsops.c
fs/xfs/xfs_trans.c