btrfs: Add test for corrupted childless qgroup numbers
This bug is exposed by populating a high level qgroup, and then make
it childless with old qgroup numbers, and finally do rescan.
Normally rescan should zero out all qgroups' accounting number, but
due to a kernel bug which won't mark childless qgroups dirty, their
on-disk data is never updated, thus old numbers remain and cause
qgroup corruption.
Fixed by the following kernel patch:
"btrfs: qgroup: Dirty all qgroups before rescan"