diff options
author | Qu Wenruo <wqu@suse.com> | 2018-07-26 14:39:00 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-08-06 15:06:30 +0200 |
commit | 1d5b2ad9212de6eae502985cc4f5e58a8cacf50c (patch) | |
tree | c8bdc4bf73f8c65644db83a3570ce5a5682804be /tests | |
parent | 4dca0ccf3d4a92f40f3a47647e1b18673be600cf (diff) |
btrfs-progs: qgroup-verify: Don't treat qgroup difference as error if the fs hasn't initialized a rescan
During fstests/btrfs/166, it's possible to hit a certain case where
qgroup is just enabled but rescan hasn't kicked in.
Since at qgroup enable time, we set the flag INCONSISTENT, and let later
rescan clear that flag. If power loss occurs before the rescan starts,
it's possible we get a qgroup status item with ON|INCONSISTENT but
without the RESCAN flag.
And in that case, it will definitely cause difference in qgroup
accounting as all numbers in the qgroup tree are 0.
Fix this false alert by also checking rescan progress from
btrfs_status_item. And if we find rescan progress is still 0,
INCONSISTENT flag set and no RESCAN flag set, we won't treat it as an
error.
Reported-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions