Description of problem: The output of btrfs qgroup show changed, resulting in a failure in libguestfs. The output is now: 0/5 4.00KiB 4.00KiB which doesn't match: if (sscanf (line, "%" SCNu64 "/%" SCNu64 " %" SCNu64 " %" SCNu64, &dummy1, &dummy2, &this->btrfsqgroup_rfer, &this->btrfsqgroup_excl) != 4) { reply_with_error ("cannot parse output of qgroup show command: %s", line); goto error; } Version-Release number of selected component (if applicable): btrfs-progs-3.18.2-1.fc22.x86_64 libguestfs 1.29.24 How reproducible: 100% Steps to Reproduce: 1. Use btrfs-qgroup-show API, or run the tests.
*** Bug 1188534 has been marked as a duplicate of this bug. ***
Created attachment 987903 [details] fix parsing of output of 'btrfs qgroup show'
Created attachment 987904 [details] patch to fix parsing of output of 'btrfs qgroup show' Sorry, the previous one does not have commit message edited, please use this one.
This breaks the old btrfs command: libguestfs: error: btrfs_qgroup_show: /: btrfs qgroup show: unrecognized option '--raw' usage: btrfs qgroup show -pcreFf [--sort=qgroupid,rfer,excl,max_rfer,max_excl] <path> Show subvolume quota groups. -p print parent qgroup id -c print child qgroup id -r print max referenced size of qgroup -e print max exclusive size of qgroup -F list all qgroups which impact the given path(include ancestral qgroups) -f list all qgroups which impact the given path(exclude ancestral qgroups) --sort=qgroupid,rfer,excl,max_rfer,max_excl list qgroups in order of qgroupid,rfer,max_rfer or max_excl you can use '+' or '-' in front of each item. (+:ascending, -:descending, ascending default) FAIL: test_btrfs_qgroup_show_0 ----- I think you will need to check if the --raw flag is supported.
This has been fixed with https://github.com/libguestfs/libguestfs/commit/039ba9cf19b69f9c16efc831d4a4180cc04172a4 which is in libguestfs >= 1.29.31.