]> git.proxmox.com Git - mirror_zfs.git/commit
Skip import activity test in more zdb code paths
authorOlaf Faaland <faaland1@llnl.gov>
Mon, 20 Aug 2018 17:05:23 +0000 (10:05 -0700)
committerTony Hutter <hutter2@llnl.gov>
Thu, 8 Nov 2018 22:38:28 +0000 (14:38 -0800)
commit9014da2b0163fc5f308f213754ad63d7801b5d81
tree33da0a5ff3fb51e48d421c057fbf63adf96e67b9
parent45579c951587c5856ea3db7e429be4866c4dfe85
Skip import activity test in more zdb code paths

Since zdb opens the pools read-only, it cannot damage the pool in the
event the pool is already imported either on the same host or on
another one.

If the pool vdev structure is changing while zdb is importing the
pool, it may cause zdb to crash.  However this is unlikely, and in any
case it's a user space process and can simply be run again.

For this reason, zdb should disable the multihost activity test on
import that is normally run.

This commit fixes a few zdb code paths where that had been overlooked.
It also adds tests to ensure that several common use cases handle this
properly in the future.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Gu Zheng <guzheng2331314@163.com>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #7797
Closes #7801
cmd/zdb/zdb.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/mmp/Makefile.am
tests/zfs-tests/tests/functional/mmp/mmp_on_zdb.ksh [new file with mode: 0755]