]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: set xefi_discard when creating a deferred agfl free log intent item
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 12 Nov 2020 22:39:58 +0000 (17:39 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 12 Nov 2020 22:39:58 +0000 (17:39 -0500)
commitfc46ff14390ec9ee346f58b33486ea23157d981f
tree6b9f472f7d93f0b6b6db104177ca40e0d718f46d
parent3dc1d41a39a9c2afcd2281306bdbadd113054c45
xfs: set xefi_discard when creating a deferred agfl free log intent item

Source kernel commit: 2c334e12f957cd8c6bb66b4aa3f79848b7c33cab

Make sure that we actually initialize xefi_discard when we're scheduling
a deferred free of an AGFL block.  This was (eventually) found by the
UBSAN while I was banging on realtime rmap problems, but it exists in
the upstream codebase.  While we're at it, rearrange the structure to
reduce the struct size from 64 to 56 bytes.

Fixes: fcb762f5de2e ("xfs: add bmapi nodiscard flag")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_alloc.c
libxfs/xfs_bmap.h