]> www.infradead.org Git - users/dwmw2/linux.git/commit
xfs: don't ifdef around the exact minlen allocations
authorChristoph Hellwig <hch@lst.de>
Wed, 18 Sep 2024 05:30:08 +0000 (07:30 +0200)
committerCarlos Maiolino <cem@kernel.org>
Mon, 7 Oct 2024 06:00:11 +0000 (08:00 +0200)
commitb611fddc0435738e64453bbf1dadd4b12a801858
treeeced4bd140743891186f72e2526dc7a462d15f4f
parent865469cd41bce2b04bef9539cbf70676878bc8df
xfs: don't ifdef around the exact minlen allocations

Exact minlen allocations only exist as an error injection tool for debug
builds.  Currently this is implemented using ifdefs, which means the code
isn't even compiled for non-XFS_DEBUG builds.  Enhance the compile test
coverage by always building the code and use the compilers' dead code
elimination to remove it from the generated binary instead.

The only downside is that the alloc_minlen_only field is unconditionally
added to struct xfs_alloc_args now, but by moving it around and packing
it tightly this doesn't actually increase the size of the structure.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/libxfs/xfs_alloc.c
fs/xfs/libxfs/xfs_alloc.h
fs/xfs/libxfs/xfs_bmap.c