linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/3] btrfs: add sysfs switch to get/set metadata size
@ 2022-02-08 19:31 Stefan Roesch
  2022-02-08 19:31 ` [PATCH v1 1/3] btrfs: store chunk size in space-info struct Stefan Roesch
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Stefan Roesch @ 2022-02-08 19:31 UTC (permalink / raw)
  To: linux-btrfs, kernel-team; +Cc: shr

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
-- 
2.30.2


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

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

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 19:31 [PATCH v1 0/3] btrfs: add sysfs switch to get/set metadata size Stefan Roesch
2022-02-08 19:31 ` [PATCH v1 1/3] btrfs: store chunk size in space-info struct Stefan Roesch
2022-04-04 16:36   ` David Sterba
2022-06-16 20:53     ` Stefan Roesch
2022-02-08 19:31 ` [PATCH v1 2/3] btrfs: expose chunk size in sysfs Stefan Roesch
2022-04-04 16:52   ` David Sterba
2022-06-16 20:56     ` Stefan Roesch
2022-02-08 19:31 ` [PATCH v1 3/3] btrfs: add force_chunk_alloc sysfs entry to force allocation Stefan Roesch
2022-04-04 17:02   ` David Sterba
2022-06-16 20:59     ` Stefan Roesch
2022-06-17 14:14       ` David Sterba
2022-02-28 19:30 ` [PATCH v1 0/3] btrfs: add sysfs switch to get/set metadata size Josef Bacik
2022-04-04 16:31 ` David Sterba
2022-05-27 13:34   ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).