]> git.proxmox.com Git - mirror_zfs.git/commit - tests/zfs-tests/tests/functional/removal/removal_with_remap.ksh
OpenZFS 9166 - zfs storage pool checkpoint
authorSerapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Fri, 16 Dec 2016 22:11:29 +0000 (14:11 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 26 Jun 2018 17:07:42 +0000 (10:07 -0700)
commitd2734cce68cf740e015312314415f9034c67851c
treeb7a140a3cf2a19bb7c88f2d277f3b5a33c121cea
parent88eaf610d9c7056f0946e5090cba1e6288ff2b70
OpenZFS 9166 - zfs storage pool checkpoint

Details about the motivation of this feature and its usage can
be found in this blogpost:

    https://sdimitro.github.io/post/zpool-checkpoint/

A lightning talk of this feature can be found here:
https://www.youtube.com/watch?v=fPQA8K40jAM

Implementation details can be found in big block comment of
spa_checkpoint.c

Side-changes that are relevant to this commit but not explained
elsewhere:

* renames members of "struct metaslab trees to be shorter without
  losing meaning

* space_map_{alloc,truncate}() accept a block size as a
  parameter. The reason is that in the current state all space
  maps that we allocate through the DMU use a global tunable
  (space_map_blksz) which defauls to 4KB. This is ok for metaslab
  space maps in terms of bandwirdth since they are scattered all
  over the disk. But for other space maps this default is probably
  not what we want. Examples are device removal's vdev_obsolete_sm
  or vdev_chedkpoint_sm from this review. Both of these have a
  1:1 relationship with each vdev and could benefit from a bigger
  block size.

Porting notes:

* The part of dsl_scan_sync() which handles async destroys has
  been moved into the new dsl_process_async_destroys() function.

* Remove "VERIFY(!(flags & FWRITE))" in "kernel.c" so zhack can write
  to block device backed pools.

* ZTS:
  * Fix get_txg() in zpool_sync_001_pos due to "checkpoint_txg".

  * Don't use large dd block sizes on /dev/urandom under Linux in
    checkpoint_capacity.

  * Adopt Delphix-OS's setting of 4 (spa_asize_inflation =
    SPA_DVAS_PER_BP + 1) for the checkpoint_capacity test to speed
    its attempts to fill the pool

  * Create the base and nested pools with sync=disabled to speed up
    the "setup" phase.

  * Clear labels in test pool between checkpoint tests to avoid
    duplicate pool issues.

  * The import_rewind_device_replaced test has been marked as "known
    to fail" for the reasons listed in its DISCLAIMER.

  * New module parameters:

      zfs_spa_discard_memory_limit,
      zfs_remove_max_bytes_pause (not documented - debugging only)
      vdev_max_ms_count (formerly metaslabs_per_vdev)
      vdev_min_ms_count

Authored by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Richard Lowe <richlowe@richlowe.net>
Ported-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Tim Chase <tim@chase2k.com>
OpenZFS-issue: https://illumos.org/issues/9166
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/7159fdb8
Closes #7570
115 files changed:
cmd/zdb/zdb.c
cmd/zdb/zdb_il.c
cmd/zpool/zpool_main.c
cmd/ztest/ztest.c
configure.ac
include/libzfs.h
include/libzfs_core.h
include/sys/Makefile.am
include/sys/dmu.h
include/sys/dsl_dir.h
include/sys/dsl_pool.h
include/sys/dsl_synctask.h
include/sys/fs/zfs.h
include/sys/metaslab.h
include/sys/metaslab_impl.h
include/sys/range_tree.h
include/sys/spa.h
include/sys/spa_checkpoint.h [new file with mode: 0644]
include/sys/spa_impl.h
include/sys/space_map.h
include/sys/uberblock_impl.h
include/sys/vdev.h
include/sys/vdev_impl.h
include/sys/vdev_removal.h
include/sys/zio.h
include/sys/zthr.h
include/zfeature_common.h
lib/libzfs/libzfs_pool.c
lib/libzfs/libzfs_util.c
lib/libzfs_core/libzfs_core.c
lib/libzpool/Makefile.am
lib/libzpool/kernel.c
man/man5/zfs-module-parameters.5
man/man5/zpool-features.5
man/man8/zdb.8
man/man8/zpool.8
module/zcommon/zfeature_common.c
module/zcommon/zpool_prop.c
module/zfs/Makefile.in
module/zfs/dmu_traverse.c
module/zfs/dnode.c
module/zfs/dnode_sync.c
module/zfs/dsl_dataset.c
module/zfs/dsl_destroy.c
module/zfs/dsl_dir.c
module/zfs/dsl_pool.c
module/zfs/dsl_scan.c
module/zfs/dsl_synctask.c
module/zfs/dsl_userhold.c
module/zfs/metaslab.c
module/zfs/range_tree.c
module/zfs/spa.c
module/zfs/spa_checkpoint.c [new file with mode: 0644]
module/zfs/spa_misc.c
module/zfs/space_map.c
module/zfs/uberblock.c
module/zfs/vdev.c
module/zfs/vdev_indirect.c
module/zfs/vdev_label.c
module/zfs/vdev_removal.c
module/zfs/zcp.c
module/zfs/zcp_synctask.c
module/zfs/zfs_ioctl.c
module/zfs/zil.c
module/zfs/zio.c
module/zfs/zthr.c
tests/runfiles/linux.run
tests/runfiles/longevity.run [new file with mode: 0644]
tests/zfs-tests/cmd/Makefile.am
tests/zfs-tests/cmd/randwritecomp/.gitignore [new file with mode: 0644]
tests/zfs-tests/cmd/randwritecomp/Makefile.am [new file with mode: 0644]
tests/zfs-tests/cmd/randwritecomp/randwritecomp.c [new file with mode: 0644]
tests/zfs-tests/include/commands.cfg
tests/zfs-tests/include/libtest.shlib
tests/zfs-tests/tests/functional/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zdb/zdb_001_neg.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get.cfg
tests/zfs-tests/tests/functional/cli_root/zpool_import/import_rewind_config_changed.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_sync/zpool_sync_001_pos.ksh
tests/zfs-tests/tests/functional/pool_checkpoint/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_after_rewind.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_big_rewind.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_capacity.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_conf_change.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_discard.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_discard_busy.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_discard_many.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_indirect.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_invalid.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_lun_expsz.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_open.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_removal.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_rewind.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_ro_rewind.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_sm_scale.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_twice.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_vdev_add.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_zdb.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_zhack_feat.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/pool_checkpoint/pool_checkpoint.kshlib [new file with mode: 0644]
tests/zfs-tests/tests/functional/pool_checkpoint/setup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/removal/removal.kshlib
tests/zfs-tests/tests/functional/removal/removal_remap_deadlists.ksh
tests/zfs-tests/tests/functional/removal/removal_reservation.ksh
tests/zfs-tests/tests/functional/removal/removal_with_add.ksh
tests/zfs-tests/tests/functional/removal/removal_with_create_fs.ksh
tests/zfs-tests/tests/functional/removal/removal_with_export.ksh
tests/zfs-tests/tests/functional/removal/removal_with_remap.ksh
tests/zfs-tests/tests/functional/removal/removal_with_remove.ksh
tests/zfs-tests/tests/functional/removal/removal_with_scrub.ksh
tests/zfs-tests/tests/functional/removal/removal_with_send.ksh
tests/zfs-tests/tests/functional/removal/removal_with_send_recv.ksh
tests/zfs-tests/tests/functional/removal/removal_with_snapshot.ksh
tests/zfs-tests/tests/functional/removal/removal_with_zdb.ksh