xfs: split XFS_BMAPI_DELALLOC handling from xfs_bmapi_write
authorChristoph Hellwig <hch@lst.de>
Fri, 15 Feb 2019 16:02:48 +0000 (08:02 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sun, 17 Feb 2019 19:55:54 +0000 (11:55 -0800)
commitd8ae82e394bd5d836a32864b1ca22757ef8bb8ee
tree82a48c5a25b15277b9a79fff0b4b2339bc5cb4f1
parentc8b54673b30a9668d626a9e48d1659c21300f2a4
xfs: split XFS_BMAPI_DELALLOC handling from xfs_bmapi_write

Delalloc conversion has traditionally been part of our function to
allocate blocks on disk (first xfs_bmapi, then xfs_bmapi_write), but
delalloc conversion is a little special as we really do not want
to allocate blocks over holes, for which we don't have reservations.

Split the delalloc conversions into a separate helper to keep the
code simple and structured.

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