From ee2f9ca4ea24f72b05598c92aad7f42fb77b1345 Mon Sep 17 00:00:00 2001 From: Bill Sommerfeld Date: Mon, 20 May 2019 18:09:44 +0000 Subject: 11051 zfs miscounts BP_IS_EMBEDDED blocks during scan. Reviewed by: Jerry Jelinek Reviewed by: Toomas Soome Reviewed by: Gergo Doma Approved by: Dan McDonald --- usr/src/uts/common/fs/zfs/dsl_scan.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/usr/src/uts/common/fs/zfs/dsl_scan.c b/usr/src/uts/common/fs/zfs/dsl_scan.c index ca82195178..78c8c2a581 100644 --- a/usr/src/uts/common/fs/zfs/dsl_scan.c +++ b/usr/src/uts/common/fs/zfs/dsl_scan.c @@ -3431,6 +3431,13 @@ count_block(dsl_scan_t *scn, zfs_all_blkstats_t *zab, const blkptr_t *bp) { int i; + /* + * Don't count embedded bp's, since we already did the work of + * scanning these when we scanned the containing block. + */ + if (BP_IS_EMBEDDED(bp)) + return; + /* * Update the spa's stats on how many bytes we have issued. * Sequential scrubs create a zio for each DVA of the bp. Each -- cgit v1.2.3