public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] xfs: reflink cleanups
@ 2020-06-23  4:01 Darrick J. Wong
  2020-06-23  4:01 ` [PATCH 1/3] xfs: redesign the reflink remap loop to fix blkres depletion crash Darrick J. Wong
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Darrick J. Wong @ 2020-06-23  4:01 UTC (permalink / raw)
  To: darrick.wong; +Cc: linux-xfs, edwin

Hi all,

Here are a few patches cleaning up some problems with reflink.  The
first patch is the largest -- it reorganizes the remapping loop so that
instead of running one transaction for each extent in the source file
regardless of what's in the destination file, we look at both files to
find the longest extent we can swap in one go, and run a transaction for
just that piece.  This fixes a problem of running out of block
reservation when the filesystem is very fragmented.

The second patch fixes some goofiness in the reflink prep function, and
the third patch moves the "lock two inodes" code into xfs_inode.c since
none of that is related to reflink.

Mr. Torok: Could you try applying these patches to a recent kernel to
see if they fix the fs crash problems you were seeing with duperemove,
please?

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=reflink-cleanups
---
 fs/xfs/libxfs/xfs_bmap.h |   13 +-
 fs/xfs/xfs_file.c        |    4 -
 fs/xfs/xfs_inode.c       |   93 +++++++++++++
 fs/xfs/xfs_inode.h       |    3 
 fs/xfs/xfs_reflink.c     |  325 +++++++++++++++++++---------------------------
 fs/xfs/xfs_reflink.h     |    2 
 fs/xfs/xfs_trace.h       |   52 -------
 fs/xfs/xfs_trans_dquot.c |   13 +-
 8 files changed, 252 insertions(+), 253 deletions(-)


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-06-24 18:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-23  4:01 [PATCH 0/3] xfs: reflink cleanups Darrick J. Wong
2020-06-23  4:01 ` [PATCH 1/3] xfs: redesign the reflink remap loop to fix blkres depletion crash Darrick J. Wong
2020-06-24 12:38   ` Brian Foster
2020-06-24 15:09     ` Darrick J. Wong
2020-06-24 17:07       ` Darrick J. Wong
2020-06-24 18:16         ` Brian Foster
2020-06-24 18:35           ` Darrick J. Wong
2020-06-24 18:45             ` Brian Foster
2020-06-23  4:01 ` [PATCH 2/3] xfs: fix xfs_reflink_remap_prep calling conventions Darrick J. Wong
2020-06-24 12:38   ` Brian Foster
2020-06-23  4:01 ` [PATCH 3/3] xfs: refactor locking and unlocking two inodes against userspace IO Darrick J. Wong
2020-06-24 12:39   ` Brian Foster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox