summaryrefslogtreecommitdiff
path: root/include/linux/overflow.h
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-05-23 09:43:30 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2020-05-27 08:49:28 -0700
commitf0322c7cc05eb23ef034775f9b39254cbd4f3678 (patch)
tree8dcb618764dfec7bcb0a0a2596cd9568aa0922ba /include/linux/overflow.h
parent1edd2c055dff9710b1e29d4df01902abb0a55f1f (diff)
xfs: measure all contiguous previous extents for prealloc size
When we're estimating a new speculative preallocation length for an extending write, we should walk backwards through the extent list to determine the number of number of blocks that are physically and logically contiguous with the write offset, and use that as an input to the preallocation size computation. This way, preallocation length is truly measured by the effectiveness of the allocator in giving us contiguous allocations without being influenced by the state of a given extent. This fixes both the problem where ZERO_RANGE within an EOF can reduce preallocation, and prevents the unnecessary shrinkage of preallocation when delalloc extents are turned into unwritten extents. This was found as a regression in xfs/014 after changing delalloc writes to create unwritten extents during writeback. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'include/linux/overflow.h')
0 files changed, 0 insertions, 0 deletions