]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: quota: Set rescan progress to (u64)-1 if we hit last leaf
authorQu Wenruo <wqu@suse.com>
Wed, 27 Jun 2018 10:19:55 +0000 (18:19 +0800)
committerDavid Sterba <dsterba@suse.com>
Thu, 28 Jun 2018 09:30:48 +0000 (11:30 +0200)
commit3a931ee547eef1d739dfbe9acb87f147b7118c7f
treece6036899463f3ffb5d45a9f925e5bfcc71cc8c1
parent93846e3296d05dc2ff5a9092a7c6dcc3d65918a3
btrfs: quota: Set rescan progress to (u64)-1 if we hit last leaf

Commit 7f2f3a314fee ("btrfs: qgroup: Finish rescan when hit the last leaf
of extent tree") added a new exit for rescan finish.

However after finishing quota rescan, we set
fs_info->qgroup_rescan_progress to (u64)-1 before we exit through the
original exit path.
While we missed that assignment of (u64)-1 in the new exit path.

The end result is, the quota status item doesn't have the same value.
(-1 vs the last bytenr + 1)
Although it doesn't affect quota accounting, it's still better to keep
the original behavior.

Reported-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Fixes: 7f2f3a314fee ("btrfs: qgroup: Finish rescan when hit the last leaf of extent tree")
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/qgroup.c