svn commit: r329884 - in user/jeff/numa: . cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opens...

Jeff Roberson jeff at FreeBSD.org
Fri Feb 23 23:16:17 UTC 2018


Author: jeff
Date: Fri Feb 23 23:16:15 2018
New Revision: 329884
URL: https://svnweb.freebsd.org/changeset/base/329884

Log:
  Merge from head.

Added:
  user/jeff/numa/lib/libifconfig/libifconfig_carp.c
     - copied unchanged from r329883, head/lib/libifconfig/libifconfig_carp.c
  user/jeff/numa/lib/libifconfig/libifconfig_inet.c
     - copied unchanged from r329883, head/lib/libifconfig/libifconfig_inet.c
  user/jeff/numa/lib/libifconfig/libifconfig_inet6.c
     - copied unchanged from r329883, head/lib/libifconfig/libifconfig_inet6.c
  user/jeff/numa/lib/libifconfig/libifconfig_lagg.c
     - copied unchanged from r329883, head/lib/libifconfig/libifconfig_lagg.c
  user/jeff/numa/lib/libifconfig/libifconfig_media.c
     - copied unchanged from r329883, head/lib/libifconfig/libifconfig_media.c
  user/jeff/numa/sbin/Makefile.powerpc64
     - copied unchanged from r329883, head/sbin/Makefile.powerpc64
  user/jeff/numa/share/examples/libifconfig/ifchangevlan.c
     - copied unchanged from r329883, head/share/examples/libifconfig/ifchangevlan.c
  user/jeff/numa/share/examples/libifconfig/ifcreatevlan.c
     - copied unchanged from r329883, head/share/examples/libifconfig/ifcreatevlan.c
  user/jeff/numa/share/examples/libifconfig/status.c
     - copied unchanged from r329883, head/share/examples/libifconfig/status.c
  user/jeff/numa/share/man/man4/chvgpio.4
     - copied unchanged from r329883, head/share/man/man4/chvgpio.4
  user/jeff/numa/share/man/man4/jedec_dimm.4
     - copied unchanged from r329883, head/share/man/man4/jedec_dimm.4
  user/jeff/numa/stand/common/zfs_cmd.c
     - copied unchanged from r329883, head/stand/common/zfs_cmd.c
  user/jeff/numa/stand/liblua/lerrno.c
     - copied unchanged from r329883, head/stand/liblua/lerrno.c
  user/jeff/numa/stand/liblua/lerrno.h
     - copied unchanged from r329883, head/stand/liblua/lerrno.h
  user/jeff/numa/stand/lua/cli.lua
     - copied unchanged from r329883, head/stand/lua/cli.lua
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_indirect_births.h
     - copied unchanged from r329883, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_indirect_births.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_indirect_mapping.h
     - copied unchanged from r329883, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_indirect_mapping.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_removal.h
     - copied unchanged from r329883, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_removal.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h
     - copied unchanged from r329883, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c
     - copied unchanged from r329883, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_births.c
     - copied unchanged from r329883, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_births.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_mapping.c
     - copied unchanged from r329883, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_mapping.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c
     - copied unchanged from r329883, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c
     - copied unchanged from r329883, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c
  user/jeff/numa/sys/dev/gpio/chvgpio.c
     - copied unchanged from r329883, head/sys/dev/gpio/chvgpio.c
  user/jeff/numa/sys/dev/gpio/chvgpio_reg.h
     - copied unchanged from r329883, head/sys/dev/gpio/chvgpio_reg.h
  user/jeff/numa/sys/dev/jedec_dimm/
     - copied from r329883, head/sys/dev/jedec_dimm/
  user/jeff/numa/sys/modules/chvgpio/
     - copied from r329883, head/sys/modules/chvgpio/
  user/jeff/numa/sys/modules/i2c/jedec_dimm/
     - copied from r329883, head/sys/modules/i2c/jedec_dimm/
  user/jeff/numa/sys/powerpc/powerpc/cpu_subr64.S
     - copied unchanged from r329883, head/sys/powerpc/powerpc/cpu_subr64.S
  user/jeff/numa/tests/sys/cddl/
     - copied from r329883, head/tests/sys/cddl/
  user/jeff/numa/tests/sys/net/
     - copied from r329883, head/tests/sys/net/
  user/jeff/numa/tools/boot/lua-lint.sh
     - copied unchanged from r329883, head/tools/boot/lua-lint.sh
