public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 00/19] btrfs-progs: extent tree v2 support, global roots
@ 2022-03-07 22:10 Josef Bacik
  2022-03-07 22:10 ` [PATCH v5 01/19] btrfs-progs: add support for loading the block group root Josef Bacik
                   ` (19 more replies)
  0 siblings, 20 replies; 29+ messages in thread
From: Josef Bacik @ 2022-03-07 22:10 UTC (permalink / raw)
  To: linux-btrfs, kernel-team

v4->v3:
- Rebase onto devel, depends on "btrfs-progs: cleanup btrfs_item* accessors".
- Dropped the various patches that have already been merged into -progs.

v3->v4:
- Rebase onto devel, depends on the v3 prep patches that were sent on December
  1st which has the rest of the "don't access ->*_root" patches.
- I think I screwed up the versioning of this, but I lost the other submission,
  so call this v3.

v1->v2:
- These depend on the v3 of the prep patches (it's marked as v2 because I'm
  stupid, but the second v2 posting I sent.)
- I've moved the global root rb tree patches into this series to differentiate
  them from the actual fixes in the prep series.

--- Original email ---
Hello,

These patches are the first chunk of the extent tree v2 format changes.  This
includes the separate block group root which will hold all of the block group
items.  This also includes the global root support, which is the work to allow
us to have multiple extent, csum, and free space trees in the same file system.

The goal of these two changes are straightforward.  For the block group root, on
very large file systems the block group items are very widely separated, which
means it takes a very long time to mount the file system on large, slow disks.
Putting the block group items in their own root will allow us to densely
populate the tree and dramatically increase mount times in these cases.

The global roots change is motivated by lock contention on the root nodes of
these global roots.  I've had to make many changes to how we run delayed refs to
speed up things like the transaction commit because of all the delayed refs
going into one tree and contending on the root node of the extent tree.  In the
same token you can have heavy lock contention on the csum roots when writing to
many files.  Allowing for multiple roots will let us spread the lock contention
load around.

I have disabled a few key features, namely balance and qgroups.  There will be
more to come as I make more and more invasive changes, and then they will slowly
be re-enabled as the work is added.  These are disabled to avoid a bunch of work
that would be thrown away by future changes.

These patches have passed xfstests without panicing, but clearly failing a lot
of tests because of the disabled features.  I've also run it through fsperf to
validate that there are no major performance regressions.

WARNING: there are many more format changes planned, this is just the first
batch.  If you want to test then please feel free, but know that the format is
still in flux.  Thanks,

Josef

Josef Bacik (19):
  btrfs-progs: add support for loading the block group root
  btrfs-progs: add print support for the block group tree
  btrfs-progs: mkfs: use the btrfs_block_group_root helper
  btrfs-progs: check-lowmem: use the btrfs_block_group_root helper
  btrfs-progs: handle no bg item in extent tree for free space tree
  btrfs-progs: mkfs: add support for the block group tree
  btrfs-progs: check: add block group tree support
  btrfs-progs: qgroup-verify: scan extents based on block groups
  btrfs-progs: check: make free space tree validation extent tree v2
    aware
  btrfs-progs: check: add helper to reinit the root based on a key
  btrfs-progs: check: handle the block group tree properly
  btrfs-progs: set the number of global roots in the super block
  btrfs-progs: handle the per-block group global root id
  btrfs-progs: add a btrfs_delete_and_free_root helper
  btrfs-progs: make btrfs_clear_free_space_tree extent tree v2 aware
  btrfs-progs: make btrfs_create_tree take a key for the root key
  btrfs-progs: mkfs: set chunk_item_objectid properly for extent tree v2
  btrfs-progs: mkfs: create the global root's
  btrfs-progs: check: don't do the root item check for extent tree v2

 check/main.c                    | 233 +++++++++++++++++--------------
 check/mode-lowmem.c             |  12 +-
 check/qgroup-verify.c           |  32 +++--
 cmds/inspect-dump-tree.c        |  30 +++-
 common/repair.c                 |   3 +
 kernel-shared/ctree.h           |   9 +-
 kernel-shared/disk-io.c         | 235 ++++++++++++++++++++++++--------
 kernel-shared/disk-io.h         |  15 +-
 kernel-shared/extent-tree.c     |  32 ++++-
 kernel-shared/free-space-tree.c |  72 +++++-----
 kernel-shared/print-tree.c      |  23 +++-
 kernel-shared/transaction.c     |   2 +
 mkfs/common.c                   |  94 ++++++++++---
 mkfs/common.h                   |  12 ++
 mkfs/main.c                     |  93 ++++++++++++-
 15 files changed, 658 insertions(+), 239 deletions(-)

