All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v10 00/21] Btrfs dedupe framework
@ 2016-04-01  6:34 Qu Wenruo
  2016-04-01  6:34 ` [PATCH v10 01/21] btrfs: dedupe: Introduce dedupe framework and its header Qu Wenruo
                   ` (22 more replies)
  0 siblings, 23 replies; 54+ messages in thread
From: Qu Wenruo @ 2016-04-01  6:34 UTC (permalink / raw)
  To: linux-btrfs

This patchset can be fetched from github:
https://github.com/adam900710/linux.git wang_dedupe_20160401

In this patchset, we're proud to bring a completely new storage backend:
Khala backend.

With Khala backend, all dedupe hash will be restored in the Khala,
shared with every Kalai protoss, with unlimited storage and almost zero
search latency.
A perfect backend for any Kalai protoss. "My life for Aiur!"

Unfortunately, such backend is not available for human.


OK, except the super-fancy and date-related backend, the patchset is
still a serious patchset.
In this patchset, we mostly addressed the on-disk format change comment from
Chris:
1) Reduced dedupe hash item and bytenr item.
   Now dedupe hash item structure size is reduced from 41 bytes
   (9 bytes hash_item + 32 bytes hash)
   to 29 bytes (5 bytes hash_item + 24 bytes hash)
   Without the last patch, it's even less with only 24 bytes
   (24 bytes hash only).
   And dedupe bytenr item structure size is reduced from 32 bytes (full
   hash) to 0.

2) Hide dedupe ioctls into CONFIG_BTRFS_DEBUG
   Advised by David, to make btrfs dedupe as an experimental feature for
   advanced user.
   This is used to allow this patchset to be merged while still allow us
   to change ioctl in the further.

3) Add back missing bug fix patches
   I just missed 2 bug fix patches in previous iteration.
   Adding them back.

Now patch 1~11 provide the full backward-compatible in-memory backend.
And patch 12~14 provide per-file dedupe flag feature.
Patch 15~20 provide on-disk dedupe backend with persist dedupe state for
in-memory backend.
The last patch is just preparation for possible dedupe-compress co-work.


Changelog:
v2:
  Totally reworked to handle multiple backends
v3:
  Fix a stupid but deadly on-disk backend bug
  Add handle for multiple hash on same bytenr corner case to fix abort
  trans error
  Increase dedup rate by enhancing delayed ref handler for both backend.
  Move dedup_add() to run_delayed_ref() time, to fix abort trans error.
  Increase dedup block size up limit to 8M.
v4:
  Add dedup prop for disabling dedup for given files/dirs.
  Merge inmem_search() and ondisk_search() into generic_search() to save
  some code
  Fix another delayed_ref related bug.
  Use the same mutex for both inmem and ondisk backend.
  Move dedup_add() back to btrfs_finish_ordered_io() to increase dedup
  rate.
v5:
  Reuse compress routine for much simpler dedup function.
  Slightly improved performance due to above modification.
  Fix race between dedup enable/disable
  Fix for false ENOSPC report
v6:
  Further enable/disable race window fix.
  Minor format change according to checkpatch.
v7:
  Fix one concurrency bug with balance.
  Slightly modify return value from -EINVAL to -EOPNOTSUPP for
  btrfs_dedup_ioctl() to allow progs to distinguish unsupported commands
  and wrong parameter.
  Rebased to integration-4.6.
v8:
  Rename 'dedup' to 'dedupe'.
  Add support to allow dedupe and compression work at the same time.
  Fix several balance related bugs. Special thanks to Satoru Takeuchi,
  who exposed most of them.
  Small dedupe hit case performance improvement.
v9:
  Re-order the patchset to completely separate pure in-memory and any
  on-disk format change.
  Fold bug fixes into its original patch.
v10:
  Adding back missing bug fix patch.
  Reduce on-disk item size.
  Hide dedupe ioctl under CONFIG_BTRFS_DEBUG.

