aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_exchrange.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-08-13 09:39:39 +0200
committerChandan Babu R <chandanbabu@kernel.org>2024-09-03 10:07:38 +0530
commitf1204d96450fa7650dc27b8839df159a01998737 (patch)
treeada24ee18b026bbda30070b88d35e3c08d0d0bb6 /fs/xfs/xfs_exchrange.c
parent816e3599ca9b9bbfdc456433cc707e75f2c31104 (diff)
xfs: only free posteof blocks on first close
Certain workloads fragment files on XFS very badly, such as a software package that creates a number of threads, each of which repeatedly run the sequence: open a file, perform a synchronous write, and close the file, which defeats the speculative preallocation mechanism. We work around this problem by only deleting posteof blocks the /first/ time a file is closed to preserve the behavior that unpacking a tarball lays out files one after the other with no gaps. Signed-off-by: Darrick J. Wong <djwong@kernel.org> [hch: rebased, updated comment, renamed the flag] Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_exchrange.c')
0 files changed, 0 insertions, 0 deletions