Modified:
  user/jeff/numa/Makefile.inc1
  user/jeff/numa/cddl/contrib/opensolaris/cmd/zdb/zdb.c
  user/jeff/numa/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
  user/jeff/numa/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
  user/jeff/numa/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h
  user/jeff/numa/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c
  user/jeff/numa/cddl/contrib/opensolaris/cmd/ztest/ztest.c
  user/jeff/numa/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
  user/jeff/numa/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
  user/jeff/numa/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h
  user/jeff/numa/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
  user/jeff/numa/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
  user/jeff/numa/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c
  user/jeff/numa/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
  user/jeff/numa/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
  user/jeff/numa/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
  user/jeff/numa/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
  user/jeff/numa/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h
  user/jeff/numa/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
  user/jeff/numa/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
  user/jeff/numa/cddl/usr.sbin/zdb/Makefile
  user/jeff/numa/cddl/usr.sbin/zfsd/case_file.cc
  user/jeff/numa/contrib/compiler-rt/lib/builtins/int_types.h
  user/jeff/numa/contrib/lua/src/llimits.h
  user/jeff/numa/contrib/lua/src/lstrlib.c
  user/jeff/numa/etc/mtree/BSD.tests.dist
  user/jeff/numa/etc/rc.d/ipfw
  user/jeff/numa/etc/rc.firewall
  user/jeff/numa/include/time.h
  user/jeff/numa/lib/libc/gen/getpeereid.c
  user/jeff/numa/lib/libc/stdio/xprintf_int.c
  user/jeff/numa/lib/libifconfig/Makefile
  user/jeff/numa/lib/libifconfig/libifconfig.c
  user/jeff/numa/lib/libifconfig/libifconfig.h
  user/jeff/numa/lib/libifconfig/libifconfig_internal.c
  user/jeff/numa/lib/libifconfig/libifconfig_internal.h
  user/jeff/numa/lib/libvmmapi/vmmapi.c
  user/jeff/numa/lib/libvmmapi/vmmapi.h
  user/jeff/numa/libexec/getty/Makefile
  user/jeff/numa/libexec/getty/chat.c
  user/jeff/numa/libexec/getty/main.c
  user/jeff/numa/libexec/getty/subr.c
  user/jeff/numa/sbin/devmatch/devmatch.c
  user/jeff/numa/sbin/dhclient/Makefile
  user/jeff/numa/sbin/dhclient/clparse.c
  user/jeff/numa/sbin/dhclient/conflex.c
  user/jeff/numa/sbin/dhclient/dhclient.c
  user/jeff/numa/sbin/dhclient/dhcpd.h
  user/jeff/numa/sbin/dhclient/dispatch.c
  user/jeff/numa/sbin/dhclient/errwarn.c
  user/jeff/numa/sbin/dhclient/hash.c
  user/jeff/numa/sbin/dhclient/options.c
  user/jeff/numa/sbin/dhclient/privsep.c
  user/jeff/numa/sbin/dhclient/privsep.h
  user/jeff/numa/sbin/dhclient/tables.c
  user/jeff/numa/sbin/dhclient/tests/fake.c
  user/jeff/numa/sbin/dhclient/tree.h
  user/jeff/numa/sbin/fsck_ffs/inode.c
  user/jeff/numa/sbin/nvmecontrol/devlist.c
  user/jeff/numa/sbin/nvmecontrol/firmware.c
  user/jeff/numa/sbin/nvmecontrol/identify.c
  user/jeff/numa/sbin/nvmecontrol/logpage.c
  user/jeff/numa/sbin/nvmecontrol/nvmecontrol.c
  user/jeff/numa/sbin/nvmecontrol/perftest.c
  user/jeff/numa/sbin/nvmecontrol/power.c
  user/jeff/numa/sbin/nvmecontrol/wdc.c
  user/jeff/numa/sbin/route/route.8
  user/jeff/numa/share/examples/libifconfig/Makefile
  user/jeff/numa/share/examples/libifconfig/ifcreate.c
  user/jeff/numa/share/examples/libifconfig/ifdestroy.c
  user/jeff/numa/share/examples/libifconfig/setdescription.c
  user/jeff/numa/share/examples/libifconfig/setmtu.c
  user/jeff/numa/share/man/man4/Makefile
  user/jeff/numa/share/man/man9/style.lua.9
  user/jeff/numa/share/mk/atf.test.mk
  user/jeff/numa/share/mk/bsd.own.mk
  user/jeff/numa/stand/common/interp_lua.c
  user/jeff/numa/stand/common/load_elf.c
  user/jeff/numa/stand/defs.mk
  user/jeff/numa/stand/efi/libefi/efizfs.c
  user/jeff/numa/stand/efi/loader/Makefile
  user/jeff/numa/stand/efi/loader/main.c
  user/jeff/numa/stand/i386/boot2/boot2.c
  user/jeff/numa/stand/i386/loader/Makefile
  user/jeff/numa/stand/i386/loader/conf.c
  user/jeff/numa/stand/i386/loader/main.c
  user/jeff/numa/stand/liblua/Makefile
  user/jeff/numa/stand/liblua/lfs.c
  user/jeff/numa/stand/liblua/luaconf.h
  user/jeff/numa/stand/liblua/lutils.c
  user/jeff/numa/stand/libsa/cd9660.c
  user/jeff/numa/stand/libsa/nfs.c
  user/jeff/numa/stand/libsa/nullfs.c
  user/jeff/numa/stand/libsa/stand.h
  user/jeff/numa/stand/libsa/tftp.c
  user/jeff/numa/stand/libsa/ufs.c
  user/jeff/numa/stand/libsa/write.c
  user/jeff/numa/stand/loader.mk
  user/jeff/numa/stand/lua.mk
  user/jeff/numa/stand/lua/Makefile
  user/jeff/numa/stand/lua/color.lua
  user/jeff/numa/stand/lua/config.lua
  user/jeff/numa/stand/lua/core.lua
  user/jeff/numa/stand/lua/drawer.lua
  user/jeff/numa/stand/lua/loader.lua
  user/jeff/numa/stand/lua/menu.lua
  user/jeff/numa/stand/lua/password.lua
  user/jeff/numa/stand/lua/screen.lua
  user/jeff/numa/stand/sparc64/loader/Makefile
  user/jeff/numa/stand/sparc64/loader/main.c
  user/jeff/numa/stand/userboot/userboot/Makefile
  user/jeff/numa/stand/userboot/userboot/host.c
  user/jeff/numa/stand/userboot/userboot/main.c
  user/jeff/numa/stand/zfs/libzfs.h
  user/jeff/numa/stand/zfs/zfs.c
  user/jeff/numa/sys/amd64/amd64/fpu.c
  user/jeff/numa/sys/amd64/amd64/pmap.c
  user/jeff/numa/sys/amd64/include/fpu.h
  user/jeff/numa/sys/amd64/include/vmm_dev.h
  user/jeff/numa/sys/amd64/linux/linux_dummy.c
  user/jeff/numa/sys/amd64/linux/linux_sysvec.c
  user/jeff/numa/sys/amd64/linux/syscalls.master
  user/jeff/numa/sys/amd64/linux32/linux32_dummy.c
  user/jeff/numa/sys/amd64/linux32/linux32_sysvec.c
  user/jeff/numa/sys/amd64/linux32/syscalls.master
  user/jeff/numa/sys/amd64/vmm/vmm_dev.c
  user/jeff/numa/sys/arm/arm/pmap-v4.c
  user/jeff/numa/sys/arm/arm/pmap-v6.c
  user/jeff/numa/sys/arm/freescale/imx/imx6_ccmreg.h
  user/jeff/numa/sys/arm/include/_types.h
  user/jeff/numa/sys/arm/nvidia/drm2/tegra_bo.c
  user/jeff/numa/sys/arm64/arm64/pmap.c
  user/jeff/numa/sys/arm64/arm64/vfp.c
  user/jeff/numa/sys/arm64/include/_types.h
  user/jeff/numa/sys/arm64/include/vfp.h
  user/jeff/numa/sys/cam/cam_iosched.c
  user/jeff/numa/sys/cam/nvme/nvme_all.c
  user/jeff/numa/sys/cam/nvme/nvme_da.c
  user/jeff/numa/sys/cam/scsi/scsi_cd.c
  user/jeff/numa/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c
  user/jeff/numa/sys/cddl/compat/opensolaris/sys/kmem.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/Makefile.files
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lgc.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/llex.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ltable.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_reftree.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/bpobj.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_deadlist.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_deleg.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_scan.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/sa.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_priority.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_root.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/sys/cpupart.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/sys/fm/util.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h
  user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h
  user/jeff/numa/sys/compat/freebsd32/freebsd32_misc.c
  user/jeff/numa/sys/compat/freebsd32/freebsd32_util.h
  user/jeff/numa/sys/compat/freebsd32/syscalls.master
  user/jeff/numa/sys/compat/linux/linux_emul.c
  user/jeff/numa/sys/compat/linux/linux_file.c
  user/jeff/numa/sys/compat/linux/linux_ioctl.c
  user/jeff/numa/sys/compat/linux/linux_mib.c
  user/jeff/numa/sys/compat/linux/linux_misc.c
  user/jeff/numa/sys/compat/linux/linux_mmap.c
  user/jeff/numa/sys/compat/linux/linux_socket.c
  user/jeff/numa/sys/compat/linuxkpi/common/include/linux/mutex.h
  user/jeff/numa/sys/compat/linuxkpi/common/include/linux/rwsem.h
  user/jeff/numa/sys/compat/linuxkpi/common/include/linux/sched.h
  user/jeff/numa/sys/compat/linuxkpi/common/src/linux_compat.c
  user/jeff/numa/sys/compat/linuxkpi/common/src/linux_lock.c
  user/jeff/numa/sys/compat/linuxkpi/common/src/linux_page.c
  user/jeff/numa/sys/compat/linuxkpi/common/src/linux_schedule.c
  user/jeff/numa/sys/conf/NOTES
  user/jeff/numa/sys/conf/files
  user/jeff/numa/sys/conf/files.amd64
  user/jeff/numa/sys/conf/files.i386
  user/jeff/numa/sys/conf/files.powerpc
  user/jeff/numa/sys/crypto/aesni/aesni.c
  user/jeff/numa/sys/crypto/armv8/armv8_crypto.c
  user/jeff/numa/sys/crypto/via/padlock.c
  user/jeff/numa/sys/crypto/via/padlock_cipher.c
  user/jeff/numa/sys/crypto/via/padlock_hash.c
  user/jeff/numa/sys/dev/aic7xxx/aic7xxx.seq
  user/jeff/numa/sys/dev/cxgbe/adapter.h
  user/jeff/numa/sys/dev/cxgbe/common/t4_msg.h
  user/jeff/numa/sys/dev/cxgbe/common/t4_tcb.h
  user/jeff/numa/sys/dev/cxgbe/t4_netmap.c
  user/jeff/numa/sys/dev/cxgbe/tom/t4_cpl_io.c
  user/jeff/numa/sys/dev/cxgbe/tom/t4_ddp.c
  user/jeff/numa/sys/dev/cxgbe/tom/t4_tom.c
  user/jeff/numa/sys/dev/cxgbe/tom/t4_tom.h
  user/jeff/numa/sys/dev/drm2/drm_fb_helper.c
  user/jeff/numa/sys/dev/drm2/i915/i915_gem.c
  user/jeff/numa/sys/dev/drm2/i915/i915_gem_gtt.c
  user/jeff/numa/sys/dev/drm2/ttm/ttm_bo_vm.c
  user/jeff/numa/sys/dev/drm2/ttm/ttm_page_alloc.c
  user/jeff/numa/sys/dev/efidev/efirt.c   (contents, props changed)
  user/jeff/numa/sys/dev/flash/at45d.c
  user/jeff/numa/sys/dev/flash/mx25l.c
  user/jeff/numa/sys/dev/isci/scil/intel_ata.h
  user/jeff/numa/sys/dev/isci/scil/sati_write_long.c
  user/jeff/numa/sys/dev/mpr/mpr_sas.c
  user/jeff/numa/sys/dev/nvme/nvme.c
  user/jeff/numa/sys/dev/nvme/nvme.h
  user/jeff/numa/sys/dev/nvme/nvme_ctrlr.c
  user/jeff/numa/sys/dev/nvme/nvme_ctrlr_cmd.c
  user/jeff/numa/sys/dev/nvme/nvme_ns.c
  user/jeff/numa/sys/dev/nvme/nvme_ns_cmd.c
  user/jeff/numa/sys/dev/nvme/nvme_private.h
  user/jeff/numa/sys/dev/nvme/nvme_qpair.c
  user/jeff/numa/sys/dev/qlxgbe/ql_dbg.h
  user/jeff/numa/sys/dev/qlxgbe/ql_def.h
  user/jeff/numa/sys/dev/qlxgbe/ql_glbl.h
  user/jeff/numa/sys/dev/qlxgbe/ql_hw.c
  user/jeff/numa/sys/dev/qlxgbe/ql_hw.h
  user/jeff/numa/sys/dev/qlxgbe/ql_inline.h
  user/jeff/numa/sys/dev/qlxgbe/ql_ioctl.c
  user/jeff/numa/sys/dev/qlxgbe/ql_ioctl.h
  user/jeff/numa/sys/dev/qlxgbe/ql_isr.c
  user/jeff/numa/sys/dev/qlxgbe/ql_misc.c
  user/jeff/numa/sys/dev/qlxgbe/ql_os.c
  user/jeff/numa/sys/dev/qlxgbe/ql_os.h
  user/jeff/numa/sys/dev/qlxgbe/ql_ver.h
  user/jeff/numa/sys/dev/random/nehemiah.c
  user/jeff/numa/sys/dev/vt/vt_core.c
  user/jeff/numa/sys/dev/xen/blkback/blkback.c
  user/jeff/numa/sys/dev/xen/netback/netback.c
  user/jeff/numa/sys/i386/i386/npx.c
  user/jeff/numa/sys/i386/i386/pmap.c
  user/jeff/numa/sys/i386/ibcs2/syscalls.master
  user/jeff/numa/sys/i386/include/npx.h
  user/jeff/numa/sys/i386/linux/imgact_linux.c
  user/jeff/numa/sys/i386/linux/linux_dummy.c
  user/jeff/numa/sys/i386/linux/linux_machdep.c
  user/jeff/numa/sys/i386/linux/linux_ptrace.c
  user/jeff/numa/sys/i386/linux/linux_sysvec.c
  user/jeff/numa/sys/i386/linux/syscalls.master
  user/jeff/numa/sys/i386/pci/pci_pir.c
  user/jeff/numa/sys/kern/kern_exit.c
  user/jeff/numa/sys/kern/kern_fork.c
  user/jeff/numa/sys/kern/kern_mutex.c
  user/jeff/numa/sys/kern/kern_sig.c
  user/jeff/numa/sys/kern/kern_syscalls.c
  user/jeff/numa/sys/kern/sched_ule.c
  user/jeff/numa/sys/kern/sys_procdesc.c
  user/jeff/numa/sys/kern/syscalls.master
  user/jeff/numa/sys/kern/vfs_bio.c
  user/jeff/numa/sys/kern/vfs_default.c
  user/jeff/numa/sys/mips/include/_types.h
  user/jeff/numa/sys/mips/mips/pmap.c
  user/jeff/numa/sys/mips/mips/uma_machdep.c
  user/jeff/numa/sys/modules/Makefile
  user/jeff/numa/sys/modules/i2c/Makefile
  user/jeff/numa/sys/modules/imx/imx_i2c/Makefile
  user/jeff/numa/sys/modules/spi/at45d/Makefile
  user/jeff/numa/sys/modules/spi/mx25l/Makefile
  user/jeff/numa/sys/net/iflib.c
  user/jeff/numa/sys/net/iflib.h
  user/jeff/numa/sys/net/rtsock.c
  user/jeff/numa/sys/netgraph/ng_atmllc.c
  user/jeff/numa/sys/powerpc/aim/locore64.S
  user/jeff/numa/sys/powerpc/aim/mmu_oea.c
  user/jeff/numa/sys/powerpc/aim/mmu_oea64.c
  user/jeff/numa/sys/powerpc/aim/mp_cpudep.c
  user/jeff/numa/sys/powerpc/aim/trap_subr64.S
  user/jeff/numa/sys/powerpc/booke/pmap.c
  user/jeff/numa/sys/powerpc/conf/GENERIC64
  user/jeff/numa/sys/powerpc/include/_types.h
  user/jeff/numa/sys/powerpc/include/cpu.h
  user/jeff/numa/sys/powerpc/include/pcb.h
  user/jeff/numa/sys/powerpc/include/pte.h
  user/jeff/numa/sys/powerpc/include/spr.h
  user/jeff/numa/sys/powerpc/powernv/opal_dev.c
  user/jeff/numa/sys/powerpc/powernv/platform_powernv.c
  user/jeff/numa/sys/powerpc/powerpc/clock.c
  user/jeff/numa/sys/powerpc/powerpc/cpu.c
  user/jeff/numa/sys/powerpc/powerpc/trap.c
  user/jeff/numa/sys/riscv/include/_types.h
  user/jeff/numa/sys/riscv/riscv/pmap.c
  user/jeff/numa/sys/sparc64/include/_types.h
  user/jeff/numa/sys/sys/_types.h
  user/jeff/numa/sys/sys/sysent.h
  user/jeff/numa/sys/ufs/ffs/ffs_subr.c
  user/jeff/numa/sys/vm/vm_fault.c
  user/jeff/numa/sys/vm/vm_page.c
  user/jeff/numa/sys/vm/vm_pageout.c
  user/jeff/numa/sys/vm/vm_pageout.h
  user/jeff/numa/sys/vm/vm_pagequeue.h
  user/jeff/numa/sys/x86/include/_types.h
  user/jeff/numa/sys/x86/include/apicvar.h
  user/jeff/numa/sys/x86/x86/intr_machdep.c
  user/jeff/numa/tests/sys/Makefile
  user/jeff/numa/tools/boot/universe.sh
  user/jeff/numa/usr.bin/ministat/ministat.c
  user/jeff/numa/usr.bin/tail/reverse.c
  user/jeff/numa/usr.bin/tail/tests/tail_test.sh
  user/jeff/numa/usr.sbin/mountd/mountd.c
  user/jeff/numa/usr.sbin/mptutil/mpt_config.c
  user/jeff/numa/usr.sbin/mptutil/mpt_drive.c
  user/jeff/numa/usr.sbin/mptutil/mpt_evt.c
  user/jeff/numa/usr.sbin/mptutil/mpt_show.c
  user/jeff/numa/usr.sbin/mptutil/mpt_volume.c
  user/jeff/numa/usr.sbin/wlandebug/wlandebug.c