-- 
2.26.3


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

end of thread, other threads:[~2022-06-14 12:47 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-07 22:10 [PATCH v5 00/19] btrfs-progs: extent tree v2 support, global roots Josef Bacik
2022-03-07 22:10 ` [PATCH v5 01/19] btrfs-progs: add support for loading the block group root Josef Bacik
2022-03-07 22:10 ` [PATCH v5 02/19] btrfs-progs: add print support for the block group tree Josef Bacik
2022-03-07 22:10 ` [PATCH v5 03/19] btrfs-progs: mkfs: use the btrfs_block_group_root helper Josef Bacik
2022-03-07 22:10 ` [PATCH v5 04/19] btrfs-progs: check-lowmem: " Josef Bacik
2022-03-07 22:10 ` [PATCH v5 05/19] btrfs-progs: handle no bg item in extent tree for free space tree Josef Bacik
2022-03-07 22:10 ` [PATCH v5 06/19] btrfs-progs: mkfs: add support for the block group tree Josef Bacik
2022-03-07 22:10 ` [PATCH v5 07/19] btrfs-progs: check: add block group tree support Josef Bacik
2022-03-07 22:10 ` [PATCH v5 08/19] btrfs-progs: qgroup-verify: scan extents based on block groups Josef Bacik
2022-03-07 22:10 ` [PATCH v5 09/19] btrfs-progs: check: make free space tree validation extent tree v2 aware Josef Bacik
2022-03-07 22:10 ` [PATCH v5 10/19] btrfs-progs: check: add helper to reinit the root based on a key Josef Bacik
2022-03-07 22:10 ` [PATCH v5 11/19] btrfs-progs: check: handle the block group tree properly Josef Bacik
2022-03-07 22:10 ` [PATCH v5 12/19] btrfs-progs: set the number of global roots in the super block Josef Bacik
2022-03-08 16:19   ` David Sterba
2022-03-08 16:41     ` Johannes Thumshirn
2022-03-09 17:05       ` David Sterba
2022-03-09 21:22         ` Josef Bacik
2022-06-14 12:15           ` Qu Wenruo
2022-06-14 12:47             ` Qu Wenruo
2022-03-07 22:10 ` [PATCH v5 13/19] btrfs-progs: handle the per-block group global root id Josef Bacik
2022-03-07 22:10 ` [PATCH v5 14/19] btrfs-progs: add a btrfs_delete_and_free_root helper Josef Bacik
2022-03-07 22:11 ` [PATCH v5 15/19] btrfs-progs: make btrfs_clear_free_space_tree extent tree v2 aware Josef Bacik
2022-03-07 22:11 ` [PATCH v5 16/19] btrfs-progs: make btrfs_create_tree take a key for the root key Josef Bacik
2022-03-07 22:11 ` [PATCH v5 17/19] btrfs-progs: mkfs: set chunk_item_objectid properly for extent tree v2 Josef Bacik
2022-03-07 22:11 ` [PATCH v5 18/19] btrfs-progs: mkfs: create the global root's Josef Bacik
2022-03-09 18:35   ` David Sterba
2022-03-09 21:21     ` Josef Bacik
2022-03-07 22:11 ` [PATCH v5 19/19] btrfs-progs: check: don't do the root item check for extent tree v2 Josef Bacik
2022-03-09 18:48 ` [PATCH v5 00/19] btrfs-progs: extent tree v2 support, global roots David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox