xfs: add bmapi nodiscard flag
authorBrian Foster <bfoster@redhat.com>
Wed, 9 May 2018 15:45:04 +0000 (08:45 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 10 May 2018 15:56:46 +0000 (08:56 -0700)
commitfcb762f5de2e534ab47b5f034fe484c2b25b4d51
tree2f8ff2257d0939652cee00e0f801ab559dd48c41
parente6631f85546c8ff8842f62c73be44ff502d4287a
xfs: add bmapi nodiscard flag

Freed extents are unconditionally discarded when online discard is
enabled. Define XFS_BMAPI_NODISCARD to allow callers to bypass
discards when unnecessary. For example, this will be useful for
eofblocks trimming.

This patch does not change behavior.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_alloc.c
fs/xfs/libxfs/xfs_alloc.h
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_bmap.h
fs/xfs/xfs_extfree_item.c
fs/xfs/xfs_trans.h
fs/xfs/xfs_trans_extfree.c