]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: factor out nodiscard helpers
authorBrian Foster <bfoster@redhat.com>
Thu, 28 Jun 2018 20:11:56 +0000 (15:11 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 28 Jun 2018 20:11:56 +0000 (15:11 -0500)
commitcc5af22ab6775519a524b3b688962a3f8165e618
tree73cba756a8fc6b9f36e3a531cbb34c7e13bb40e3
parent5f847f1e389b0d64f405b0d3433308011a7c2962
xfs: factor out nodiscard helpers

Source kernel commit: 4e529339af15226a30e0ca044aa2d78ba3518494

The changes to skip discards of speculative preallocation and
unwritten extents introduced several new wrapper functions through
the bunmapi -> extent free codepath to reduce churn in all of the
associated callers. In several cases, these wrappers simply toggle a
single flag to skip or not skip discards for the resulting blocks.

The explicit _nodiscard() wrappers for such an isolated set of
callers is a bit overkill. Kill off these wrappers and replace with
the calls to the underlying functions in the contexts that need to
control discard behavior. Retain the wrappers that preserve the
original calling conventions to serve the original purpose of
reducing code churn.

This is a refactoring patch and does not change behavior.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_alloc.h
libxfs/xfs_bmap.c
libxfs/xfs_bmap.h