]> granicus.if.org Git - zfs/commit
Added no_scrub_restart flag to zpool reopen
authorArkadiusz Bubała <arkadiusz.bubala@open-e.com>
Thu, 26 Oct 2017 19:26:09 +0000 (21:26 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 26 Oct 2017 19:26:09 +0000 (12:26 -0700)
commitd3f2cd7e3b70679f127dd471ea6d37ece27463f2
treec83555f629c501dd5742272c62888caa785b7468
parent3ad59c015dce45965fa309a0364a46c6f8bdda9f
Added no_scrub_restart flag to zpool reopen

Added -n flag to zpool reopen that allows a running scrub
operation to continue if there is a device with Dirty Time Log.

By default if a component device has a DTL and zpool reopen
is executed all running scan operations will be restarted.

Added functional tests for `zpool reopen`

Tests covers following scenarios:
* `zpool reopen` without arguments,
* `zpool reopen` with pool name as argument,
* `zpool reopen` while scrubbing,
* `zpool reopen -n` while scrubbing,
* `zpool reopen -n` while resilvering,
* `zpool reopen` with bad arguments.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: Arkadiusz Bubała <arkadiusz.bubala@open-e.com>
Closes #6076
Closes #6746
28 files changed:
cmd/zed/agents/zfs_mod.c
cmd/zpool/zpool_main.c
configure.ac
include/libzfs.h
include/libzfs_core.h
lib/libzfs/libzfs_pool.c
lib/libzfs_core/libzfs_core.c
man/man8/zpool.8
module/zfs/zfs_ioctl.c
tests/runfiles/linux.run
tests/zfs-tests/include/Makefile.am
tests/zfs-tests/include/blkdev.shlib [new file with mode: 0644]
tests/zfs-tests/include/libtest.shlib
tests/zfs-tests/tests/functional/cli_root/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool_reopen/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/cli_root/zpool_reopen/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_reopen/setup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen.cfg [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen.shlib [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen_001_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen_002_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen_003_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen_004_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen_005_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zpool_reopen/zpool_reopen_006_neg.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/fault/auto_online_001_pos.ksh
tests/zfs-tests/tests/functional/fault/auto_replace_001_pos.ksh
tests/zfs-tests/tests/functional/fault/cleanup.ksh