Directory Properties:
  user/jeff/numa/   (props changed)
  user/jeff/numa/cddl/   (props changed)
  user/jeff/numa/cddl/contrib/opensolaris/   (props changed)
  user/jeff/numa/cddl/contrib/opensolaris/cmd/zdb/   (props changed)
  user/jeff/numa/cddl/contrib/opensolaris/cmd/zfs/   (props changed)
  user/jeff/numa/cddl/contrib/opensolaris/lib/libzfs/   (props changed)
  user/jeff/numa/contrib/compiler-rt/   (props changed)
  user/jeff/numa/sys/cddl/contrib/opensolaris/   (props changed)

Modified: user/jeff/numa/Makefile.inc1
==============================================================================
--- user/jeff/numa/Makefile.inc1	Fri Feb 23 23:07:41 2018	(r329883)
+++ user/jeff/numa/Makefile.inc1	Fri Feb 23 23:16:15 2018	(r329884)
@@ -339,21 +339,33 @@ BUILDENV_SHELL?=${SHELL}
 BUILDENV_SHELL?=/bin/sh
 .endif
 
-.if !defined(SVN) || empty(SVN)
+.if !defined(SVN_CMD) || empty(SVN_CMD)
 . for _P in /usr/bin /usr/local/bin
 .  for _S in svn svnlite
 .   if exists(${_P}/${_S})
-SVN=   ${_P}/${_S}
+SVN_CMD=   ${_P}/${_S}
 .   endif
 .  endfor
 . endfor
+.export SVN_CMD
 .endif
 SVNFLAGS?=	-r HEAD
-.if !defined(VCS_REVISION) && empty(VCS_REVISION)
+.if !defined(VCS_REVISION) || empty(VCS_REVISION)
+.if !defined(SVNVERSION_CMD) || empty(SVNVERSION_CMD)
+. for _D in ${PATH:S,:, ,g}
+.  if exists(${_D}/svnversion)
+SVNVERSION_CMD?=${_D}/svnversion
+.  endif
+.  if exists(${_D}/svnliteversion)
+SVNVERSION_CMD?=${_D}/svnliteversion
+.  endif
+. endfor
+.endif
 _VCS_REVISION?=	$$(eval ${SVNVERSION_CMD} ${SRCDIR})
 . if !empty(_VCS_REVISION)
 VCS_REVISION=	$$(echo r${_VCS_REVISION})
 . endif
