All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Burkov <boris@bur.io>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH v3 0/3] pending chunk allocation EEXIST fix
Date: Mon, 26 Jan 2026 09:18:50 -0800	[thread overview]
Message-ID: <cover.1769447820.git.boris@bur.io> (raw)

Fix a somewhat convoluted bug in chunk allocation with non consecutive
pending extents. Also, add unit tests covering the new search functions
and fix a build warning

Changelog:
v3:
- fix build warning when CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
v2:
- change the semantics of btrfs_find_hole_in_pending_extents to return
  the largest hole on failure. A different bug in the implementation of
  the incorrect v1 semantics was hiding this.
- add the unit tests
- add the build warning fix

Boris Burkov (3):
  btrfs: fix EEXIST abort due to non-consecutive gaps in chunk
    allocation
  btrfs: unit tests for pending extent walking functions
  btrfs: forward declare btrfs_fs_info in volumes.h

 fs/btrfs/Makefile                       |   3 +-
 fs/btrfs/tests/btrfs-tests.c            |   3 +
 fs/btrfs/tests/btrfs-tests.h            |   1 +
 fs/btrfs/tests/chunk-allocation-tests.c | 481 ++++++++++++++++++++++++
 fs/btrfs/volumes.c                      | 246 +++++++++---
 fs/btrfs/volumes.h                      |   6 +
 6 files changed, 678 insertions(+), 62 deletions(-)
 create mode 100644 fs/btrfs/tests/chunk-allocation-tests.c

-- 
2.52.0


             reply	other threads:[~2026-01-26 17:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-26 17:18 Boris Burkov [this message]
2026-01-26 17:18 ` [PATCH v3 1/3] btrfs: fix EEXIST abort due to non-consecutive gaps in chunk allocation Boris Burkov
2026-01-26 17:18 ` [PATCH v3 2/3] btrfs: unit tests for pending extent walking functions Boris Burkov
2026-01-29  2:11   ` David Sterba
2026-01-26 17:18 ` [PATCH v3 3/3] btrfs: forward declare btrfs_fs_info in volumes.h Boris Burkov
2026-01-26 23:04   ` Wang Yugui
2026-01-27 19:02     ` Boris Burkov
2026-01-29  1:53       ` David Sterba

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.1769447820.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.