btrfs-progs: Print warning message if qgroup data is inconsistent
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Fri, 27 Feb 2015 08:26:38 +0000 (16:26 +0800)
committerDavid Sterba <dsterba@suse.cz>
Mon, 23 Mar 2015 23:29:59 +0000 (00:29 +0100)
commit22057607b4fb168db1a8cc2670cf8dbf31dd0847
treecf5252294feed1c1d5be4017380fd2d2303515cd
parent0f67b5aa010e1cdb47078eda7f31ab55a16c251b
btrfs-progs: Print warning message if qgroup data is inconsistent

Before this patch, qgroup show won't check btrfs qgroup status, so even
the INCONSISTENT flags is set, user is not aware of it.

This patch will include BTRFS_QGROUP_STATUS_ITEM in the search range and
check the flag, if there is any flag meaning the inconsistence of qgroup
data, info user.

NOTE: There is several kernel bugs from INCONSISTENT flags is always set
to RUNNING flags is not cleared until umount.
So this warning will always be here if using a newer kernel fixing these
bugs.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
qgroup.c