xfs: only allocate free space bitmap for xattr scrub if needed
authorDarrick J. Wong <djwong@kernel.org>
Wed, 12 Apr 2023 02:00:34 +0000 (19:00 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 12 Apr 2023 02:00:34 +0000 (19:00 -0700)
commit674f0d0dc6b5b2228c4e9d597a62d5aa6b54a9c5
tree4463a6506b469fc3ec6ed185054d19488247d11e
parent6cee51e6d02bac7ee72969aa23e32c9bdcd7bb6e
xfs: only allocate free space bitmap for xattr scrub if needed

The free space bitmap is only required if we're going to check the
bestfree space at the end of an xattr leaf block.  Therefore, we can
reduce the memory requirements of this scrubber if we can determine that
the xattr is in short format.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/attr.c