]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: introduce xfs_ag_shrink_space()
authorGao Xiang <hsiangkao@redhat.com>
Wed, 30 Jun 2021 22:28:32 +0000 (18:28 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 30 Jun 2021 22:28:32 +0000 (18:28 -0400)
commitf63a38ffa9f707b091a0e535af07050d62666688
tree7091bf48d8f7565ac6ded987b03ffdc7f4ec8ff6
parentf5e56725784c60b0c745cbfa09eb073795e50c9f
xfs: introduce xfs_ag_shrink_space()

Source kernel commit: 46141dc891f7d28cc5cac473ad1a54a312c021c1

This patch introduces a helper to shrink unused space in the last AG
by fixing up the freespace btree.

Also make sure that the per-AG reservation works under the new AG
size. If such per-AG reservation or extent allocation fails, roll
the transaction so the new transaction could cancel without any side
effects.

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_ag.c
libxfs/xfs_ag.h