From: Boris Burkov <boris@bur.io>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH v2 0/2] btrfs: ENOSPC fixes for unused block groups
Date: Mon, 28 Sep 2026 17:20:32 -0700 [thread overview]
Message-ID: <cover.1790641111.git.boris@bur.io> (raw)
A few fixes for system chunk allocation ENOSPCs caused by a sudden influx of a
large number of unused block groups in a filesystem with no free dev extents.
In practice, I saw this on a fully allocated fs with 30TB of space, a 4MiB
system chunk (single metadata mode) and ~10k unused data BGs.
- The first patch tries to avoid the condition by allocating earlier for the
system chunk.
- The second patch eagerly commits a single deletion when the system chunk is
at risk.
More details in the patches themselves.
Changelog:
v2:
- refactored some names and the flow in patch 1 to make it more clear.
Boris Burkov (2):
btrfs: allocate additional SYSTEM space earlier
btrfs: commit after deleting an unused block group if system space is
low
fs/btrfs/block-group.c | 59 +++++++++++++++++++++++++++++++++++-------
1 file changed, 49 insertions(+), 10 deletions(-)
--
2.55.0
next reply other threads:[~2026-09-29 0:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 0:20 Boris Burkov [this message]
2026-09-29 0:20 ` [PATCH v2 1/2] btrfs: allocate additional SYSTEM space earlier Boris Burkov
2026-09-29 0:20 ` [PATCH v2 2/2] btrfs: commit after deleting an unused block group if system space is low Boris Burkov
2026-09-29 14:54 ` [PATCH v2 0/2] btrfs: ENOSPC fixes for unused block groups Filipe Manana
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.1790641111.git.boris@bur.io \
--to=boris@bur.io \
--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.