From e92e58b7ae6c347826de384a81424e0c96767830 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Thu, 2 Aug 2018 23:17:10 +0000 Subject: [PATCH] 9454 ::zfs_blkstats should count embedded blocks illumos/illumos-gate@dec267e7ea9828898b1c64462daa6636c4ef5e29 Reviewed by: Dan Kimmel Reviewed by: George Wilson Approved by: Robert Mustacchi Author: Matthew Ahrens --- uts/common/fs/zfs/dsl_scan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/uts/common/fs/zfs/dsl_scan.c b/uts/common/fs/zfs/dsl_scan.c index cf93849a627c..6fd97d9bfcd6 100644 --- a/uts/common/fs/zfs/dsl_scan.c +++ b/uts/common/fs/zfs/dsl_scan.c @@ -1951,14 +1951,14 @@ dsl_scan_scrub_cb(dsl_pool_t *dp, int zio_flags = ZIO_FLAG_SCAN_THREAD | ZIO_FLAG_RAW | ZIO_FLAG_CANFAIL; int scan_delay = 0; + count_block(dp->dp_blkstats, bp); + if (phys_birth <= scn->scn_phys.scn_min_txg || phys_birth >= scn->scn_phys.scn_max_txg) return (0); - count_block(dp->dp_blkstats, bp); - - if (BP_IS_EMBEDDED(bp)) - return (0); + /* Embedded BP's have phys_birth==0, so we reject them above. */ + ASSERT(!BP_IS_EMBEDDED(bp)); ASSERT(DSL_SCAN_IS_SCRUB_RESILVER(scn)); if (scn->scn_phys.scn_func == POOL_SCAN_SCRUB) {