diff options
author | Qu Wenruo <wqu@suse.com> | 2018-06-27 06:19:55 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-06-28 05:30:48 -0400 |
commit | 6f7de19ed3d4d3526ca5eca428009f97cf969c2f (patch) | |
tree | ce6036899463f3ffb5d45a9f925e5bfcc71cc8c1 | |
parent | c5b4a50b74018b3677098151ec5f4fce07d5e6a0 (diff) |
btrfs: quota: Set rescan progress to (u64)-1 if we hit last leaf
Commit ff3d27a048d9 ("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: ff3d27a048d9 ("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>
-rw-r--r-- | fs/btrfs/qgroup.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 1874a6d2e6f5..99f2b9ce0f15 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c | |||
@@ -2680,8 +2680,10 @@ out: | |||
2680 | free_extent_buffer(scratch_leaf); | 2680 | free_extent_buffer(scratch_leaf); |
2681 | } | 2681 | } |
2682 | 2682 | ||
2683 | if (done && !ret) | 2683 | if (done && !ret) { |
2684 | ret = 1; | 2684 | ret = 1; |
2685 | fs_info->qgroup_rescan_progress.objectid = (u64)-1; | ||
2686 | } | ||
2685 | return ret; | 2687 | return ret; |
2686 | } | 2688 | } |
2687 | 2689 | ||