kdave / btrfs-progs

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

btrfs-progs: fix csum metadata reservation and add a basic test case for it #819

Closed adam900710 closed 1 week ago

adam900710 commented 1 week ago

The current csum conversion is using an incorrect parameter for btrfs_start_transaction(), which is 16K times larger than the expected metadata space, thus it always fail with -ENOSPC.

Fix that first, then add a basic test case using the same populate_fs() from convert test cases, and iterate through all the support csum algorithms.

adam900710 commented 1 week ago

Wrong code base, would re-sent the PR.