btrfs-progs: tune: bgt resume related fix and enhancement
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | btrfs-progs: tune: fix uninitialized value which leads to failed resumekernel-shared/ | +1 | 0 replies | |
| 2/3 | btrfs-progs: optimize the block group item load for half converted fskernel-shared/ | +9 | 0 replies | |
| 3/3 | btrfs-progs: misc-tests: add an image for btrfstune bgt conversiontests/ tests/ tests/ | +23 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] btrfs-progs: tune: bgt resume related fix and enhancement
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/[email protected]/
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