summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Sommerfeld <sommerfeld@alum.mit.edu>2019-05-20 18:09:44 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2019-05-21 13:14:02 +0000
commitee2f9ca4ea24f72b05598c92aad7f42fb77b1345 (patch)
tree464c83f24c34beee4466471020c115028c6d1f2e
parent31779036e45a28bb1be446d3d65113584ccb7989 (diff)
downloadillumos-joyent-ee2f9ca4ea24f72b05598c92aad7f42fb77b1345.tar.gz
11051 zfs miscounts BP_IS_EMBEDDED blocks during scan.
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Gergo Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/common/fs/zfs/dsl_scan.c7
1 files changed, 7 insertions, 0 deletions
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
@@ -3432,6 +3432,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
* of these will include all DVAs for repair purposes, but the