Qu Wenruo (9):
  btrfs: delayed-ref: Add support for increasing data ref under spinlock
  btrfs: dedupe: Inband in-memory only de-duplication implement
  btrfs: relocation: Enhance error handling to avoid BUG_ON
  btrfs: dedupe: Add basic tree structure for on-disk dedupe method
  btrfs: dedupe: Introduce interfaces to resume and cleanup dedupe info
  btrfs: dedupe: Add support for on-disk hash search
  btrfs: dedupe: Add support to delete hash for on-disk backend
  btrfs: dedupe: Add support for adding hash for on-disk backend
  btrfs: dedupe: Preparation for compress-dedupe co-work

Wang Xiaoguang (12):
  btrfs: dedupe: Introduce dedupe framework and its header
  btrfs: dedupe: Introduce function to initialize dedupe info
  btrfs: dedupe: Introduce function to add hash into in-memory tree
  btrfs: dedupe: Introduce function to remove hash from in-memory tree
  btrfs: dedupe: Introduce function to search for an existing hash
  btrfs: dedupe: Implement btrfs_dedupe_calc_hash interface
  btrfs: ordered-extent: Add support for dedupe
  btrfs: try more times to alloc metadata reserve space
  btrfs: dedupe: Add ioctl for inband dedupelication
  btrfs: dedupe: add an inode nodedupe flag
  btrfs: dedupe: add a property handler for online dedupe
  btrfs: dedupe: add per-file online dedupe control

 fs/btrfs/Makefile            |    2 +-
 fs/btrfs/ctree.h             |   80 ++-
 fs/btrfs/dedupe.c            | 1239 ++++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/dedupe.h            |  181 ++++++
 fs/btrfs/delayed-ref.c       |   30 +-
 fs/btrfs/delayed-ref.h       |    8 +
 fs/btrfs/disk-io.c           |   35 +-
 fs/btrfs/disk-io.h           |    1 +
 fs/btrfs/extent-tree.c       |   41 +-
 fs/btrfs/inode.c             |  250 +++++++--
 fs/btrfs/ioctl.c             |   74 ++-
 fs/btrfs/ordered-data.c      |   46 +-
 fs/btrfs/ordered-data.h      |   13 +
 fs/btrfs/props.c             |   41 ++
 fs/btrfs/relocation.c        |   41 +-
 fs/btrfs/sysfs.c             |    2 +
 include/trace/events/btrfs.h |    3 +-
 include/uapi/linux/btrfs.h   |   23 +
 18 files changed, 2052 insertions(+), 58 deletions(-)
 create mode 100644 fs/btrfs/dedupe.c
 create mode 100644 fs/btrfs/dedupe.h

-- 
2.7.4




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

