Skip to content

xfs: a few reflink cowblocks fixes

Brian Foster linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3xfs: fix up inode cowblocks tracking tracepointsfs/xfs/xfs_icache.c+4 -42 replies
2/3xfs: clear cowblocks tag when cow fork is emptiedfs/xfs/xfs_reflink.c+5 -12 replies
3/3xfs: don't skip cow forks w/ delalloc blocks in cowblocks scanfs/xfs/xfs_icache.c fs/xfs/xfs_reflink.c fs/xfs/xfs_reflink.h+6 -211 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchDarrick J. WongChristoph Hellwig
1/3R-b R-b
2/3R-b R-b
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] xfs: a few reflink cowblocks fixes

This is just a few reflink fixes associated with cowblocks tagging that I came across when playing around with and/or reviewing some code. The issue associated with patch 3 is easily reproducible with something like the following:

	echo 30 > /proc/sys/fs/xfs/speculative_cow_prealloc_lifetime

	xfs_io -fc "cowextsize 64k" $src
	xfs_io -c "pwrite 0 128k" $src
	cp --reflink $src $tgt

	xfs_io -c "pwrite 64k 32k" $tgt
	xfs_io -c "pwrite 96k 32k" $tgt
	echo sleep
	sleep 25
	echo delalloc
	xfs_io -c "pwrite 0 4k" $tgt

... which basically just sets the cowblocks tag, uses up all of the resulting cow blocks, waits until just before the cowblocks scanner is going to run and creates a delalloc reservation in the cow fork. The cow fork fiemap thingy I sent the other day shows that the resulting cow fork blocks remain indefinitely.

Thoughts, reviews, flames appreciated.

Brian

Brian Foster (3):
xfs: fix up inode cowblocks tracking tracepoints
xfs: clear cowblocks tag when cow fork is emptied
xfs: don't skip cow forks w/ delalloc blocks in cowblocks scan

 fs/xfs/xfs_icache.c  | 10 +++++-----
 fs/xfs/xfs_reflink.c | 29 +++++++++--------------------
 fs/xfs/xfs_reflink.h |  2 +-
 3 files changed, 15 insertions(+), 26 deletions(-)
Signature · 1 line
2.7.4