]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
dsl_scan_scrub_cb: don't double-account non-embedded blocks
authorSteven Noonan <steven@uplinklabs.net>
Tue, 24 Jul 2018 16:33:56 +0000 (09:33 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 24 Jul 2018 16:33:56 +0000 (09:33 -0700)
commit863522b1f9235398f6c28ee3ab96f7d1c9088450
treed47405222e26269ae0d6974e1cca474b0c3d10d8
parentfda0f162171585891d7865bc7bd5e49255b4564b
dsl_scan_scrub_cb: don't double-account non-embedded blocks

We were doing count_block() twice inside this function, once
unconditionally at the beginning (intended to catch the embedded block
case) and once near the end after processing the block.

The double-accounting caused the "zpool scrub" progress statistics in
"zpool status" to climb from 0% to 200% instead of 0% to 100%, and
showed double the I/O rate it was actually seeing.

This was apparently a regression introduced in commit 00c405b4b5e8,
which was an incorrect port of this OpenZFS commit:

    https://github.com/openzfs/openzfs/commit/d8a447a7

Reviewed by: Thomas Caputi <tcaputi@datto.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Closes #7720
Closes #7738
module/zfs/dsl_scan.c