end of thread, other threads:[~2016-06-07 16:55 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-01  6:34 [PATCH v10 00/21] Btrfs dedupe framework Qu Wenruo
2016-04-01  6:34 ` [PATCH v10 01/21] btrfs: dedupe: Introduce dedupe framework and its header Qu Wenruo
2016-04-01  6:34 ` [PATCH v10 02/21] btrfs: dedupe: Introduce function to initialize dedupe info Qu Wenruo
2016-04-01  9:59   ` kbuild test robot
2016-05-11  0:00     ` Mark Fasheh
2016-05-11  0:21       ` Qu Wenruo
2016-05-11  2:24         ` Qu Wenruo
2016-04-01  6:34 ` [PATCH v10 03/21] btrfs: dedupe: Introduce function to add hash into in-memory tree Qu Wenruo
2016-06-01 19:37   ` Mark Fasheh
2016-06-02  0:49     ` Qu Wenruo
2016-04-01  6:34 ` [PATCH v10 04/21] btrfs: dedupe: Introduce function to remove hash from " Qu Wenruo
2016-06-01 19:40   ` Mark Fasheh
2016-06-02  1:01     ` Qu Wenruo
2016-04-01  6:34 ` [PATCH v10 05/21] btrfs: delayed-ref: Add support for increasing data ref under spinlock Qu Wenruo
2016-04-01  6:34 ` [PATCH v10 06/21] btrfs: dedupe: Introduce function to search for an existing hash Qu Wenruo
2016-04-01  6:34 ` [PATCH v10 07/21] btrfs: dedupe: Implement btrfs_dedupe_calc_hash interface Qu Wenruo
2016-05-17 13:15   ` David Sterba
2016-04-01  6:34 ` [PATCH v10 08/21] btrfs: ordered-extent: Add support for dedupe Qu Wenruo
2016-06-01 22:06   ` Mark Fasheh
2016-06-02  1:08     ` Qu Wenruo
2016-04-01  6:35 ` [PATCH v10 09/21] btrfs: dedupe: Inband in-memory only de-duplication implement Qu Wenruo
2016-06-01 22:08   ` Mark Fasheh
2016-06-02  1:12     ` Qu Wenruo
2016-06-03 14:27       ` Josef Bacik
2016-06-04 10:26         ` Qu Wenruo
2016-06-06 19:54           ` Mark Fasheh
2016-06-07  0:42             ` Qu Wenruo
2016-06-07 16:55               ` Mark Fasheh
2016-06-03 14:43   ` Josef Bacik
2016-06-04 10:28     ` Qu Wenruo
2016-04-01  6:35 ` [PATCH v10 10/21] btrfs: try more times to alloc metadata reserve space Qu Wenruo
2016-05-17 13:20   ` David Sterba
2016-05-18  0:57     ` Qu Wenruo
2016-06-01 22:14     ` Mark Fasheh
2016-04-01  6:35 ` [PATCH v10 11/21] btrfs: dedupe: Add ioctl for inband dedupelication Qu Wenruo
2016-04-27  1:29   ` Qu Wenruo
2016-05-17 13:14     ` David Sterba
2016-05-18  0:54       ` Qu Wenruo
2016-04-01  6:35 ` [PATCH v10 12/21] btrfs: dedupe: add an inode nodedupe flag Qu Wenruo
2016-04-01  6:35 ` [PATCH v10 13/21] btrfs: dedupe: add a property handler for online dedupe Qu Wenruo
2016-04-01  6:35 ` [PATCH v10 14/21] btrfs: dedupe: add per-file online dedupe control Qu Wenruo
2016-04-01  6:35 ` [PATCH v10 15/21] btrfs: relocation: Enhance error handling to avoid BUG_ON Qu Wenruo
2016-04-01  6:35 ` [PATCH v10 16/21] btrfs: dedupe: Add basic tree structure for on-disk dedupe method Qu Wenruo
2016-04-01  6:35 ` [PATCH v10 17/21] btrfs: dedupe: Introduce interfaces to resume and cleanup dedupe info Qu Wenruo
2016-06-03 14:54   ` Josef Bacik
2016-04-01  6:35 ` [PATCH v10 18/21] btrfs: dedupe: Add support for on-disk hash search Qu Wenruo
2016-06-03 14:57   ` Josef Bacik
2016-04-01  6:35 ` [PATCH v10 19/21] btrfs: dedupe: Add support to delete hash for on-disk backend Qu Wenruo
2016-04-01  6:35 ` [PATCH v10 20/21] btrfs: dedupe: Add support for adding " Qu Wenruo
2016-06-03 15:03   ` Josef Bacik
2016-04-01  6:35 ` [PATCH v10 21/21] btrfs: dedupe: Preparation for compress-dedupe co-work Qu Wenruo
2016-04-01  8:53 ` [PATCH v10 16/21] btrfs: dedupe: Add basic tree structure for on-disk dedupe method Qu Wenruo
2016-06-03 15:20 ` [PATCH v10 00/21] Btrfs dedupe framework Josef Bacik
2016-06-04 10:37   ` Qu Wenruo

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.