[PATCH v2 0/2] Add btrfs fs_info checksum, generation and metadata

Sahil Kang sahil.kang at asilaycomputing.com
Wed Dec 29 09:48:45 UTC 2021


I removed the redundant #unconditional and added tests for fs_info,
after fixing preexisting tests which were already failing. The
preexisting and new tests are optional and are only run when a valid
btrfs fd is provided; tests/btrfs-w.test shows how that works with
tests/btrfs.c.

I tested with something like this:

# setup
dd if=/dev/zero of=./btrfs.img bs=4k count=100000
mkfs.btrfs ./btrfs.img # apt-get install btrfs-progs
sudo losetup /dev/loop0 ./btrfs.img
sudo mount -t btrfs ./btrfs.img /mnt

# test
sudo BTRFS_MOUNTPOINT=/mnt make check \
  TESTS='btrfs-X btrfs-v btrfs-vX btrfs-vw btrfs-vwX btrfs-w btrfs-wX'

# cleanup
sudo umount /mnt
sudo losetup -d /dev/loop0
rm ./btrfs.img

Sahil Kang (2):
  tests: fix btrfs tests
  Add btrfs fs_info checksum, generation and metadata

 src/btrfs.c                     |  20 ++++++
 src/xlat/btrfs_csum_types.in    |   6 ++
 src/xlat/btrfs_fs_info_flags.in |   4 ++
 tests/btrfs.c                   | 122 ++++++++++++++++++++++++++++++--
 4 files changed, 145 insertions(+), 7 deletions(-)
 create mode 100644 src/xlat/btrfs_csum_types.in
 create mode 100644 src/xlat/btrfs_fs_info_flags.in

-- 
Sahil



More information about the Strace-devel mailing list