Skip to content

btrfstune --convert-from-block-group-tree fail for zoned device #1071

@xuefer

Description

@xuefer

6.18.1-gentoo, btrfs-progs v6.17.1
+EXPERIMENTAL -INJECT -STATIC +LZO +ZSTD +UDEV +FSVERITY +ZONED CRYPTO=builtin

/dev/sdd is newly created by mkfs, fill with data

# btrfstune --convert-from-block-group-tree /dev/sdd
Unable to find block group for 0
Unable to find block group for 0
Unable to find block group for 0
ERROR: failed to commit transaction: No space left on device
ERROR: failed to convert the filesystem from block group tree feature
ERROR: btrfstune failed
WARNING: reserved space leaked, flag=0x4 bytes_reserved=16384
extent buffer leak: start 3126199058432 len 16384

this happen on --convert-to-block-group-tree too. an empty hdd however wron't trigger this issue

after the failure, try to convert back

# btrfstune --convert-to-block-group-tree /dev/sdd
ERROR: the filesystem already has block group tree feature
ERROR: btrfstune failed

# btrfs inspect-internal dump-super -fa /dev/sdd
superblock: bytenr=65536, device=/dev/sdd
---------------------------------------------------------
csum_type               0 (crc32c)
csum_size               4
csum                    0xdc5d907c [match]
bytenr                  65536
flags                   0x4000000001
                        ( WRITTEN |
                          CHANGING_BG_TREE )
magic                   _BHRfS_M [match]
sdd is left in broken mode
# mount /dev/sdd /mnt/d-backup
mount: /mnt/d-backup: wrong fs type, bad option, bad superblock on /dev/sdd, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions