All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs-progs: tune: bgt resume related fix and enhancement
@ 2025-06-18  5:23 Qu Wenruo
  2025-06-18  5:23 ` [PATCH 1/3] btrfs-progs: tune: fix uninitialized value which leads to failed resume Qu Wenruo
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Qu Wenruo @ 2025-06-18  5:23 UTC (permalink / raw)
  To: linux-btrfs

There is a bug report from the mailing list (1) that btrfstune failed to
resume an interrupted conversion.

Although I hacked a small patch to skip the part of code that I believe
is the cause, it doesn't properly explain why the bug happened, as the
code looks good to me.

But with some time to tinker, I finally created a half-converted image
and can reproduce the bug somewhat reliably.

It turns out to be an uninitialized structure, and this also exposed an
inefficient behavior when reading block groups from the old extent tree.

Fix the bug first with the first patch.
Then enhance the extent tree block group items loading from the old
tree.

Finally a new test image for the bug.

(1): https://lore.kernel.org/linux-btrfs/a90b9418-48e8-47bf-8ec0-dd377a7c1f4e@gmail.com/

Qu Wenruo (3):
  btrfs-progs: tune: fix uninitialized value which leads to failed
    resume
  btrfs-progs: optimize the block group item load for half converted fs
  btrfs-progs: misc-tests: add an image for btrfstune bgt conversion

 kernel-shared/extent-tree.c                   |  47 ++++--------------
 tests/common                                  |   8 +++
 .../half-converted-bgt.raw.zst                | Bin 0 -> 2760068 bytes
 .../069-btrfstune-resume-bgt/test.sh          |  15 ++++++
 4 files changed, 33 insertions(+), 37 deletions(-)
 create mode 100644 tests/misc-tests/069-btrfstune-resume-bgt/half-converted-bgt.raw.zst
 create mode 100755 tests/misc-tests/069-btrfstune-resume-bgt/test.sh

--
2.49.0


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

end of thread, other threads:[~2025-06-20 23:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-18  5:23 [PATCH 0/3] btrfs-progs: tune: bgt resume related fix and enhancement Qu Wenruo
2025-06-18  5:23 ` [PATCH 1/3] btrfs-progs: tune: fix uninitialized value which leads to failed resume Qu Wenruo
2025-06-18  5:23 ` [PATCH 2/3] btrfs-progs: optimize the block group item load for half converted fs Qu Wenruo
2025-06-18  5:23 ` [PATCH 3/3] btrfs-progs: misc-tests: add an image for btrfstune bgt conversion Qu Wenruo
2025-06-20 17:08   ` David Sterba
2025-06-20 23:29     ` Qu Wenruo
2025-06-20 17:10 ` [PATCH 0/3] btrfs-progs: tune: bgt resume related fix and enhancement David Sterba

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.