Skip to content

clean up speculative preallocation tracking and tagging

Brian Foster linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3xfs: track preallocation separately in xfs_bmapi_reserve_delalloc()fs/xfs/libxfs/xfs_bmap.c fs/xfs/libxfs/xfs_bmap.h fs/xfs/xfs_iomap.c +1 more+24 -50 replies
2/3xfs: clean up cow fork reservation and tag inodes correctlyfs/xfs/xfs_reflink.c+3 -260 replies
3/3xfs: pass post-eof speculative prealloc blocks to bmapifs/xfs/xfs_iomap.c+13 -200 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDave Chinner
SeriesR-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] clean up speculative preallocation tracking and tagging

Hi all,

These are a few patches that resulted from the following discussion with regard to how to tag reflink inodes correctly for COW fork preallocation:

http://www.spinics.net/lists/linux-xfs/msg02155.html

The problem with the current code is that xfs_reflink_reserve_cow() doesn't consider preallocation due to start offset alignment. The problem with the first pass patch above is that the same function doesn't distinguish between extent preallocation and extent merge.

The solution in this series pushes down the incorporation of preallocation to the bmapi call, where it already has the additional context to identify whether an extent allocation was widened due to cowextszhint alignment. The callers are still responsible for defining how much to preallocate, to throttle, retry if necessary, etc.

Note that this series is based on top of Christoph's recent extent lookup cleanup patches. This survives xfstests for me on a reflink=1 fs. Thoughts, reviews, flames appreciated.

Brian

Brian Foster (3):
xfs: track preallocation separately in xfs_bmapi_reserve_delalloc()
xfs: clean up cow fork reservation and tag inodes correctly
xfs: pass post-eof speculative prealloc blocks to bmapi

 fs/xfs/libxfs/xfs_bmap.c | 23 +++++++++++++++++++++--
 fs/xfs/libxfs/xfs_bmap.h |  2 +-
 fs/xfs/xfs_iomap.c       | 33 +++++++++++++--------------------
 fs/xfs/xfs_reflink.c     | 29 +++--------------------------
 4 files changed, 38 insertions(+), 49 deletions(-)
Signature · 1 line
2.7.4