summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorOlaf Faaland <[email protected]>2017-07-14 16:32:55 -0700
committerBrian Behlendorf <[email protected]>2017-07-25 13:22:14 -0400
commit60f510344596b1f2f890df2e96282d586edf6aaf (patch)
treea56b7b4e689b91b5ffd296b2bfbeedc6ff82b63a /cmd
parentb9373170e3e346733f5666dd80727cb6e05cd5d3 (diff)
Skip activity check for zhack RO import
"zhack feature stat" performs a read-only import, so the MMP activity check is not necessary. Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Olaf Faaland <[email protected]> Closes #6388 Closes #6389
Diffstat (limited to 'cmd')
-rw-r--r--cmd/zhack/zhack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/zhack/zhack.c b/cmd/zhack/zhack.c
index cc414dae1..70f88fc69 100644
--- a/cmd/zhack/zhack.c
+++ b/cmd/zhack/zhack.c
@@ -151,7 +151,8 @@ zhack_import(char *target, boolean_t readonly)
}
zfeature_checks_disable = B_TRUE;
- error = spa_import(target, config, props, ZFS_IMPORT_NORMAL);
+ error = spa_import(target, config, props,
+ (readonly ? ZFS_IMPORT_SKIP_MMP : ZFS_IMPORT_NORMAL));
zfeature_checks_disable = B_FALSE;
if (error == EEXIST)
error = 0;