linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Subject: [PATCH v15.1 00/13] Btrfs In-band De-duplication
Date: Tue, 6 Nov 2018 14:41:09 +0800	[thread overview]
Message-ID: <20181106064122.6154-1-lufq.fnst@cn.fujitsu.com> (raw)

This patchset can be fetched from github:
https://github.com/littleroad/linux.git dedupe_latest

Now the new base is v4.20-rc1.

Normal test cases from auto group exposes no regression, and ib-dedupe
group can pass without problem.

xfstests ib-dedupe group can be fetched from github:
https://github.com/littleroad/xfstests-dev.git btrfs_dedupe_latest

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.
v11:
  Remove other backend and props support to focus on the framework and
  in-memory backend. Suggested by David.
  Better disable and buffered write race protection.
  Comprehensive fix to dedupe metadata ENOSPC problem.
v12:
  Stateful 'enable' ioctl and new 'reconf' ioctl
  New FORCE flag for enable ioctl to allow stateless ioctl
  Precise error report and extendable ioctl structure.
v12.1
  Rebase to David's for-next-20160704 branch
  Add co-ordinate patch for subpage and dedupe patchset.
v12.2
  Rebase to David's for-next-20160715 branch
  Add co-ordinate patch for other patchset.
v13
  Rebase to David's for-next-20160906 branch
  Fix a reserved space leak bug, which only frees quota reserved space
  but not space_info->byte_may_use.
v13.1
  Rebase to Chris' for-linux-4.9 branch
v14
  Use generic ENOSPC fix for both compression and dedupe.
v14.1
  Further split ENOSPC fix.
v14.2
  Rebase to v4.11-rc2.
  Co-operate with count_max_extent() to calculate num_extents.
  No longer rely on qgroup fixes.
v14.3
  Rebase to v4.12-rc1.
v14.4
  Rebase to kdave/for-4.13-part1.
v14.5
  Rebase to v4.15-rc3.
v14.6
  Rebase to v4.17-rc5.
v14.7
  Replace SHASH_DESC_ON_STACK with kmalloc to remove VLA.
  Fixed the following errors by switching to div_u64.
  ├── arm-allmodconfig
  │   └── ERROR:__aeabi_uldivmod-fs-btrfs-btrfs.ko-undefined
  └── i386-allmodconfig
      └── ERROR:__udivdi3-fs-btrfs-btrfs.ko-undefined
v14.8
  Rebase to v4.18-rc4.
v15
  Rebase to v4.19-rc2.
  Drop "btrfs: Introduce COMPRESS reserve type to fix false enospc for compression".
  Remove the ifdef around btrfs inband dedupe ioctl.
v15.1
  Rebase to v4.20-rc1.

Qu Wenruo (4):
  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: Introduce new reconfigure ioctl

Wang Xiaoguang (9):
  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: introduce type based delalloc metadata reserve
  btrfs: dedupe: Add ioctl for inband deduplication

 fs/btrfs/Makefile            |   2 +-
 fs/btrfs/ctree.h             |  52 ++-
 fs/btrfs/dedupe.c            | 828 +++++++++++++++++++++++++++++++++++
 fs/btrfs/dedupe.h            | 175 +++++++-
 fs/btrfs/delayed-ref.c       |  53 ++-
 fs/btrfs/delayed-ref.h       |  15 +
 fs/btrfs/disk-io.c           |   4 +
 fs/btrfs/extent-tree.c       |  67 ++-
 fs/btrfs/extent_io.c         |   7 +-
 fs/btrfs/extent_io.h         |   1 +
 fs/btrfs/file.c              |  34 +-
 fs/btrfs/free-space-cache.c  |   6 +-
 fs/btrfs/inode-map.c         |   9 +-
 fs/btrfs/inode.c             | 426 ++++++++++++++----
 fs/btrfs/ioctl.c             | 122 +++++-
 fs/btrfs/ordered-data.c      |  52 ++-
 fs/btrfs/ordered-data.h      |  16 +-
 fs/btrfs/relocation.c        |  59 ++-
 fs/btrfs/sysfs.c             |   2 +
 fs/btrfs/tests/inode-tests.c |  15 +-
 include/uapi/linux/btrfs.h   |  56 +++
 21 files changed, 1832 insertions(+), 169 deletions(-)
 create mode 100644 fs/btrfs/dedupe.c

-- 
2.19.1




             reply	other threads:[~2018-11-06  6:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06  6:41 Lu Fengqi [this message]
2018-11-06  6:41 ` [PATCH v15.1 01/13] btrfs: dedupe: Introduce dedupe framework and its header Lu Fengqi
2018-11-08  9:53   ` Timofey Titovets
2018-11-09 21:10   ` Josef Bacik
2018-11-06  6:41 ` [PATCH v15.1 02/13] btrfs: dedupe: Introduce function to initialize dedupe info Lu Fengqi
2018-11-08 12:31   ` Timofey Titovets
2018-11-06  6:41 ` [PATCH v15.1 03/13] btrfs: dedupe: Introduce function to add hash into in-memory tree Lu Fengqi
2018-11-08 20:18   ` Timofey Titovets
2018-11-06  6:41 ` [PATCH v15.1 04/13] btrfs: dedupe: Introduce function to remove hash from " Lu Fengqi
2018-11-09 21:17   ` Josef Bacik
2018-11-06  6:41 ` [PATCH v15.1 05/13] btrfs: delayed-ref: Add support for increasing data ref under spinlock Lu Fengqi
2018-11-06  6:41 ` [PATCH v15.1 06/13] btrfs: dedupe: Introduce function to search for an existing hash Lu Fengqi
2018-11-06  6:41 ` [PATCH v15.1 07/13] btrfs: dedupe: Implement btrfs_dedupe_calc_hash interface Lu Fengqi
2018-11-06  6:41 ` [PATCH v15.1 08/13] btrfs: ordered-extent: Add support for dedupe Lu Fengqi
2018-11-06  6:41 ` [PATCH v15.1 09/13] btrfs: introduce type based delalloc metadata reserve Lu Fengqi
2018-11-06  6:41 ` [PATCH v15.1 10/13] btrfs: dedupe: Inband in-memory only de-duplication implement Lu Fengqi
2018-11-06  6:41 ` [PATCH v15.1 11/13] btrfs: dedupe: Add ioctl for inband deduplication Lu Fengqi
2018-11-06  6:41 ` [PATCH v15.1 12/13] btrfs: relocation: Enhance error handling to avoid BUG_ON Lu Fengqi
2018-11-06  6:41 ` [PATCH v15.1 13/13] btrfs: dedupe: Introduce new reconfigure ioctl Lu Fengqi
2018-11-10  7:21 ` [PATCH v15.1 00/13] Btrfs In-band De-duplication Anand Jain
2018-11-13 13:45 ` David Sterba
2018-11-14  3:47   ` Lu Fengqi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181106064122.6154-1-lufq.fnst@cn.fujitsu.com \
    --to=lufq.fnst@cn.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).