xfs: refactor delalloc accounting in xfs_bmap_add_extent_delay_real
authorChristoph Hellwig <hch@lst.de>
Tue, 17 Oct 2017 21:16:25 +0000 (14:16 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 26 Oct 2017 22:38:21 +0000 (15:38 -0700)
commitca1862b0838604aa048120d87ebbf53cf7c8c8bd
tree1433285ba158e9dd5054c8c451d914a148d881a5
parent4dcb8869871cc102b9431ae78b40bfc39087b90c
xfs: refactor delalloc accounting in xfs_bmap_add_extent_delay_real

Account for all changes to the delalloc reservation in da_new, and use a
single call xfs_mod_fdblocks to reserve/free blocks, including always
checking for an error.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-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_bmap.c