All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH v2 00/22]  btrfs-progs: extent tree v2 support, global roots
Date: Wed,  1 Dec 2021 13:16:54 -0500	[thread overview]
Message-ID: <cover.1638382588.git.josef@toxicpanda.com> (raw)

v1->v2:
- Rebased onto origin/devel.

--- 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 (22):
  btrfs-progs: common: allow users to select extent-tree-v2 option
  btrfs-progs: add definitions for the block group tree
  btrfs-progs: add on disk pointers to global tree ids
  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: load the number of global roots into the fs_info
  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        |  37 +++-
 common/fsfeatures.c             |  11 ++
 common/repair.c                 |   3 +
 kernel-shared/ctree.h           |  66 +++++++-
 kernel-shared/disk-io.c         | 287 ++++++++++++++++++++++++++------
 kernel-shared/disk-io.h         |  15 +-
 kernel-shared/extent-tree.c     |  32 +++-
 kernel-shared/free-space-tree.c |  72 ++++----
 kernel-shared/print-tree.c      |  26 ++-
 kernel-shared/transaction.c     |   2 +
 libbtrfsutil/btrfs_tree.h       |   3 +
 mkfs/common.c                   |  93 ++++++++---
 mkfs/common.h                   |  12 ++
 mkfs/main.c                     |  96 ++++++++++-
 17 files changed, 791 insertions(+), 241 deletions(-)

-- 
2.26.3


             reply	other threads:[~2021-12-01 18:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01 18:16 Josef Bacik [this message]
2021-12-01 18:16 ` [PATCH v2 01/22] btrfs-progs: common: allow users to select extent-tree-v2 option Josef Bacik
2021-12-01 18:16 ` [PATCH v2 02/22] btrfs-progs: add definitions for the block group tree Josef Bacik
2021-12-01 18:16 ` [PATCH v2 03/22] btrfs-progs: add on disk pointers to global tree ids Josef Bacik
2021-12-01 18:16 ` [PATCH v2 04/22] btrfs-progs: add support for loading the block group root Josef Bacik
2021-12-01 18:16 ` [PATCH v2 05/22] btrfs-progs: add print support for the block group tree Josef Bacik
2021-12-01 18:17 ` [PATCH v2 06/22] btrfs-progs: mkfs: use the btrfs_block_group_root helper Josef Bacik
2021-12-01 18:17 ` [PATCH v2 07/22] btrfs-progs: check-lowmem: " Josef Bacik
2021-12-01 18:17 ` [PATCH v2 08/22] btrfs-progs: handle no bg item in extent tree for free space tree Josef Bacik
2021-12-01 18:17 ` [PATCH v2 09/22] btrfs-progs: mkfs: add support for the block group tree Josef Bacik
2021-12-01 18:17 ` [PATCH v2 10/22] btrfs-progs: check: add block group tree support Josef Bacik
2021-12-01 18:17 ` [PATCH v2 11/22] btrfs-progs: qgroup-verify: scan extents based on block groups Josef Bacik
2021-12-01 18:17 ` [PATCH v2 12/22] btrfs-progs: check: make free space tree validation extent tree v2 aware Josef Bacik
2021-12-01 18:17 ` [PATCH v2 13/22] btrfs-progs: check: add helper to reinit the root based on a key Josef Bacik
2021-12-01 18:17 ` [PATCH v2 14/22] btrfs-progs: check: handle the block group tree properly Josef Bacik
2021-12-01 18:17 ` [PATCH v2 15/22] btrfs-progs: load the number of global roots into the fs_info Josef Bacik
2021-12-01 18:17 ` [PATCH v2 16/22] btrfs-progs: handle the per-block group global root id Josef Bacik
2021-12-01 18:17 ` [PATCH v2 17/22] btrfs-progs: add a btrfs_delete_and_free_root helper Josef Bacik
2021-12-01 18:17 ` [PATCH v2 18/22] btrfs-progs: make btrfs_clear_free_space_tree extent tree v2 aware Josef Bacik
2021-12-01 18:17 ` [PATCH v2 19/22] btrfs-progs: make btrfs_create_tree take a key for the root key Josef Bacik
2021-12-01 18:17 ` [PATCH v2 20/22] btrfs-progs: mkfs: set chunk_item_objectid properly for extent tree v2 Josef Bacik
2021-12-01 18:17 ` [PATCH v2 21/22] btrfs-progs: mkfs: create the global root's Josef Bacik
2021-12-01 18:17 ` [PATCH v2 22/22] btrfs-progs: check: don't do the root item check for extent tree v2 Josef Bacik

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=cover.1638382588.git.josef@toxicpanda.com \
    --to=josef@toxicpanda.com \
    --cc=kernel-team@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.