Skip to content

btrfs: extent-tree-v2, gc and no meta ref counting

Josef Bacik linux-btrfs 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 0 repliesNew
  2. v19 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- I decided to add the nr of expected global roots to the super block to make checking more straightforward, so added a patch for reading that value.
- I sent the prep patches/fixes in a different series and those were merged, so dropped them from this series

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6btrfs: read the nr_global_roots from the super blockfs/btrfs/ctree.h fs/btrfs/disk-io.c+17 -120 replies
2/6btrfs: don't do backref modification for metadata for extent tree v2fs/btrfs/extent-tree.c+9 -40 replies
3/6btrfs: add definitions and read support for the garbage collection treefs/btrfs/disk-io.c fs/btrfs/print-tree.c include/uapi/linux/btrfs_tree.h+16 -00 replies
4/6btrfs: add a btrfs_first_item helperfs/btrfs/ctree.c fs/btrfs/ctree.h+24 -00 replies
5/6btrfs: turn evict_refill_and_join into a real helperfs/btrfs/ctree.h fs/btrfs/inode.c fs/btrfs/space-info.c +2 more+56 -530 replies
6/6btrfs: add garbage collection tree supportfs/btrfs/Makefile fs/btrfs/ctree.h fs/btrfs/disk-io.c +4 more+272 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/6] btrfs: extent-tree-v2, gc and no meta ref counting

v1->v2:
- I decided to add the nr of expected global roots to the super block to make checking more straightforward, so added a patch for reading that value.
- I sent the prep patches/fixes in a different series and those were merged, so dropped them from this series

--- Original email ---

Hello,

This is the kernel side of the support for the GC trees and no longer tracking metadata reference counts.

For the GC tree we're only implementing offloading the truncate to the GC tree for now. As new support is added we'll add code for the garbage collection for each of the new operations. Truncate was picked because it's simple enough to do, gets us a nice latency win on normal workloads, and is a quick way to validate that the GC tree is doing what it's supposed to.

This also disables the reference counting of metadata blocks. Snapshotting and everything reference counting related to metadata has been disabled, and will be turned back on as the code needed to support those operations is added back.

This survives xfstests without blowing up. Thanks,

Josef

Josef Bacik (6):
btrfs: read the nr_global_roots from the super block
btrfs: don't do backref modification for metadata for extent tree v2
btrfs: add definitions and read support for the garbage collection
tree
btrfs: add a btrfs_first_item helper
btrfs: turn evict_refill_and_join into a real helper
btrfs: add garbage collection tree support

 fs/btrfs/Makefile               |   2 +-
 fs/btrfs/ctree.c                |  23 ++++
 fs/btrfs/ctree.h                |  19 ++-
 fs/btrfs/disk-io.c              |  37 ++++--
 fs/btrfs/extent-tree.c          |  13 +-
 fs/btrfs/gc-tree.c              | 223 ++++++++++++++++++++++++++++++++
 fs/btrfs/gc-tree.h              |  15 +++
 fs/btrfs/inode.c                |  65 +++-------
 fs/btrfs/print-tree.c           |   4 +
 fs/btrfs/space-info.c           |   4 +-
 fs/btrfs/transaction.c          |  52 ++++++++
 fs/btrfs/transaction.h          |   2 +
 include/uapi/linux/btrfs_tree.h |   6 +
 13 files changed, 394 insertions(+), 71 deletions(-)
 create mode 100644 fs/btrfs/gc-tree.c
 create mode 100644 fs/btrfs/gc-tree.h
Signature · 1 line
2.26.3