btrfs: qgroup: Fix qgroup incorrectness caused by log replay
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Mon, 15 Aug 2016 02:36:52 +0000 (10:36 +0800)
committerChris Mason <clm@fb.com>
Thu, 25 Aug 2016 10:58:23 +0000 (03:58 -0700)
commitdf2c95f33e0a28b22509e4ee85365eedf32a1056
tree4dd22720b50f46317443930c8afe2d93f4110534
parent62b99540a1d91e46422f0e04de50fc723812c421
btrfs: qgroup: Fix qgroup incorrectness caused by log replay

When doing log replay at mount time(after power loss), qgroup will leak
numbers of replayed data extents.

The cause is almost the same of balance.
So fix it by manually informing qgroup for owner changed extents.

The bug can be detected by btrfs/119 test case.

Cc: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-and-Tested-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/tree-log.c