summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-01-09 13:39:35 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2017-01-09 13:45:01 -0800
commit12ef830198b0d71668eb9b59f9ba69d32951a48a (patch)
tree8bec19b1d0a549562dc63251a94b1e1ddbb790b0 /fs/xfs/xfs_log.c
parent54fee133ad59c87ab01dd84ab3e9397134b32acb (diff)
downloadop-kernel-dev-12ef830198b0d71668eb9b59f9ba69d32951a48a.zip
op-kernel-dev-12ef830198b0d71668eb9b59f9ba69d32951a48a.tar.gz
xfs: don't rely on ->total in xfs_alloc_space_available
->total is a bit of an odd parameter passed down to the low-level allocator all the way from the high-level callers. It's supposed to contain the maximum number of blocks to be allocated for the whole transaction [1]. But in xfs_iomap_write_allocate we only convert existing delayed allocations and thus only have a minimal block reservation for the current transaction, so xfs_alloc_space_available can't use it for the allocation decisions. Use the maximum of args->total and the calculated block requirement to make a decision. We probably should get rid of args->total eventually and instead apply ->minleft more broadly, but that will require some extensive changes all over. [1] which creates lots of confusion as most callers don't decrement it once doing a first allocation. But that's for a separate series. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_log.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud