kdave / btrfs-progs

Development of userspace BTRFS tools
GNU General Public License v2.0
527 stars 239 forks source link

Zoned bgt #767

Closed adam900710 closed 2 months ago

adam900710 commented 3 months ago

There is a bug report that, the following tool would fail on zone devices:

The mkfs failure is caused by zoned incompatible pwrite() calls for block group tree metadata.

The btrfstune failure is caused by the incorrectly opened fd.

Before fixing both bugs, do two small cleanups, one caught by clangd LSP server, the other caught by my later check on the test case output (a missing newline).

Then fixes for each bug, and new test cases for each bug.

oxalica commented 3 months ago

Thanks for the fix. I built btrfs-progs with this patch applied, and it (btrfstune) successfully converted my filesystem on network-based block device to be with bgt enabled. It mounts without any issues and the mounting time reduced from ~50s to ~5s, probably because of the high latency of the backing device. The new mkfs.btrfs also works now on my emulated block device.

kdave commented 2 months ago

Thanks for the fix and testing. It's been in devel for some time, now closing the issue.