diff options
author | Christoph Hellwig <hch@lst.de> | 2017-02-02 07:55:56 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-04 08:47:11 (GMT) |
commit | e9b77651910722cd74a3936f230366503089bc80 (patch) | |
tree | 65aafa21750e4901a8bc3d65ec4182de9e3a1357 /fs/sysv | |
parent | 6b81365b1e5795578c4aad59a37c15e958cdcdfe (diff) | |
download | linux-e9b77651910722cd74a3936f230366503089bc80.tar.xz |
xfs: don't rely on ->total in xfs_alloc_space_available
commit 12ef830198b0d71668eb9b59f9ba69d32951a48a upstream.
->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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysv')
0 files changed, 0 insertions, 0 deletions