On 08/06/2019 00:55, Graham R. Cobb wrote: > When a scrub completes or is cancelled, statistics are updated for reporting > in a later btrfs scrub status command. Most statistics (such as bytes scrubbed) > are additive so scrub adds the statistics from the current run to the > saved statistics. > > However, the last_physical statistic is not additive. The value from the > current run should replace the saved value. The current code incorrectly > adds the last_physical from the current run to the saved value. > > This bug not only affects user status reporting but also has the effect that > subsequent resumes start from the wrong place and large amounts of the > filesystem are not scrubbed. > > This patch changes the saved last_physical to track the last reported value > from the kernel. > > Signed-off-by: Graham R. Cobb <g.btrfs@xxxxxxxxxxx> No comments received on this RFC PATCH. I will resubmit it shortly as a non-RFC PATCH, with a slightly improved summary and changelog. Graham
