From 38640550f28c5acd94621f3452fab428df469bdb Mon Sep 17 00:00:00 2001 From: Don Brady Date: Fri, 13 Jan 2017 14:50:22 -0700 Subject: OpenZFS 7743 - per-vdev-zaps init path for upgrade Authored by: Paul Dagnelie Reviewed by: Matt Ahrens Reviewed by: Pavel Zakharov Reviewed by: George Wilson Reviewed by: Don Brady Reviewed-by: Brian Behlendorf Reviewed-by: Joe Stein Ported-by: Don Brady When loading a pool that had been created before the existance of per-vdev zaps, on a system that knows about per-vdev zaps, the per-vdev zaps will not be allocated and initialized. This appears to be because the logic that would have done so, in spa_sync_config_object(), is not reached under normal operation. It is only reached if spa_config_dirty_list is non-empty. The fix is to add another `AVZ_ACTION_` enum that will allow this code to be reached when we detect that we're loading an old pool, even when there are no dirty configs. OpenZFS-issue: https://www.illumos.org/issues/7743 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/e2d29d0 Closes #5582 --- include/sys/spa_impl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/sys/spa_impl.h') diff --git a/include/sys/spa_impl.h b/include/sys/spa_impl.h index b80764537..5f2a87309 100644 --- a/include/sys/spa_impl.h +++ b/include/sys/spa_impl.h @@ -120,7 +120,8 @@ typedef struct spa_taskqs { typedef enum spa_all_vdev_zap_action { AVZ_ACTION_NONE = 0, AVZ_ACTION_DESTROY, /* Destroy all per-vdev ZAPs and the AVZ. */ - AVZ_ACTION_REBUILD /* Populate the new AVZ, see spa_avz_rebuild */ + AVZ_ACTION_REBUILD, /* Populate the new AVZ, see spa_avz_rebuild */ + AVZ_ACTION_INITIALIZE } spa_avz_action_t; struct spa { -- cgit v1.2.3