mbox series

[0/2] btrfs-progs: fix csum metadata reservation and add a basic test case for itb

Message ID cover.1718693318.git.wqu@suse.com (mailing list archive)
Headers show
Series btrfs-progs: fix csum metadata reservation and add a basic test case for itb | expand

Message

Qu Wenruo June 18, 2024, 6:50 a.m. UTC
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.

Qu Wenruo (2):
  btrfs-progs: change-csum: fix the wrong metadata space reservation
  btrfs-progs: misc-tests: add a test case for basic csum conversion

 .../064-csum-conversion-basic/test.sh         | 32 +++++++++++++++++++
 tune/change-csum.c                            | 22 +++++++++----
 2 files changed, 47 insertions(+), 7 deletions(-)
 create mode 100755 tests/misc-tests/064-csum-conversion-basic/test.sh

--
2.45.2

Comments

David Sterba June 19, 2024, 1:53 a.m. UTC | #1
On Tue, Jun 18, 2024 at 04:20:47PM +0930, Qu Wenruo wrote:
> 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.
> 
> Qu Wenruo (2):
>   btrfs-progs: change-csum: fix the wrong metadata space reservation
>   btrfs-progs: misc-tests: add a test case for basic csum conversion

Added to devel, thanks.