Skip to content

btrfs: add sysfs switch to get/set metadata size

Stefan Roesch linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs: store chunk size in space-info struct.fs/btrfs/space-info.c fs/btrfs/space-info.h fs/btrfs/volumes.c+53 -192 replies
2/3btrfs: expose chunk size in sysfs.fs/btrfs/sysfs.c+94 -02 replies
3/3btrfs: add force_chunk_alloc sysfs entry to force allocationfs/btrfs/sysfs.c+58 -03 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJosef Bacik
SeriesR-b
1/3
2/3
3/3

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

Read the v1 thread

Cover letter [PATCH v1 0/3] btrfs: add sysfs switch to get/set metadata size

The btrfs allocator is currently not ideal for all workloads. It tends to suffer from overallocating data block groups and underallocating metadata block groups. This results in filesystems becoming read-only even though there is plenty of "free" space.

This patch adds the ability to query and set the metadata allocation size.

Patch 1: btrfs: store chunk size in space-info struct.
Store the stripe and chunk size in the btrfs_space_info structure to be able to expose and set the metadata allocation size.

Patch 2: btrfs: expose chunk size in sysfs.
Add a sysfs entry to read and write the above information.

btrfs: add force_chunk_alloc sysfs entry to force allocation
For testing purposes and under a debug flag add a sysfs entry to force a space allocation.

Stefan Roesch (3):
btrfs: store chunk size in space-info struct.
btrfs: expose chunk size in sysfs.
btrfs: add force_chunk_alloc sysfs entry to force allocation

 fs/btrfs/space-info.c |  41 ++++++++++++
 fs/btrfs/space-info.h |   3 +
 fs/btrfs/sysfs.c      | 152 ++++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/volumes.c    |  28 +++-----
 4 files changed, 205 insertions(+), 19 deletions(-)

base-commit: dfd42facf1e4ada021b939b4e19c935dcdd55566

Signature · 1 line
2.30.2