Skip to content

btrfs: ENOSPC fixes for unused block groups

Boris Burkov linux-btrfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- refactored some names and the flow in patch 1 to make it more clear.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: allocate additional SYSTEM space earlierfs/btrfs/block-group.c+33 -90 replies
2/2btrfs: commit after deleting an unused block group if system space is lowfs/btrfs/block-group.c+16 -10 replies

Reviews trailers per patch

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

PatchFilipe Manana
SeriesR-b
1/2
2/2

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

Read the v2 thread

Cover letter [PATCH v2 0/2] btrfs: ENOSPC fixes for unused block groups

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(-)
Signature · 1 line
2.55.0