mbox series

[v2,00/20] btrfs-progs: extent tree v2 global root support prep work

Message ID cover.1636399481.git.josef@toxicpanda.com (mailing list archive)
Headers show
Series btrfs-progs: extent tree v2 global root support prep work | expand

Message

Josef Bacik Nov. 8, 2021, 7:26 p.m. UTC
v1->v2:
- reworked the root node helper thing to check the level as well as per Qu's
  suggestion.
- Fixed a place where we weren't inluding common/repair.h to get a helper that I
  moved (not entirely sure how this still built but whatever.)
- Fixed a place where I could get fs_info from an eb instead of passing it
  around.

--- Original email ---
Hello,

This is a series of patches to do all the prep work needed to support extent
tree v2.  These patches are independent of the actual extent tree v2 support,
some of them are fixes, some of them are purely to pave the way for the global
root support.  These patches are mostly around stopping direct access of
->extent_root/->csum_root/->free_space_root, putting these roots into a rb_tree,
and changing the code to look up the roots in the rb_tree instead of accessing
them directly.  There are a variety of fixes to help make this easier, mostly
removing access to these roots that are strictly necessary.  Thanks,

Josef

Josef Bacik (20):
  btrfs-progs: simplify btrfs_make_block_group
  btrfs-progs: check: don't walk down non fs-trees for qgroup check
  btrfs-progs: filesystem-show: close ctree once we're done
  btrfs-progs: add a helper for setting up a root node
  btrfs-progs: btrfs-shared: stop passing root to csum related functions
  btrfs-progs: check: stop passing csum root around
  btrfs-progs: stop accessing ->csum_root directly
  btrfs-progs: image: keep track of seen blocks when walking trees
  btrfs-progs: common: move btrfs_fix_block_accounting to repair.c
  btrfs-progs: check: abstract out the used marking helpers
  btrfs-progs: check: move btrfs_mark_used_tree_blocks to common
  btrfs-progs: mark reloc roots as used
  btrfs-progs: stop accessing ->extent_root directly
  btrfs-progs: stop accessing ->free_space_root directly
  btrfs-progs: track csum, extent, and free space trees in a rb tree
  btrfs-progs: check: make reinit work per found root item
  btrfs-progs: check: check the global roots for uptodate root nodes
  btrfs-progs: check: check all of the csum roots
  btrfs-progs: check: fill csum root from all extent roots
  btrfs-progs: common: search all extent roots for marking used space

 btrfs-corrupt-block.c           |  15 +-
 btrfs-map-logical.c             |   9 +-
 btrfstune.c                     |   2 +-
 check/main.c                    | 223 +++++++++++++------
 check/mode-common.c             | 132 +----------
 check/mode-lowmem.c             |  72 +++---
 check/qgroup-verify.c           |   6 +-
 cmds/filesystem.c               |  19 +-
 cmds/rescue-chunk-recover.c     |  35 ++-
 common/repair.c                 | 227 +++++++++++++++++++
 common/repair.h                 |   5 +
 convert/main.c                  |   6 +-
 image/main.c                    |  14 +-
 kernel-shared/backref.c         |  10 +-
 kernel-shared/ctree.h           |  10 +-
 kernel-shared/disk-io.c         | 373 ++++++++++++++++++++++++--------
 kernel-shared/disk-io.h         |   8 +-
 kernel-shared/extent-tree.c     | 159 ++++----------
 kernel-shared/file-item.c       |   6 +-
 kernel-shared/free-space-tree.c |  54 +++--
 kernel-shared/volumes.c         |   3 +-
 kernel-shared/zoned.c           |   2 +-
 mkfs/main.c                     |  29 ++-
 mkfs/rootdir.c                  |   2 +-
 24 files changed, 907 insertions(+), 514 deletions(-)

Comments

David Sterba Nov. 30, 2021, 6 p.m. UTC | #1
On Mon, Nov 08, 2021 at 02:26:28PM -0500, Josef Bacik wrote:
> v1->v2:
> - reworked the root node helper thing to check the level as well as per Qu's
>   suggestion.
> - Fixed a place where we weren't inluding common/repair.h to get a helper that I
>   moved (not entirely sure how this still built but whatever.)
> - Fixed a place where I could get fs_info from an eb instead of passing it
>   around.
> 
> --- Original email ---
> Hello,
> 
> This is a series of patches to do all the prep work needed to support extent
> tree v2.  These patches are independent of the actual extent tree v2 support,
> some of them are fixes, some of them are purely to pave the way for the global
> root support.  These patches are mostly around stopping direct access of
> ->extent_root/->csum_root/->free_space_root, putting these roots into a rb_tree,
> and changing the code to look up the roots in the rb_tree instead of accessing
> them directly.  There are a variety of fixes to help make this easier, mostly
> removing access to these roots that are strictly necessary.  Thanks,
> 
> Josef
> 
> Josef Bacik (20):
>   btrfs-progs: simplify btrfs_make_block_group
>   btrfs-progs: check: don't walk down non fs-trees for qgroup check
>   btrfs-progs: filesystem-show: close ctree once we're done
>   btrfs-progs: add a helper for setting up a root node
>   btrfs-progs: btrfs-shared: stop passing root to csum related functions
>   btrfs-progs: check: stop passing csum root around
>   btrfs-progs: stop accessing ->csum_root directly
>   btrfs-progs: image: keep track of seen blocks when walking trees
>   btrfs-progs: common: move btrfs_fix_block_accounting to repair.c
>   btrfs-progs: check: abstract out the used marking helpers
>   btrfs-progs: check: move btrfs_mark_used_tree_blocks to common
>   btrfs-progs: mark reloc roots as used
>   btrfs-progs: stop accessing ->extent_root directly
>   btrfs-progs: stop accessing ->free_space_root directly
>   btrfs-progs: track csum, extent, and free space trees in a rb tree
>   btrfs-progs: check: make reinit work per found root item
>   btrfs-progs: check: check the global roots for uptodate root nodes
>   btrfs-progs: check: check all of the csum roots
>   btrfs-progs: check: fill csum root from all extent roots
>   btrfs-progs: common: search all extent roots for marking used space

Half of the series was in devel, the rest added as well, thanks.