All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Btrfs: make a source length of 0 imply EOF for dedupe
@ 2016-11-18  0:07 Omar Sandoval
  2016-11-18  0:07 ` [RFC PATCH 1/2] Btrfs: refactor btrfs_extent_same() slightly Omar Sandoval
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Omar Sandoval @ 2016-11-18  0:07 UTC (permalink / raw)
  To: linux-btrfs, linux-xfs
  Cc: Darrick J. Wong, Qu Wenruo, Christoph Hellwig, kernel-team

From: Omar Sandoval <osandov@fb.com>

This is the follow-up to the discussions here [1] and here [2] that
makes Btrfs treat a src_length of 0 to dedupe as "until EOF". The
implementation is straightforward, but there are a few catches that
convinced me to post this as an RFC:

1. We still don't know for sure whether userspace cares about the
   original Btrfs behavior. Darrick and I both seem to think not, but
   hopefully someone will speak up if it matters to them.
2. When doing the implicit EOF, XFS returns 0 for bytes_deduped. I
   copied this in my implementation, but I'm guessing that's a bug
   rather than a feature.
3. Both XFS and Btrfs cap each dedupe operation to 16MB, but the
   implicit EOF gets around this in the existing XFS implementation. I
   copied this for the Btrfs implementation.

So now we have 3 options:

a) Apply these patches as-is.
b) Fix XFS to both return the actual bytes_deduped and cap the length
   for the EOF case. Do the same for Btrfs.
c) Make XFS consistent with the existing Btrfs behavior.

I'm starting to lean towards option c after writing this cover letter,
but I might as well send these out and get a second opinion.

Thanks!

1: http://marc.info/?l=linux-btrfs&m=146828374631829&w=2
2: http://marc.info/?l=linux-btrfs&m=147694962912532&w=2

Omar Sandoval (2):
  Btrfs: refactor btrfs_extent_same() slightly
  Btrfs: make a source length of 0 imply EOF for dedupe

 fs/btrfs/ioctl.c | 45 ++++++++++++++++++++-------------------------
 1 file changed, 20 insertions(+), 25 deletions(-)

-- 
2.10.2


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

end of thread, other threads:[~2016-11-28 17:59 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-18  0:07 [RFC PATCH 0/2] Btrfs: make a source length of 0 imply EOF for dedupe Omar Sandoval
2016-11-18  0:07 ` [RFC PATCH 1/2] Btrfs: refactor btrfs_extent_same() slightly Omar Sandoval
2016-11-18  3:22   ` Qu Wenruo
2016-11-18  3:22     ` Qu Wenruo
2016-11-18  0:07 ` [RFC PATCH 2/2] Btrfs: make a source length of 0 imply EOF for dedupe Omar Sandoval
2016-11-18  5:38 ` [RFC PATCH 0/2] " Christoph Hellwig
2016-11-22 21:17   ` Darrick J. Wong
2016-11-23  2:02 ` Zygo Blaxell
2016-11-23  2:44   ` Darrick J. Wong
2016-11-24  5:16     ` Zygo Blaxell
2016-11-23  4:26   ` Dave Chinner
2016-11-23 13:55     ` Zygo Blaxell
2016-11-23 22:13       ` Dave Chinner
2016-11-23 23:14         ` Zygo Blaxell
2016-11-23 23:53           ` Dave Chinner
2016-11-24  1:26             ` Darrick J. Wong
2016-11-25  4:20               ` Zygo Blaxell
2016-11-28 17:58                 ` Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.