btrfs: snapshot creation with qgroup inherit would mark qgroup inconsistent
authorQu Wenruo <wqu@suse.com>
Wed, 15 Apr 2020 06:49:16 +0000 (14:49 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 19 Apr 2020 16:44:02 +0000 (00:44 +0800)
commitb04fe27eda770a7c56c77dc0102553ffddddfdb9
tree698d1463c8e6fb04cc70571b5be6119da9b0f8e7
parent92a6a6cff81e05002d154bc47873444a1d9de2a2
btrfs: snapshot creation with qgroup inherit would mark qgroup inconsistent

Test that a new snapshot created with qgroup inherit passed should
mark qgroup numbers inconsistent.

Such inconsistent flag is required to show that we need a qgroup
rescan to make qgroup numbers correct again.

This is unavoidable since snapshot creation with qgroup inherit acts
as snapshot creation + qgroup relationship assign.

See btrfs(5) for why such operation needs qgroup rescan.

This test failed on current kernel, the fix is submitted to the btrfs
mail list titled:

  "btrfs: qgroup: Mark qgroup inconsistent if we're inherting snapshot to a new qgroup"

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