]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: don't ifdef around the exact minlen allocations
authorChristoph Hellwig <hch@lst.de>
Mon, 21 Oct 2024 00:10:47 +0000 (17:10 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 31 Oct 2024 22:45:04 +0000 (15:45 -0700)
commit628f9141bd6c34dca3202bff0c0dfd400703c38d
tree807d7e23bfac42ecce38d6fc39dd3e89b0e92796
parenta7c063b27cfe99b03bf627448ce2e1fe60bd902a
xfs: don't ifdef around the exact minlen allocations

Source kernel commit: b611fddc0435738e64453bbf1dadd4b12a801858

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>
libxfs/xfs_alloc.c
libxfs/xfs_alloc.h
libxfs/xfs_bmap.c