Author: mav
Date: Thu Aug  2 23:23:10 2018
New Revision: 337196
URL: https://svnweb.freebsd.org/changeset/base/337196

Log:
  MFV r337195: 9454 ::zfs_blkstats should count embedded blocks
  
  illumos/illumos-gate@dec267e7ea9828898b1c64462daa6636c4ef5e29
  
  Reviewed by: Dan Kimmel <dan.kim...@delphix.com>
  Reviewed by: George Wilson <george.wil...@delphix.com>
  Approved by: Robert Mustacchi <r...@joyent.com>
  Author:     Matthew Ahrens <mahr...@delphix.com>

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c      Thu Aug 
 2 23:17:10 2018        (r337195)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c      Thu Aug 
 2 23:23:10 2018        (r337196)
@@ -3552,14 +3552,14 @@ dsl_scan_scrub_cb(dsl_pool_t *dp,
        int zio_flags = ZIO_FLAG_SCAN_THREAD | ZIO_FLAG_RAW | ZIO_FLAG_CANFAIL;
        int d;
        
+       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);
 
-       if (BP_IS_EMBEDDED(bp)) {
-               count_block(scn, dp->dp_blkstats, 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) {
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to