btrfs: Verify falloc on multiple holes won't leak qgroup reserved data space
authorQu Wenruo <wqu@suse.com>
Sun, 15 Sep 2019 07:22:30 +0000 (15:22 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 15 Sep 2019 13:13:55 +0000 (21:13 +0800)
commit82eda8820ddd68dab0bc35199a53a08f58b1d26c
tree505a33cca16dfc83d2a78061caa61ec4eefc3072
parent4bcf365a3f949d5a513555e02c1a0f0e08eeaa57
btrfs: Verify falloc on multiple holes won't leak qgroup reserved data space

Add a test case where falloc is called on multiple holes with qgroup
enabled.

This can cause qgroup reserved data space leak and false EDQUOT
error even we're not reaching the limit.

The fix is titled:
"btrfs: qgroup: Fix the wrong target io_tree when freeing
 reserved data space"

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/193 [new file with mode: 0755]
tests/btrfs/193.out [new file with mode: 0644]
tests/btrfs/group