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"

[Eryu: removed useless _filter_xfs_io]

Reported-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Qu Wenruo
2018-08-13 13:22:05 +08:00
committed by Eryu Guan
parent c2c3421465
commit 55566e7f7c
4 changed files with 97 additions and 0 deletions
+1
View File
@@ -173,3 +173,4 @@
168 auto quick send
169 auto quick send
170 auto quick snapshot
171 auto quick qgroup