Re: [PATCH] btrfs: qgroup: Finish rescan when hit the last leaf of extent tree

2018-05-11 Thread Jeff Mahoney
On 5/4/18 1:56 AM, Qu Wenruo wrote: > Under the following case, qgroup rescan can double account cowed tree > blocks: > > In this case, extent tree only has one tree block. > > - > | transid=5 last committed=4 > | btrfs_qgroup_rescan_worker() > | |- btrfs_start_transaction() > | | transid = 5 >

Re: [PATCH] btrfs: qgroup: Finish rescan when hit the last leaf of extent tree

2018-05-09 Thread Qu Wenruo
On 2018年05月09日 21:00, David Sterba wrote: > On Fri, May 04, 2018 at 01:56:59PM +0800, Qu Wenruo wrote: >> Under the following case, qgroup rescan can double account cowed tree >> blocks: >> >> In this case, extent tree only has one tree block. >> >> - >> | transid=5 last committed=4 >> |

Re: [PATCH] btrfs: qgroup: Finish rescan when hit the last leaf of extent tree

2018-05-09 Thread David Sterba
On Fri, May 04, 2018 at 01:56:59PM +0800, Qu Wenruo wrote: > Under the following case, qgroup rescan can double account cowed tree > blocks: > > In this case, extent tree only has one tree block. > > - > | transid=5 last committed=4 > | btrfs_qgroup_rescan_worker() > | |-

[PATCH] btrfs: qgroup: Finish rescan when hit the last leaf of extent tree

2018-05-03 Thread Qu Wenruo
Under the following case, qgroup rescan can double account cowed tree blocks: In this case, extent tree only has one tree block. - | transid=5 last committed=4 | btrfs_qgroup_rescan_worker() | |- btrfs_start_transaction() | | transid = 5 | |- qgroup_rescan_leaf() ||-