mbox series

[v2,0/3] btrfs: free space tree mounting fixes

Message ID cover.1599686801.git.boris@bur.io (mailing list archive)
Headers show
Series btrfs: free space tree mounting fixes | expand

Message

Boris Burkov Sept. 9, 2020, 9:45 p.m. UTC
A few fixes for issues with mounting the btrfs free space tree
(aka space_cache v2). These are not dependent, and are only related
loosely, in that they all apply to mounting the file system with
the free space tree.

The first patch fixes -o remount,space_cache=v2.

The second patch fixes the slight oversight of not cleaning up the
space cache free space object or free space inodes when migrating to
the free space tree.

The third patch stops re-creating the free space objects when we
are not using space_cache=v1.

changes for v2:
Patch 1/3: made remount _only_ work in ro->rw case, added comment.
Patch 2/3: added btrfs_ prefix to non-static function, removed bad
           whitespace.
Patch 3/3: new in v2, was part of Patch 2/2 in v1.

Boris Burkov (3):
  btrfs: support remount of ro fs with free space tree
  btrfs: remove free space items when creating free space tree
  btrfs: skip space_cache v1 setup when not using it

 fs/btrfs/block-group.c      | 42 ++++----------------------------
 fs/btrfs/free-space-cache.c | 48 +++++++++++++++++++++++++++++++++++++
 fs/btrfs/free-space-cache.h |  2 ++
 fs/btrfs/free-space-tree.c  |  3 +++
 fs/btrfs/super.c            | 29 ++++++++++++++++++++++
 5 files changed, 87 insertions(+), 37 deletions(-)