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 <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #6388
Closes #6389
This commit is contained in:
Olaf Faaland 2017-07-14 16:32:55 -07:00 committed by Brian Behlendorf
parent b9373170e3
commit 60f5103445

View File

@ -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;