diff --git a/cmds/qgroup.c b/cmds/qgroup.c index 654fca4b..4c66ee0a 100644 --- a/cmds/qgroup.c +++ b/cmds/qgroup.c @@ -1439,10 +1439,10 @@ static const struct rowspec qgroup_show_rowspec[] = { { .key = "qgroupid", .fmt = "qgroupid", .out_json = "qgroupid" }, { .key = "referenced", .fmt = "%llu", .out_json = "referenced" }, { .key = "exclusive", .fmt = "%llu", .out_json = "exclusive" }, - { .key = "max_referenced", .fmt = "size", .out_json = "max_referenced" }, + { .key = "max_referenced", .fmt = "%llu", .out_json = "max_referenced" }, /* Special value if limits not set. */ { .key = "max_referenced-none", .fmt = "%s", .out_json = "max_referenced" }, - { .key = "max_exclusive", .fmt = "size", .out_json = "max_exclusive" }, + { .key = "max_exclusive", .fmt = "%llu", .out_json = "max_exclusive" }, /* Special value if limits not set. */ { .key = "max_exclusive-none", .fmt = "%s", .out_json = "max_exclusive" }, { .key = "path", .fmt = "str", .out_json = "path" }, diff --git a/tests/cli-tests/005-qgroup-show/test.sh b/tests/cli-tests/005-qgroup-show/test.sh index 455f2d3c..97e51273 100755 --- a/tests/cli-tests/005-qgroup-show/test.sh +++ b/tests/cli-tests/005-qgroup-show/test.sh @@ -17,6 +17,7 @@ run_mayfail "$TOP/btrfs" --format json qgroup show "$TEST_MNT" run_mayfail $SUDO_HELPER "$TOP/btrfs" qgroup show "$TEST_MNT" run_mayfail $SUDO_HELPER "$TOP/btrfs" --format json qgroup show "$TEST_MNT" run_check $SUDO_HELPER "$TOP/btrfs" quota enable "$TEST_MNT" +run_check $SUDO_HELPER "$TOP/btrfs" qgroup limit 128m "$TEST_MNT" run_mayfail "$TOP/btrfs" qgroup show "$TEST_MNT" run_mayfail "$TOP/btrfs" --format json qgroup show "$TEST_MNT" run_check $SUDO_HELPER "$TOP/btrfs" qgroup show "$TEST_MNT"