HomeFreeBSD

Fix scrub resume from newly created hole

Description

Fix scrub resume from newly created hole

It may happen that scan bookmark points to a block that was turned
into a part of a big hole. In such case dsl_scan_visitbp() may skip
it and dsl_scan_check_resume() will not be called for it. As result
new scan suspend won't be possible until the end of the object, that
may take hours if the object is a multi-terabyte ZVOL on a slow HDD
pool, stretching TXG to all that time, creating all sorts of problems.

This patch changes the resume condition to any greater or equal block,
so even if we miss the bookmarked block, the next one we find will
delete the bookmark, allowing new suspend.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes #13643

Details

Provenance
mavAuthored on Jul 21 2022, 12:02 AM
GitHub <noreply@github.com>Committed on Jul 21 2022, 12:02 AM
Parents
rG97fd1ea42a59: Fix memory allocation for the checksum benchmark
Branches
Unknown
Tags
Unknown