OSDN Git Service

xfs: set xefi_discard when creating a deferred agfl free log intent item
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 26 Oct 2020 22:19:38 +0000 (15:19 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 29 Oct 2020 15:19:18 +0000 (08:19 -0700)
commit2c334e12f957cd8c6bb66b4aa3f79848b7c33cab
tree4d26700de58f40821ab91c7f7a4d924639d89742
parent3650b228f83adda7e5ee532e2b90429c03f7b9ec
xfs: set xefi_discard when creating a deferred agfl free log intent item

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