From 325b63f583cb0ae48f071329f6704dd5336dc5a5 Mon Sep 17 00:00:00 2001 From: smh Date: Tue, 23 Dec 2014 09:31:24 +0000 Subject: [PATCH] Always sync the global ZFS config cache to reflect the new mosconfig This fixes out of date zpool.cache for root pools, which can cause issues such as confusion of zdb etc. MFC after: 1 month --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c index 2d0cf2309324..c4ee741e9a70 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c @@ -536,8 +536,7 @@ spa_config_update(spa_t *spa, int what) /* * Update the global config cache to reflect the new mosconfig. */ - if (!spa->spa_is_root) - spa_config_sync(spa, B_FALSE, what != SPA_CONFIG_UPDATE_POOL); + spa_config_sync(spa, B_FALSE, what != SPA_CONFIG_UPDATE_POOL); if (what == SPA_CONFIG_UPDATE_POOL) spa_config_update(spa, SPA_CONFIG_UPDATE_VDEVS);