+.export VCS_REVISION
 .endif
 
 .if !defined(OSRELDATE)
@@ -1783,7 +1795,7 @@ update: .PHONY
 	@echo "--------------------------------------------------------------"
 	@echo ">>> Updating ${.CURDIR} using Subversion"
 	@echo "--------------------------------------------------------------"
-	@(cd ${.CURDIR}; ${SVN} update ${SVNFLAGS})
+	@(cd ${.CURDIR}; ${SVN_CMD} update ${SVNFLAGS})
 .endif
 
 #

Modified: user/jeff/numa/cddl/contrib/opensolaris/cmd/zdb/zdb.c
==============================================================================
--- user/jeff/numa/cddl/contrib/opensolaris/cmd/zdb/zdb.c	Fri Feb 23 23:07:41 2018	(r329883)
+++ user/jeff/numa/cddl/contrib/opensolaris/cmd/zdb/zdb.c	Fri Feb 23 23:16:15 2018	(r329884)
@@ -21,7 +21,7 @@
 
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011, 2016 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2017 by Delphix. All rights reserved.
  * Copyright (c) 2014 Integros [integros.com]
  * Copyright 2017 Nexenta Systems, Inc.
  */
@@ -77,19 +77,23 @@
 	dmu_ot[(idx)].ot_name : DMU_OT_IS_VALID(idx) ?	\
 	dmu_ot_byteswap[DMU_OT_BYTESWAP(idx)].ob_name : "UNKNOWN")
 #define	ZDB_OT_TYPE(idx) ((idx) < DMU_OT_NUMTYPES ? (idx) :		\
-	(((idx) == DMU_OTN_ZAP_DATA || (idx) == DMU_OTN_ZAP_METADATA) ?	\
-	DMU_OT_ZAP_OTHER : DMU_OT_NUMTYPES))
+	(idx) == DMU_OTN_ZAP_DATA || (idx) == DMU_OTN_ZAP_METADATA ?	\
+	DMU_OT_ZAP_OTHER : \
+	(idx) == DMU_OTN_UINT64_DATA || (idx) == DMU_OTN_UINT64_METADATA ? \
+	DMU_OT_UINT64_OTHER : DMU_OT_NUMTYPES)
 
 #ifndef lint
 extern int reference_tracking_enable;
 extern boolean_t zfs_recover;
 extern uint64_t zfs_arc_max, zfs_arc_meta_limit;
 extern int zfs_vdev_async_read_max_active;
+extern boolean_t spa_load_verify_dryrun;
 #else
 int reference_tracking_enable;
 boolean_t zfs_recover;
 uint64_t zfs_arc_max, zfs_arc_meta_limit;
 int zfs_vdev_async_read_max_active;
+boolean_t spa_load_verify_dryrun;
 #endif
 
 static const char cmdname[] = "zdb";
