Skip to content

Commit 6f7de19

Browse files
adam900710kdave
authored andcommitted
btrfs: quota: Set rescan progress to (u64)-1 if we hit last leaf
Commit ff3d27a ("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 <[email protected]> Fixes: ff3d27a ("btrfs: qgroup: Finish rescan when hit the last leaf of extent tree") Signed-off-by: Qu Wenruo <[email protected]> Reviewed-by: Misono Tomohiro <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent c5b4a50 commit 6f7de19

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/btrfs/qgroup.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2680,8 +2680,10 @@ qgroup_rescan_leaf(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
26802680
free_extent_buffer(scratch_leaf);
26812681
}
26822682

2683-
if (done && !ret)
2683+
if (done && !ret) {
26842684
ret = 1;
2685+
fs_info->qgroup_rescan_progress.objectid = (u64)-1;
2686+
}
26852687
return ret;
26862688
}
26872689

0 commit comments

Comments
 (0)