]> granicus.if.org Git - strace/commitdiff
tests/btrfs.c: support volumes with mixed data/metadata in BTRFS_IOC_BALANCE_V2
authorEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 19 Mar 2018 02:13:56 +0000 (03:13 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 20 Apr 2018 12:39:05 +0000 (12:39 +0000)
For these volumes, pend/vend should be the same for data and meta.

* tests/btrfs.c (btrfs_test_balance_ioctls): Set args.meta.pend and
args.meta.vend to the same values as args.data.pend and args.data.vend,
respectively.

tests/btrfs.c

index 71344c1e2509ec10a650993bcc1062eea5f661b3..cad2e7342eb51a33fd20e2d19b52b6e670cc6afa 100644 (file)
@@ -603,6 +603,14 @@ btrfs_test_balance_ioctls(void)
                args.meta.profiles = 0;
                args.sys.flags = 0;
                args.sys.profiles = 0;
+
+               /*
+                * We should keep args the same for data in meta in case
+                * volume-under-tests uses mixed groups data and metadata.
+                */
+               args.meta.pend = -1ULL;
+               args.meta.vend = -1ULL;
+
                printf("ioctl(%d, BTRFS_IOC_BALANCE_V2, {flags=",
                        btrfs_test_dir_fd);