@@ -667,8 +671,8 @@ get_metaslab_refcount(vdev_t *vd)
 {
 	int refcount = 0;
 
-	if (vd->vdev_top == vd && !vd->vdev_removing) {
-		for (unsigned m = 0; m < vd->vdev_ms_count; m++) {
+	if (vd->vdev_top == vd) {
+		for (uint64_t m = 0; m < vd->vdev_ms_count; m++) {
 			space_map_t *sm = vd->vdev_ms[m]->ms_sm;
 
 			if (sm != NULL &&
@@ -683,6 +687,45 @@ get_metaslab_refcount(vdev_t *vd)
 }
 
 static int
+get_obsolete_refcount(vdev_t *vd)
+{
+	int refcount = 0;
+
+	uint64_t obsolete_sm_obj = vdev_obsolete_sm_object(vd);
+	if (vd->vdev_top == vd && obsolete_sm_obj != 0) {
+		dmu_object_info_t doi;
+		VERIFY0(dmu_object_info(vd->vdev_spa->spa_meta_objset,
+		    obsolete_sm_obj, &doi));
+		if (doi.doi_bonus_size == sizeof (space_map_phys_t)) {
+			refcount++;
+		}
+	} else {
+		ASSERT3P(vd->vdev_obsolete_sm, ==, NULL);
+		ASSERT3U(obsolete_sm_obj, ==, 0);
+	}
+	for (unsigned c = 0; c < vd->vdev_children; c++) {
+		refcount += get_obsolete_refcount(vd->vdev_child[c]);
+	}
+
+	return (refcount);
+}
+
+static int
+get_prev_obsolete_spacemap_refcount(spa_t *spa)
+{
+	uint64_t prev_obj =
+	    spa->spa_condensing_indirect_phys.scip_prev_obsolete_sm_object;
+	if (prev_obj != 0) {
+		dmu_object_info_t doi;
+		VERIFY0(dmu_object_info(spa->spa_meta_objset, prev_obj, &doi));
+		if (doi.doi_bonus_size == sizeof (space_map_phys_t)) {
+			return (1);
+		}
+	}
+	return (0);
+}
+
+static int
 verify_spacemap_refcounts(spa_t *spa)
 {
 	uint64_t expected_refcount = 0;
@@ -693,6 +736,8 @@ verify_spacemap_refcounts(spa_t *spa)
 	    &expected_refcount);
 	actual_refcount = get_dtl_refcount(spa->spa_root_vdev);
 	actual_refcount += get_metaslab_refcount(spa->spa_root_vdev);
+	actual_refcount += get_obsolete_refcount(spa->spa_root_vdev);
+	actual_refcount += get_prev_obsolete_spacemap_refcount(spa);
 
 	if (expected_refcount != actual_refcount) {
 		(void) printf("space map refcount mismatch: expected %lld != "
@@ -708,12 +753,19 @@ static void
 dump_spacemap(objset_t *os, space_map_t *sm)
 {
 	uint64_t alloc, offset, entry;
-	const char *ddata[] = { "ALLOC", "FREE", "CONDENSE", "INVALID",
-			    "INVALID", "INVALID", "INVALID", "INVALID" };
+	char *ddata[] = { "ALLOC", "FREE", "CONDENSE", "INVALID",
+	    "INVALID", "INVALID", "INVALID", "INVALID" };
 
 	if (sm == NULL)
 		return;
 
+	(void) printf("space map object %llu:\n",
+	    (longlong_t)sm->sm_phys->smp_object);
+	(void) printf("  smp_objsize = 0x%llx\n",
+	    (longlong_t)sm->sm_phys->smp_objsize);
+	(void) printf("  smp_alloc = 0x%llx\n",
+	    (longlong_t)sm->sm_phys->smp_alloc);
+
 	/*
 	 * Print out the freelist entries in both encoded and decoded form.
 	 */
@@ -818,9 +870,7 @@ dump_metaslab(metaslab_t *msp)
 	if (dump_opt['d'] > 5 || dump_opt['m'] > 3) {
 		ASSERT(msp->ms_size == (1ULL << vd->vdev_ms_shift));
 
-		mutex_enter(&msp->ms_lock);
 		dump_spacemap(spa->spa_meta_objset, msp->ms_sm);
-		mutex_exit(&msp->ms_lock);
 	}
 }
 
@@ -878,6 +928,78 @@ dump_metaslab_groups(spa_t *spa)
 }
 
 static void
+print_vdev_indirect(vdev_t *vd)
+{
+	vdev_indirect_config_t *vic = &vd->vdev_indirect_config;
+	vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping;
+	vdev_indirect_births_t *vib = vd->vdev_indirect_births;
+
+	if (vim == NULL) {
+		ASSERT3P(vib, ==, NULL);
+		return;
+	}
+
+	ASSERT3U(vdev_indirect_mapping_object(vim), ==,
+	    vic->vic_mapping_object);
+	ASSERT3U(vdev_indirect_births_object(vib), ==,
+	    vic->vic_births_object);
+
+	(void) printf("indirect births obj %llu:\n",
+	    (longlong_t)vic->vic_births_object);
+	(void) printf("    vib_count = %llu\n",
+	    (longlong_t)vdev_indirect_births_count(vib));
+	for (uint64_t i = 0; i < vdev_indirect_births_count(vib); i++) {
+		vdev_indirect_birth_entry_phys_t *cur_vibe =
+		    &vib->vib_entries[i];
+		(void) printf("\toffset %llx -> txg %llu\n",
+		    (longlong_t)cur_vibe->vibe_offset,
+		    (longlong_t)cur_vibe->vibe_phys_birth_txg);
+	}
+	(void) printf("\n");
+
+	(void) printf("indirect mapping obj %llu:\n",
+	    (longlong_t)vic->vic_mapping_object);
+	(void) printf("    vim_max_offset = 0x%llx\n",
+	    (longlong_t)vdev_indirect_mapping_max_offset(vim));
+	(void) printf("    vim_bytes_mapped = 0x%llx\n",
+	    (longlong_t)vdev_indirect_mapping_bytes_mapped(vim));
+	(void) printf("    vim_count = %llu\n",
+	    (longlong_t)vdev_indirect_mapping_num_entries(vim));
+
+	if (dump_opt['d'] <= 5 && dump_opt['m'] <= 3)
+		return;
+
+	uint32_t *counts = vdev_indirect_mapping_load_obsolete_counts(vim);
+
+	for (uint64_t i = 0; i < vdev_indirect_mapping_num_entries(vim); i++) {
+		vdev_indirect_mapping_entry_phys_t *vimep =
+		    &vim->vim_entries[i];
+		(void) printf("\t<%llx:%llx:%llx> -> "
+		    "<%llx:%llx:%llx> (%x obsolete)\n",
+		    (longlong_t)vd->vdev_id,
+		    (longlong_t)DVA_MAPPING_GET_SRC_OFFSET(vimep),
+		    (longlong_t)DVA_GET_ASIZE(&vimep->vimep_dst),
+		    (longlong_t)DVA_GET_VDEV(&vimep->vimep_dst),
+		    (longlong_t)DVA_GET_OFFSET(&vimep->vimep_dst),
+		    (longlong_t)DVA_GET_ASIZE(&vimep->vimep_dst),
+		    counts[i]);
+	}
+	(void) printf("\n");
+
+	uint64_t obsolete_sm_object = vdev_obsolete_sm_object(vd);
+	if (obsolete_sm_object != 0) {
+		objset_t *mos = vd->vdev_spa->spa_meta_objset;
+		(void) printf("obsolete space map object %llu:\n",
+		    (u_longlong_t)obsolete_sm_object);
+		ASSERT(vd->vdev_obsolete_sm != NULL);
+		ASSERT3U(space_map_object(vd->vdev_obsolete_sm), ==,
+		    obsolete_sm_object);
+		dump_spacemap(mos, vd->vdev_obsolete_sm);
+		(void) printf("\n");
+	}
+}
+
+static void
 dump_metaslabs(spa_t *spa)
 {
 	vdev_t *vd, *rvd = spa->spa_root_vdev;
@@ -913,6 +1035,8 @@ dump_metaslabs(spa_t *spa)
 		vd = rvd->vdev_child[c];
 		print_vdev_metaslab_header(vd);
 
+		print_vdev_indirect(vd);
+
 		for (m = 0; m < vd->vdev_ms_count; m++)
 			dump_metaslab(vd->vdev_ms[m]);
 		(void) printf("\n");
@@ -1090,9 +1214,7 @@ dump_dtl(vdev_t *vd, int indent)
 			continue;
 		(void) snprintf(prefix, sizeof (prefix), "\t%*s%s",
 		    indent + 2, "", name[t]);
-		mutex_enter(rt->rt_lock);
 		range_tree_walk(rt, dump_dtl_seg, prefix);
-		mutex_exit(rt->rt_lock);
 		if (dump_opt['d'] > 5 && vd->vdev_children == 0)
 			dump_spacemap(spa->spa_meta_objset, vd->vdev_dtl_sm);
 	}
@@ -2107,9 +2229,16 @@ dump_dir(objset_t *os)
 	if (dump_opt['i'] != 0 || verbosity >= 2)
 		dump_intent_log(dmu_objset_zil(os));
 
-	if (dmu_objset_ds(os) != NULL)
-		dump_deadlist(&dmu_objset_ds(os)->ds_deadlist);
+	if (dmu_objset_ds(os) != NULL) {
+		dsl_dataset_t *ds = dmu_objset_ds(os);
+		dump_deadlist(&ds->ds_deadlist);
 
+		if (dsl_dataset_remap_deadlist_exists(ds)) {
+			(void) printf("ds_remap_deadlist:\n");
+			dump_deadlist(&ds->ds_remap_deadlist);
+		}
+	}
+
 	if (verbosity < 2)
 		return;
 
@@ -2452,6 +2581,7 @@ dump_label(const char *dev)
 }
 
 static uint64_t dataset_feature_count[SPA_FEATURES];
+static uint64_t remap_deadlist_count = 0;
 
 /*ARGSUSED*/
 static int
@@ -2472,6 +2602,10 @@ dump_one_dir(const char *dsname, void *arg)
 		dataset_feature_count[f]++;
 	}
 
+	if (dsl_dataset_remap_deadlist_exists(dmu_objset_ds(os))) {
+		remap_deadlist_count++;
+	}
+
 	dump_dir(os);
 	close_objset(os, FTAG);
 	fuid_table_destroy();
@@ -2511,6 +2645,7 @@ static const char *zdb_ot_extname[] = {
 
 typedef struct zdb_cb {
 	zdb_blkstats_t	zcb_type[ZB_TOTAL + 1][ZDB_OT_TOTAL + 1];
+	uint64_t	zcb_removing_size;
 	uint64_t	zcb_dedup_asize;
 	uint64_t	zcb_dedup_blocks;
 	uint64_t	zcb_embedded_blocks[NUM_BP_EMBEDDED_TYPES];
@@ -2523,6 +2658,7 @@ typedef struct zdb_cb {
 	int		zcb_readfails;
 	int		zcb_haderrors;
 	spa_t		*zcb_spa;
+	uint32_t	**zcb_vd_obsolete_counts;
 } zdb_cb_t;
 
 static void
@@ -2797,12 +2933,208 @@ zdb_ddt_leak_init(spa_t *spa, zdb_cb_t *zcb)
 	ASSERT(error == ENOENT);
 }
 
+/* ARGSUSED */
 static void
+claim_segment_impl_cb(uint64_t inner_offset, vdev_t *vd, uint64_t offset,
+    uint64_t size, void *arg)
+{
+	/*
+	 * This callback was called through a remap from
+	 * a device being removed. Therefore, the vdev that
+	 * this callback is applied to is a concrete
+	 * vdev.
+	 */
+	ASSERT(vdev_is_concrete(vd));
+
+	VERIFY0(metaslab_claim_impl(vd, offset, size,
+	    spa_first_txg(vd->vdev_spa)));
+}
+
+static void
+claim_segment_cb(void *arg, uint64_t offset, uint64_t size)
+{
+	vdev_t *vd = arg;
+
+	vdev_indirect_ops.vdev_op_remap(vd, offset, size,
+	    claim_segment_impl_cb, NULL);
+}
+
+/*
+ * After accounting for all allocated blocks that are directly referenced,
+ * we might have missed a reference to a block from a partially complete
+ * (and thus unused) indirect mapping object. We perform a secondary pass
+ * through the metaslabs we have already mapped and claim the destination
+ * blocks.
+ */
+static void
+zdb_claim_removing(spa_t *spa, zdb_cb_t *zcb)
+{
+	if (spa->spa_vdev_removal == NULL)
+		return;
+
+	spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER);
+
+	spa_vdev_removal_t *svr = spa->spa_vdev_removal;
+	vdev_t *vd = svr->svr_vdev;
+	vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping;
+
+	for (uint64_t msi = 0; msi < vd->vdev_ms_count; msi++) {
+		metaslab_t *msp = vd->vdev_ms[msi];
+
+		if (msp->ms_start >= vdev_indirect_mapping_max_offset(vim))
+			break;
+
+		ASSERT0(range_tree_space(svr->svr_allocd_segs));
+
+		if (msp->ms_sm != NULL) {
+			VERIFY0(space_map_load(msp->ms_sm,
+			    svr->svr_allocd_segs, SM_ALLOC));
+
+			/*
+			 * Clear everything past what has been synced,
+			 * because we have not allocated mappings for it yet.
+			 */
+			range_tree_clear(svr->svr_allocd_segs,
+			    vdev_indirect_mapping_max_offset(vim),
+			    msp->ms_sm->sm_start + msp->ms_sm->sm_size -
+			    vdev_indirect_mapping_max_offset(vim));
+		}
+
+		zcb->zcb_removing_size +=
+		    range_tree_space(svr->svr_allocd_segs);
+		range_tree_vacate(svr->svr_allocd_segs, claim_segment_cb, vd);
+	}
+
+	spa_config_exit(spa, SCL_CONFIG, FTAG);
+}
+
+/*
+ * vm_idxp is an in-out parameter which (for indirect vdevs) is the
+ * index in vim_entries that has the first entry in this metaslab.  On
+ * return, it will be set to the first entry after this metaslab.
+ */
+static void
+zdb_leak_init_ms(metaslab_t *msp, uint64_t *vim_idxp)
+{
+	metaslab_group_t *mg = msp->ms_group;
+	vdev_t *vd = mg->mg_vd;
+	vdev_t *rvd = vd->vdev_spa->spa_root_vdev;
+
+	mutex_enter(&msp->ms_lock);
+	metaslab_unload(msp);
+
+	/*
+	 * We don't want to spend the CPU manipulating the size-ordered
+	 * tree, so clear the range_tree ops.
+	 */
+	msp->ms_tree->rt_ops = NULL;
+
+	(void) fprintf(stderr,
+	    "\rloading vdev %llu of %llu, metaslab %llu of %llu ...",
+	    (longlong_t)vd->vdev_id,
+	    (longlong_t)rvd->vdev_children,
+	    (longlong_t)msp->ms_id,
+	    (longlong_t)vd->vdev_ms_count);
+
+	/*
+	 * For leak detection, we overload the metaslab ms_tree to
+	 * contain allocated segments instead of free segments. As a
+	 * result, we can't use the normal metaslab_load/unload
+	 * interfaces.
+	 */
+	if (vd->vdev_ops == &vdev_indirect_ops) {
+		vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping;
+		for (; *vim_idxp < vdev_indirect_mapping_num_entries(vim);
+		    (*vim_idxp)++) {
+			vdev_indirect_mapping_entry_phys_t *vimep =
+			    &vim->vim_entries[*vim_idxp];
+			uint64_t ent_offset = DVA_MAPPING_GET_SRC_OFFSET(vimep);
+			uint64_t ent_len = DVA_GET_ASIZE(&vimep->vimep_dst);
+			ASSERT3U(ent_offset, >=, msp->ms_start);
+			if (ent_offset >= msp->ms_start + msp->ms_size)
+				break;
+
+			/*
+			 * Mappings do not cross metaslab boundaries,
+			 * because we create them by walking the metaslabs.
+			 */
+			ASSERT3U(ent_offset + ent_len, <=,
+			    msp->ms_start + msp->ms_size);
+			range_tree_add(msp->ms_tree, ent_offset, ent_len);
+		}
+	} else if (msp->ms_sm != NULL) {
+		VERIFY0(space_map_load(msp->ms_sm, msp->ms_tree, SM_ALLOC));
+	}
+
+	if (!msp->ms_loaded) {
+		msp->ms_loaded = B_TRUE;
+	}
+	mutex_exit(&msp->ms_lock);
+}
+
+/* ARGSUSED */
+static int
+increment_indirect_mapping_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx)
+{
+	zdb_cb_t *zcb = arg;
+	spa_t *spa = zcb->zcb_spa;
+	vdev_t *vd;
+	const dva_t *dva = &bp->blk_dva[0];
+
+	ASSERT(!dump_opt['L']);
+	ASSERT3U(BP_GET_NDVAS(bp), ==, 1);
+
+	spa_config_enter(spa, SCL_VDEV, FTAG, RW_READER);
+	vd = vdev_lookup_top(zcb->zcb_spa, DVA_GET_VDEV(dva));
+	ASSERT3P(vd, !=, NULL);
+	spa_config_exit(spa, SCL_VDEV, FTAG);
+
+	ASSERT(vd->vdev_indirect_config.vic_mapping_object != 0);
+	ASSERT3P(zcb->zcb_vd_obsolete_counts[vd->vdev_id], !=, NULL);
+
+	vdev_indirect_mapping_increment_obsolete_count(
+	    vd->vdev_indirect_mapping,
+	    DVA_GET_OFFSET(dva), DVA_GET_ASIZE(dva),
+	    zcb->zcb_vd_obsolete_counts[vd->vdev_id]);
+
+	return (0);
+}
+
+static uint32_t *
+zdb_load_obsolete_counts(vdev_t *vd)
+{
+	vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping;
+	spa_t *spa = vd->vdev_spa;
+	spa_condensing_indirect_phys_t *scip =
+	    &spa->spa_condensing_indirect_phys;
+	uint32_t *counts;
+
+	EQUIV(vdev_obsolete_sm_object(vd) != 0, vd->vdev_obsolete_sm != NULL);
+	counts = vdev_indirect_mapping_load_obsolete_counts(vim);
+	if (vd->vdev_obsolete_sm != NULL) {
+		vdev_indirect_mapping_load_obsolete_spacemap(vim, counts,
+		    vd->vdev_obsolete_sm);
+	}
+	if (scip->scip_vdev == vd->vdev_id &&
+	    scip->scip_prev_obsolete_sm_object != 0) {
+		space_map_t *prev_obsolete_sm = NULL;
+		VERIFY0(space_map_open(&prev_obsolete_sm, spa->spa_meta_objset,
+		    scip->scip_prev_obsolete_sm_object, 0, vd->vdev_asize, 0));
+		space_map_update(prev_obsolete_sm);
+		vdev_indirect_mapping_load_obsolete_spacemap(vim, counts,
+		    prev_obsolete_sm);
+		space_map_close(prev_obsolete_sm);
+	}
+	return (counts);
+}
+
+static void
 zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)
 {
 	zcb->zcb_spa = spa;
 
 	if (!dump_opt['L']) {
+		dsl_pool_t *dp = spa->spa_dsl_pool;
 		vdev_t *rvd = spa->spa_root_vdev;
 
 		/*
@@ -2813,50 +3145,51 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)
 		spa->spa_normal_class->mc_ops = &zdb_metaslab_ops;
 		spa->spa_log_class->mc_ops = &zdb_metaslab_ops;
 
+		zcb->zcb_vd_obsolete_counts =
+		    umem_zalloc(rvd->vdev_children * sizeof (uint32_t *),
+		    UMEM_NOFAIL);
+
+
 		for (uint64_t c = 0; c < rvd->vdev_children; c++) {
 			vdev_t *vd = rvd->vdev_child[c];
-			metaslab_group_t *mg = vd->vdev_mg;
-			for (uint64_t m = 0; m < vd->vdev_ms_count; m++) {
-				metaslab_t *msp = vd->vdev_ms[m];
-				ASSERT3P(msp->ms_group, ==, mg);
-				mutex_enter(&msp->ms_lock);
-				metaslab_unload(msp);
+			uint64_t vim_idx = 0;
 
+			ASSERT3U(c, ==, vd->vdev_id);
+
+			/*
+			 * Note: we don't check for mapping leaks on
+			 * removing vdevs because their ms_tree's are
+			 * used to look for leaks in allocated space.
+			 */
+			if (vd->vdev_ops == &vdev_indirect_ops) {
+				zcb->zcb_vd_obsolete_counts[c] =
+				    zdb_load_obsolete_counts(vd);
+
 				/*
-				 * For leak detection, we overload the metaslab
-				 * ms_tree to contain allocated segments
-				 * instead of free segments. As a result,
-				 * we can't use the normal metaslab_load/unload
-				 * interfaces.
+				 * Normally, indirect vdevs don't have any
+				 * metaslabs.  We want to set them up for
+				 * zio_claim().
 				 */
-				if (msp->ms_sm != NULL) {
-					(void) fprintf(stderr,
-					    "\rloading space map for "
-					    "vdev %llu of %llu, "
-					    "metaslab %llu of %llu ...",
-					    (longlong_t)c,
-					    (longlong_t)rvd->vdev_children,
-					    (longlong_t)m,
-					    (longlong_t)vd->vdev_ms_count);
+				VERIFY0(vdev_metaslab_init(vd, 0));
+			}
 
-					/*
-					 * We don't want to spend the CPU
-					 * manipulating the size-ordered
-					 * tree, so clear the range_tree
-					 * ops.
-					 */
-					msp->ms_tree->rt_ops = NULL;
-					VERIFY0(space_map_load(msp->ms_sm,
-					    msp->ms_tree, SM_ALLOC));
-
-					if (!msp->ms_loaded) {
-						msp->ms_loaded = B_TRUE;
-					}
-				}
-				mutex_exit(&msp->ms_lock);
+			for (uint64_t m = 0; m < vd->vdev_ms_count; m++) {
+				zdb_leak_init_ms(vd->vdev_ms[m], &vim_idx);
 			}
+			if (vd->vdev_ops == &vdev_indirect_ops) {
+				ASSERT3U(vim_idx, ==,
+				    vdev_indirect_mapping_num_entries(
+				    vd->vdev_indirect_mapping));
+			}
 		}
 		(void) fprintf(stderr, "\n");
+
+		if (bpobj_is_open(&dp->dp_obsolete_bpobj)) {
+			ASSERT(spa_feature_is_enabled(spa,
+			    SPA_FEATURE_DEVICE_REMOVAL));
+			(void) bpobj_iterate_nofree(&dp->dp_obsolete_bpobj,
+			    increment_indirect_mapping_cb, zcb, NULL);
+		}
 	}
 
 	spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER);
@@ -2866,18 +3199,93 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)
 	spa_config_exit(spa, SCL_CONFIG, FTAG);
 }
 
