Skip to content

btrfs-progs: Support for SKINNY_BG_TREE feature

Qu Wenruo linux-btrfs 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest11 patches 12 repliesIn review
  2. v37 patches 1 replySuperseded
  3. v27 patches 19 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v16 patches2 repliesSuperseded

Changes in v4 from the cover letter

- Go with skinny bg tree other than regular block group item We're introducing a new incompatible feature anyway, why not go extreme?

- Use the same refactor as kernel.
To make code much cleaner and easier to read.

- Add the ability to rollback to regular extent tree.
So confident tester can try SKINNY_BG_TREE using their real world data, and rollback if they still want to mount it using older kernels.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11btrfs-progs: check/lowmem: Lookup block group item in a seperate functioncheck/mode-lowmem.c+47 -271 reply
2/11btrfs-progs: block-group: Refactor how we read one block group itemextent-tree.c+27 -93 replies
3/11btrfs-progs: Rename btrfs_remove_block_group() and free_block_group_item()ctree.h extent-tree.c mkfs/main.c+30 -561 reply
4/11btrfs-progs: block-group: Refactor how we insert a block group itemextent-tree.c+21 -131 reply
5/11btrfs-progs: block-group: Rename write_one_cahce_group()extent-tree.c+14 -131 reply
6/11btrfs-progs: Introduce rw support for skinny_bg_treectree.h disk-io.c extent-tree.c+192 -100 replies
7/11btrfs-progs: mkfs: Introduce -O skinny-bg-treecommon/fsfeatures.c ctree.h extent-tree.c +4 more+121 -20 replies
8/11btrfs-progs: dump-tree/dump-super: Introduce support for skinny bg treecmds/inspect-dump-super.c cmds/inspect-dump-tree.c print-tree.c+11 -00 replies
9/11btrfs-progs: check: Introduce support for bg-tree featurecheck/common.h check/main.c check/mode-lowmem.c +1 more+111 -240 replies
10/11btrfs-progs: btrfstune: Allow to enable bg-tree feature offlineDocumentation/btrfstune.asciidoc btrfstune.c+23 -20 replies
11/11btrfs-progs: btrfstune: Allow user to rollback to regular extent treeDocumentation/btrfstune.asciidoc btrfstune.c ctree.h +3 more+150 -30 replies

Reviews trailers per patch

4 of 11 patches have a Reviewed-by or Acked-by.

PatchJohannes Thumshirn
1/11R-b
2/11
3/11R-b
4/11R-b
5/11R-b
6/11
7/11
8/11
9/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 00/11] btrfs-progs: Support for SKINNY_BG_TREE feature

This patchset can be fetched from github:
https://github.com/adam900710/btrfs-progs/tree/skinny_bg_tree
Which is based on v5.6 tag, with extra cleanups (sent to mail list) applied.

This patchset provides the needed user space infrastructure for SKINNY_BG_TREE feature.

Since it's an new incompatible feature, unlike SKINNY_METADATA, btrfs-progs is needed to convert existing fs (unmounted) to new format, and vice-verse.

Now btrfstune can convert regular extent tree fs to bg tree fs to improve mount time.

For the performance improvement, please check the kernel patchset cover letter or the last patch.
(SPOILER ALERT: It's super fast)

Changelog:
v2:
- Rebase to v5.2.2 tag
- Add btrfstune ability to convert existing fs to BG_TREE feature

v3:
- Fix a bug that temp chunks are not cleaned up properly This is caused by wrong timing btrfs_convert_to_bg_tree() is called. It should be called after temp chunks cleaned up.

- Fix a bug that an extent buffer get leaked
This is caused by newly created bg tree not added to dirty list.

v4:
- Go with skinny bg tree other than regular block group item We're introducing a new incompatible feature anyway, why not go extreme?

- Use the same refactor as kernel.
To make code much cleaner and easier to read.

- Add the ability to rollback to regular extent tree.
So confident tester can try SKINNY_BG_TREE using their real world data, and rollback if they still want to mount it using older kernels.

Qu Wenruo (11):
btrfs-progs: check/lowmem: Lookup block group item in a seperate
function
btrfs-progs: block-group: Refactor how we read one block group item
btrfs-progs: Rename btrfs_remove_block_group() and
free_block_group_item()
btrfs-progs: block-group: Refactor how we insert a block group item
btrfs-progs: block-group: Rename write_one_cahce_group()
btrfs-progs: Introduce rw support for skinny_bg_tree
btrfs-progs: mkfs: Introduce -O skinny-bg-tree
btrfs-progs: dump-tree/dump-super: Introduce support for skinny bg
tree
btrfs-progs: check: Introduce support for bg-tree feature
btrfs-progs: btrfstune: Allow to enable bg-tree feature offline
btrfs-progs: btrfstune: Allow user to rollback to regular extent tree

 Documentation/btrfstune.asciidoc |  10 +
 btrfstune.c                      |  36 +-
 check/common.h                   |   4 +-
 check/main.c                     |  60 +++-
 check/mode-lowmem.c              | 140 +++++---
 cmds/inspect-dump-super.c        |   1 +
 cmds/inspect-dump-tree.c         |   6 +
 cmds/rescue-chunk-recover.c      |   5 +-
 common/fsfeatures.c              |   6 +
 ctree.h                          |  23 +-
 disk-io.c                        |  20 ++
 extent-tree.c                    | 546 +++++++++++++++++++++++++------
 mkfs/common.c                    |   3 +-
 mkfs/common.h                    |   3 +
 mkfs/main.c                      |  13 +-
 print-tree.c                     |   4 +
 root-tree.c                      |   6 +-
 transaction.c                    |   2 +
 18 files changed, 738 insertions(+), 150 deletions(-)
Signature · 1 line
2.26.2