From 00d2a8c92f614f49d23dea5d73f7ea7eb489ccf1 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Mon, 23 Jun 2014 14:26:47 -0400 Subject: 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 Signed-off-by: Brian Behlendorf Issue #2417 --- cmd/zpool/zpool_main.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmd/zpool') diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index d6fa8a829..13577d13c 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -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': -- cgit v1.2.3