zpool import -t should not update cachefile

zpool import's -t parameter is intended for use with -R when operating
on pools that belong to other systems. Like -R, pools imported in this
way should not update the cachefile unless explicitly requested. The
initial implementation allowed the cachefile to be updated when -R was
not used. This went uncaught during testing because -R had implicitly
disabled use of the cachefile.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2417
This commit is contained in:
Richard Yao
2014-06-23 14:26:47 -04:00
committed by Brian Behlendorf
parent 2f3ec90061
commit 00d2a8c92f
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -2085,6 +2085,9 @@ zpool_do_import(int argc, char **argv)
break;
case 't':
flags |= ZFS_IMPORT_TEMP_NAME;
if (add_prop_list_default(zpool_prop_to_name(
ZPOOL_PROP_CACHEFILE), "none", &props, B_TRUE))
goto error;
break;
case 'T':