xfs: don't allocate scrub contexts on the stack
authorDarrick J. Wong <djwong@kernel.org>
Thu, 16 Sep 2021 19:19:00 +0000 (12:19 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 14 Oct 2021 16:19:32 +0000 (09:19 -0700)
commit510a28e195cd7260ccd089109d61ae3b9938a21e
tree855fb646ec5b08117bfc3f66cef1e881530f5872
parentae127f087dc22b6e37edc870079abf0721a6aed0
xfs: don't allocate scrub contexts on the stack

Convert the on-stack scrub context, btree scrub context, and da btree
scrub context into a heap allocation so that we reduce stack usage and
gain the ability to handle tall btrees without issue.

Specifically, this saves us ~208 bytes for the dabtree scrub, ~464 bytes
for the btree scrub, and ~200 bytes for the main scrub context.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/btree.c
fs/xfs/scrub/dabtree.c
fs/xfs/scrub/scrub.c