diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-07-14 11:16:19 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-11-09 19:08:14 -0800 |
commit | dc0e7e9ddcc5ffb238d2fedc37ccfee0b1652936 (patch) | |
tree | c38b638e694ef7c29d5893a94ac2f22abadea7a7 /fs/xfs/xfs_file.c | |
parent | 1169297c3359782d34ab1a8ed22fe53c1315604d (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>
Diffstat (limited to 'fs/xfs/xfs_file.c')
0 files changed, 0 insertions, 0 deletions