Fix and disable blocks statistics during scrub
commit827322991f25785ff032ad3cef84e12b1c609759
authorAlexander Motin <mav@FreeBSD.org>
Tue, 28 Jun 2022 18:23:31 +0000 (28 14:23 -0400)
committerGitHub <noreply@github.com>
Tue, 28 Jun 2022 18:23:31 +0000 (28 11:23 -0700)
tree6186f60e715ec04bca7856924c2490d026761f36
parent43569ee374208e827409ec1ce4cf169d7a9a3095
Fix and disable blocks statistics during scrub

Block statistics calculation during scrub I/O issue in case of sorted
scrub accounted ditto blocks several times.  Embedded blocks on other
side were not accounted at all.  This change moves the accounting from
issue to scan stage, that fixes both problems and also allows to avoid
pool-wide locking and the lock contention it created.

Since this statistics is quite specific and is not even exposed now
anywhere, disable its calculation by default to not waste CPU time.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes #13579
include/sys/dsl_pool.h
module/zfs/dsl_pool.c
module/zfs/dsl_scan.c