public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC(RAP) 00/14] xfs: add reflink and dedupe support
@ 2015-06-25 23:39 Darrick J. Wong
  2015-06-25 23:39 ` [PATCH 01/14] xfs: create a per-AG btree to track reference counts Darrick J. Wong
                   ` (13 more replies)
  0 siblings, 14 replies; 28+ messages in thread
From: Darrick J. Wong @ 2015-06-25 23:39 UTC (permalink / raw)
  To: david, darrick.wong; +Cc: xfs

Hi all,

This is a RFC-quality pass at kernel support for mapping multiple file
logical blocks to the same physical block, more commonly known as
reflinking.  It is a single [block, refcount] tree to track the
reference counts of extents of physical blocks.  There's also a bunch
of support code that provides the desired copy-on-write behavior,
userland interfaces to reflink, query the status of, and un-reflink
files.

The patch set is based on the current (4.2) for-next branch plus
Dave's rmap RFC patches.  There are still a lot of bugs in this code;
I'm not sure that I've gotten the locking and the transaction
handling correct.  Deadlocks and hangs due to the log being full are
unfortunately common, but light exercise shows that it works well
enough as a proof of concept.

The ioctl interface to XFS reflink looks surprisingly like the btrfs
ioctl interface <cough> -- you can reflink a file, reflink subranges
of a file, or dedupe subranges of files.  (Dedupe also checks file
blocks, though I have a feeling it's racy.)  To un-reflink a file,
simply chattr +C it to mark it no-cow.  xfs_fsr can be better at
that, though. :)

If you're going to start using this mess, you're going to want to pull
my xfsprogs dev tree[1], which itself is also based on xfsprogs
for-next and the userland rmap support bits.  I've not had time to get
reflink and rmap to work together.

I've also prepared a bunch of xfstests[2] to exercise the userland
interfaces.

This is an extraordinary way to eat your data.  Enjoy!

Comments and questions are, as always, welcome.

--D

[1] https://github.com/djwong/xfsprogs/commits/for-next
[2] https://github.com/djwong/xfstests/commits/master

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

end of thread, other threads:[~2015-07-02  7:07 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-25 23:39 [RFC(RAP) 00/14] xfs: add reflink and dedupe support Darrick J. Wong
2015-06-25 23:39 ` [PATCH 01/14] xfs: create a per-AG btree to track reference counts Darrick J. Wong
2015-07-01  0:13   ` Dave Chinner
2015-07-01 22:52     ` Darrick J. Wong
2015-07-01 23:30       ` Dave Chinner
2015-06-25 23:39 ` [PATCH 02/14] libxfs: adjust refcounts in reflink btree Darrick J. Wong
2015-07-01  1:06   ` Dave Chinner
2015-07-01 23:10     ` Darrick J. Wong
2015-07-01 23:32       ` Dave Chinner
2015-06-25 23:39 ` [PATCH 03/14] libxfs: support unmapping reflink blocks Darrick J. Wong
2015-07-01  1:26   ` Dave Chinner
2015-07-02  2:27     ` Darrick J. Wong
2015-06-25 23:39 ` [PATCH 04/14] libxfs: block-mapper changes to support reflink Darrick J. Wong
2015-06-25 23:39 ` [PATCH 05/14] xfs: add reflink functions and ioctl Darrick J. Wong
2015-06-25 23:39 ` [PATCH 06/14] xfs: implement copy-on-write for reflinked blocks Darrick J. Wong
2015-06-25 23:39 ` [PATCH 07/14] xfs: handle directio " Darrick J. Wong
2015-06-25 23:40 ` [PATCH 08/14] xfs: teach fiemap about reflink'd extents Darrick J. Wong
2015-06-25 23:40 ` [PATCH 09/14] xfs: copy-on-write reflinked blocks when zeroing ranges of blocks Darrick J. Wong
2015-06-25 23:40 ` [PATCH 10/14] xfs: minimize impact to non-reflink files via reflink per-inode flag Darrick J. Wong
2015-07-01  1:58   ` Dave Chinner
2015-07-01 22:59     ` Darrick J. Wong
2015-07-01 23:49       ` Dave Chinner
2015-07-02  2:32     ` Darrick J. Wong
2015-07-02  7:07       ` Dave Chinner
2015-06-25 23:40 ` [PATCH 11/14] xfs: emulate the btrfs dedupe extent same ioctl Darrick J. Wong
2015-06-25 23:40 ` [PATCH 12/14] xfs: support XFS_XFLAG_REFLINK (and FS_NOCOW_FL) on reflink filesystems Darrick J. Wong
2015-06-25 23:40 ` [PATCH 13/14] xfs: add reflink btree root when expanding the filesystem Darrick J. Wong
2015-06-25 23:40 ` [PATCH 14/14] xfs: add reflink btree block detection to log recovery Darrick J. Wong

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