-static void
-zdb_leak_fini(spa_t *spa)
+static boolean_t
+zdb_check_for_obsolete_leaks(vdev_t *vd, zdb_cb_t *zcb)
 {
+	boolean_t leaks = B_FALSE;
+	vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping;
+	uint64_t total_leaked = 0;
+
+	ASSERT(vim != NULL);
+
+	for (uint64_t i = 0; i < vdev_indirect_mapping_num_entries(vim); i++) {
+		vdev_indirect_mapping_entry_phys_t *vimep =
+		    &vim->vim_entries[i];
+		uint64_t obsolete_bytes = 0;
+		uint64_t offset = DVA_MAPPING_GET_SRC_OFFSET(vimep);
+		metaslab_t *msp = vd->vdev_ms[offset >> vd->vdev_ms_shift];
+
+		/*
+		 * This is not very efficient but it's easy to
+		 * verify correctness.
+		 */
+		for (uint64_t inner_offset = 0;
+		    inner_offset < DVA_GET_ASIZE(&vimep->vimep_dst);
+		    inner_offset += 1 << vd->vdev_ashift) {
+			if (range_tree_contains(msp->ms_tree,
+			    offset + inner_offset, 1 << vd->vdev_ashift)) {
+				obsolete_bytes += 1 << vd->vdev_ashift;
+			}
+		}
+
+		int64_t bytes_leaked = obsolete_bytes -
+		    zcb->zcb_vd_obsolete_counts[vd->vdev_id][i];
+		ASSERT3U(DVA_GET_ASIZE(&vimep->vimep_dst), >=,
+		    zcb->zcb_vd_obsolete_counts[vd->vdev_id][i]);
+		if (bytes_leaked != 0 &&
+		    (vdev_obsolete_counts_are_precise(vd) ||
+		    dump_opt['d'] >= 5)) {
+			(void) printf("obsolete indirect mapping count "
+			    "mismatch on %llu:%llx:%llx : %llx bytes leaked\n",
+			    (u_longlong_t)vd->vdev_id,
+			    (u_longlong_t)DVA_MAPPING_GET_SRC_OFFSET(vimep),
+			    (u_longlong_t)DVA_GET_ASIZE(&vimep->vimep_dst),
+			    (u_longlong_t)bytes_leaked);
+		}
+		total_leaked += ABS(bytes_leaked);
+	}
+
+	if (!vdev_obsolete_counts_are_precise(vd) && total_leaked > 0) {
+		int pct_leaked = total_leaked * 100 /
+		    vdev_indirect_mapping_bytes_mapped(vim);
+		(void) printf("cannot verify obsolete indirect mapping "
+		    "counts of vdev %llu because precise feature was not "
+		    "enabled when it was removed: %d%% (%llx bytes) of mapping"
+		    "unreferenced\n",
+		    (u_longlong_t)vd->vdev_id, pct_leaked,
+		    (u_longlong_t)total_leaked);
+	} else if (total_leaked > 0) {
+		(void) printf("obsolete indirect mapping count mismatch "
+		    "for vdev %llu -- %llx total bytes mismatched\n",
+		    (u_longlong_t)vd->vdev_id,
+		    (u_longlong_t)total_leaked);
+		leaks |= B_TRUE;
+	}
+
+	vdev_indirect_mapping_free_obsolete_counts(vim,
+	    zcb->zcb_vd_obsolete_counts[vd->vdev_id]);
+	zcb->zcb_vd_obsolete_counts[vd->vdev_id] = NULL;
+
+	return (leaks);
+}
+
+static boolean_t
+zdb_leak_fini(spa_t *spa, zdb_cb_t *zcb)
+{
+	boolean_t leaks = B_FALSE;
 	if (!dump_opt['L']) {
 		vdev_t *rvd = spa->spa_root_vdev;
 		for (unsigned c = 0; c < rvd->vdev_children; c++) {
 			vdev_t *vd = rvd->vdev_child[c];
 			metaslab_group_t *mg = vd->vdev_mg;
-			for (unsigned m = 0; m < vd->vdev_ms_count; m++) {
+
+			if (zcb->zcb_vd_obsolete_counts[c] != NULL) {
+				leaks |= zdb_check_for_obsolete_leaks(vd, zcb);
+			}
+
+			for (uint64_t m = 0; m < vd->vdev_ms_count; m++) {
 				metaslab_t *msp = vd->vdev_ms[m];
 				ASSERT3P(mg, ==, msp->ms_group);
-				mutex_enter(&msp->ms_lock);
 
 				/*
 				 * The ms_tree has been overloaded to
@@ -2887,18 +3295,30 @@ zdb_leak_fini(spa_t *spa)
 				 * represents an allocated block that we
 				 * did not claim during the traversal.
 				 * Claimed blocks would have been removed
-				 * from the ms_tree.
+				 * from the ms_tree.  For indirect vdevs,
+				 * space remaining in the tree represents
+				 * parts of the mapping that are not
+				 * referenced, which is not a bug.
 				 */
-				range_tree_vacate(msp->ms_tree, zdb_leak, vd);
+				if (vd->vdev_ops == &vdev_indirect_ops) {
+					range_tree_vacate(msp->ms_tree,
+					    NULL, NULL);
+				} else {
+					range_tree_vacate(msp->ms_tree,
+					    zdb_leak, vd);
+				}
 
 				if (msp->ms_loaded) {
 					msp->ms_loaded = B_FALSE;
 				}
-
-				mutex_exit(&msp->ms_lock);
 			}
 		}
+
+		umem_free(zcb->zcb_vd_obsolete_counts,
+		    rvd->vdev_children * sizeof (uint32_t *));
+		zcb->zcb_vd_obsolete_counts = NULL;
 	}
+	return (leaks);
 }
 
 /* ARGSUSED */
@@ -2949,10 +3369,14 @@ dump_block_stats(spa_t *spa)
 	 */
 	(void) bpobj_iterate_nofree(&spa->spa_deferred_bpobj,
 	    count_block_cb, &zcb, NULL);
+
 	if (spa_version(spa) >= SPA_VERSION_DEADLISTS) {
 		(void) bpobj_iterate_nofree(&spa->spa_dsl_pool->dp_free_bpobj,
 		    count_block_cb, &zcb, NULL);
 	}
+
+	zdb_claim_removing(spa, &zcb);
+
 	if (spa_feature_is_active(spa, SPA_FEATURE_ASYNC_DESTROY)) {
 		VERIFY3U(0, ==, bptree_iterate(spa->spa_meta_objset,
 		    spa->spa_dsl_pool->dp_bptree_obj, B_FALSE, count_block_cb,
@@ -2994,7 +3418,7 @@ dump_block_stats(spa_t *spa)
 	/*
 	 * Report any leaked segments.
 	 */
-	zdb_leak_fini(spa);
+	leaks |= zdb_leak_fini(spa, &zcb);
 
 	tzb = &zcb.zcb_type[ZB_TOTAL][ZDB_OT_TOTAL];
 
@@ -3002,7 +3426,8 @@ dump_block_stats(spa_t *spa)
 	norm_space = metaslab_class_get_space(spa_normal_class(spa));
 
 	total_alloc = norm_alloc + metaslab_class_get_alloc(spa_log_class(spa));
-	total_found = tzb->zb_asize - zcb.zcb_dedup_asize;
+	total_found = tzb->zb_asize - zcb.zcb_dedup_asize +
+	    zcb.zcb_removing_size;
 
 	if (total_found == total_alloc) {
 		if (!dump_opt['L'])
@@ -3069,6 +3494,24 @@ dump_block_stats(spa_t *spa)
 		    (longlong_t)tzb->zb_ditto_samevdev);
 	}
 
+	for (uint64_t v = 0; v < spa->spa_root_vdev->vdev_children; v++) {
+		vdev_t *vd = spa->spa_root_vdev->vdev_child[v];
+		vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping;
+
+		if (vim == NULL) {
+			continue;
+		}
+
+		char mem[32];
+		zdb_nicenum(vdev_indirect_mapping_num_entries(vim),
+		    mem, vdev_indirect_mapping_size(vim));
+
+		(void) printf("\tindirect vdev id %llu has %llu segments "
+		    "(%s in memory)\n",
+		    (longlong_t)vd->vdev_id,
+		    (longlong_t)vdev_indirect_mapping_num_entries(vim), mem);
+	}
+
 	if (dump_opt['b'] >= 2) {
 		int l, t, level;
 		(void) printf("\nBlocks\tLSIZE\tPSIZE\tASIZE"
@@ -3275,6 +3718,124 @@ dump_simulated_ddt(spa_t *spa)
 	dump_dedup_ratio(&dds_total);
 }
 
+static int
+verify_device_removal_feature_counts(spa_t *spa)
+{
+	uint64_t dr_feature_refcount = 0;
+	uint64_t oc_feature_refcount = 0;
+	uint64_t indirect_vdev_count = 0;
+	uint64_t precise_vdev_count = 0;
+	uint64_t obsolete_counts_object_count = 0;
+	uint64_t obsolete_sm_count = 0;
+	uint64_t obsolete_counts_count = 0;
+	uint64_t scip_count = 0;
+	uint64_t obsolete_bpobj_count = 0;
+	int ret = 0;
+
+	spa_condensing_indirect_phys_t *scip =
+	    &spa->spa_condensing_indirect_phys;
+	if (scip->scip_next_mapping_object != 0) {
+		vdev_t *vd = spa->spa_root_vdev->vdev_child[scip->scip_vdev];
+		ASSERT(scip->scip_prev_obsolete_sm_object != 0);
+		ASSERT3P(vd->vdev_ops, ==, &vdev_indirect_ops);
+
+		(void) printf("Condensing indirect vdev %llu: new mapping "
+		    "object %llu, prev obsolete sm %llu\n",
+		    (u_longlong_t)scip->scip_vdev,
+		    (u_longlong_t)scip->scip_next_mapping_object,
+		    (u_longlong_t)scip->scip_prev_obsolete_sm_object);
+		if (scip->scip_prev_obsolete_sm_object != 0) {
+			space_map_t *prev_obsolete_sm = NULL;
+			VERIFY0(space_map_open(&prev_obsolete_sm,
+			    spa->spa_meta_objset,
+			    scip->scip_prev_obsolete_sm_object,
+			    0, vd->vdev_asize, 0));
+			space_map_update(prev_obsolete_sm);
+			dump_spacemap(spa->spa_meta_objset, prev_obsolete_sm);
+			(void) printf("\n");
+			space_map_close(prev_obsolete_sm);
+		}
+
+		scip_count += 2;
+	}
+
+	for (uint64_t i = 0; i < spa->spa_root_vdev->vdev_children; i++) {
+		vdev_t *vd = spa->spa_root_vdev->vdev_child[i];
+		vdev_indirect_config_t *vic = &vd->vdev_indirect_config;
+
+		if (vic->vic_mapping_object != 0) {
+			ASSERT(vd->vdev_ops == &vdev_indirect_ops ||
+			    vd->vdev_removing);
+			indirect_vdev_count++;
+
+			if (vd->vdev_indirect_mapping->vim_havecounts) {
+				obsolete_counts_count++;
+			}
+		}
+		if (vdev_obsolete_counts_are_precise(vd)) {
+			ASSERT(vic->vic_mapping_object != 0);
+			precise_vdev_count++;
+		}
+		if (vdev_obsolete_sm_object(vd) != 0) {
+			ASSERT(vic->vic_mapping_object != 0);
+			obsolete_sm_count++;
+		}
+	}
+
+	(void) feature_get_refcount(spa,
+	    &spa_feature_table[SPA_FEATURE_DEVICE_REMOVAL],
+	    &dr_feature_refcount);
+	(void) feature_get_refcount(spa,
+	    &spa_feature_table[SPA_FEATURE_OBSOLETE_COUNTS],
+	    &oc_feature_refcount);
+
+	if (dr_feature_refcount != indirect_vdev_count) {
+		ret = 1;
+		(void) printf("Number of indirect vdevs (%llu) " \
+		    "does not match feature count (%llu)\n",
+		    (u_longlong_t)indirect_vdev_count,
+		    (u_longlong_t)dr_feature_refcount);
+	} else {
+		(void) printf("Verified device_removal feature refcount " \
+		    "of %llu is correct\n",
+		    (u_longlong_t)dr_feature_refcount);
+	}
+
+	if (zap_contains(spa_meta_objset(spa), DMU_POOL_DIRECTORY_OBJECT,
+	    DMU_POOL_OBSOLETE_BPOBJ) == 0) {
+		obsolete_bpobj_count++;
+	}
+
+
+	obsolete_counts_object_count = precise_vdev_count;
+	obsolete_counts_object_count += obsolete_sm_count;
+	obsolete_counts_object_count += obsolete_counts_count;
+	obsolete_counts_object_count += scip_count;
+	obsolete_counts_object_count += obsolete_bpobj_count;
+	obsolete_counts_object_count += remap_deadlist_count;
+
+	if (oc_feature_refcount != obsolete_counts_object_count) {
+		ret = 1;
+		(void) printf("Number of obsolete counts objects (%llu) " \
+		    "does not match feature count (%llu)\n",
+		    (u_longlong_t)obsolete_counts_object_count,
+		    (u_longlong_t)oc_feature_refcount);
+		(void) printf("pv:%llu os:%llu oc:%llu sc:%llu "
+		    "ob:%llu rd:%llu\n",
+		    (u_longlong_t)precise_vdev_count,
+		    (u_longlong_t)obsolete_sm_count,
+		    (u_longlong_t)obsolete_counts_count,
+		    (u_longlong_t)scip_count,
+		    (u_longlong_t)obsolete_bpobj_count,
+		    (u_longlong_t)remap_deadlist_count);
+	} else {
+		(void) printf("Verified indirect_refcount feature refcount " \
+		    "of %llu is correct\n",
+		    (u_longlong_t)oc_feature_refcount);
+	}
+	return (ret);
+}
+
 static void
 dump_zpool(spa_t *spa)
 {
@@ -3308,18 +3869,24 @@ dump_zpool(spa_t *spa)
 	if (dump_opt['d'] || dump_opt['i']) {
 		dump_dir(dp->dp_meta_objset);
 		if (dump_opt['d'] >= 3) {
+			dsl_pool_t *dp = spa->spa_dsl_pool;
 			dump_full_bpobj(&spa->spa_deferred_bpobj,
 			    "Deferred frees", 0);
 			if (spa_version(spa) >= SPA_VERSION_DEADLISTS) {
-				dump_full_bpobj(
-				    &spa->spa_dsl_pool->dp_free_bpobj,
+				dump_full_bpobj(&dp->dp_free_bpobj,
 				    "Pool snapshot frees", 0);
 			}
+			if (bpobj_is_open(&dp->dp_obsolete_bpobj)) {
+				ASSERT(spa_feature_is_enabled(spa,
+				    SPA_FEATURE_DEVICE_REMOVAL));
+				dump_full_bpobj(&dp->dp_obsolete_bpobj,
+				    "Pool obsolete blocks", 0);
+			}
 
 			if (spa_feature_is_active(spa,
 			    SPA_FEATURE_ASYNC_DESTROY)) {
 				dump_bptree(spa->spa_meta_objset,
-				    spa->spa_dsl_pool->dp_bptree_obj,
+				    dp->dp_bptree_obj,
 				    "Pool dataset frees");
 			}
 			dump_dtl(spa->spa_root_vdev, 0);
@@ -3351,6 +3918,10 @@ dump_zpool(spa_t *spa)
 				    (longlong_t)refcount);
 			}
 		}
+
+		if (rc == 0) {
+			rc = verify_device_removal_feature_counts(spa);
+		}
 	}
 	if (rc == 0 && (dump_opt['b'] || dump_opt['c']))
 		rc = dump_block_stats(spa);
@@ -3570,6 +4141,7 @@ zdb_read_block(char *thing, spa_t *spa)
 		s = "offset must be a multiple of sector size";
 	if (s) {
 		(void) printf("Invalid block specifier: %s  - %s\n", thing, s);
+		free(flagstr);
 		free(dup);
 		return;
 	}
@@ -3595,6 +4167,7 @@ zdb_read_block(char *thing, spa_t *spa)
 				blkptr_offset = strtoull(p, &p, 16);
 			if (*p != ':' && *p != '\0') {
 				(void) printf("***Invalid flag arg: '%s'\n", s);
+				free(flagstr);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-user mailing list