diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/dmu.h | 1 | ||||
-rw-r--r-- | include/sys/fs/zfs.h | 3 | ||||
-rw-r--r-- | include/sys/spa_impl.h | 8 | ||||
-rw-r--r-- | include/sys/vdev.h | 7 | ||||
-rw-r--r-- | include/sys/vdev_impl.h | 2 |
5 files changed, 20 insertions, 1 deletions
diff --git a/include/sys/dmu.h b/include/sys/dmu.h index ab6b92fb8..64d28334e 100644 --- a/include/sys/dmu.h +++ b/include/sys/dmu.h @@ -315,6 +315,7 @@ typedef struct dmu_buf { #define DMU_POOL_FREE_BPOBJ "free_bpobj" #define DMU_POOL_BPTREE_OBJ "bptree_obj" #define DMU_POOL_EMPTY_BPOBJ "empty_bpobj" +#define DMU_POOL_VDEV_ZAP_MAP "com.delphix:vdev_zap_map" /* * Allocate an object from this objset. The range of object numbers diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h index 536fab785..e2974ad7a 100644 --- a/include/sys/fs/zfs.h +++ b/include/sys/fs/zfs.h @@ -566,6 +566,9 @@ typedef struct zpool_rewind_policy { #define ZPOOL_CONFIG_FEATURES_FOR_READ "features_for_read" #define ZPOOL_CONFIG_FEATURE_STATS "feature_stats" /* not stored on disk */ #define ZPOOL_CONFIG_ERRATA "errata" /* not stored on disk */ +#define ZPOOL_CONFIG_VDEV_TOP_ZAP "com.delphix:vdev_zap_top" +#define ZPOOL_CONFIG_VDEV_LEAF_ZAP "com.delphix:vdev_zap_leaf" +#define ZPOOL_CONFIG_HAS_PER_VDEV_ZAPS "com.delphix:has_per_vdev_zaps" /* * The persistent vdev state is stored as separate values rather than a single * 'vdev_state' entry. This is because a device can be in multiple states, such diff --git a/include/sys/spa_impl.h b/include/sys/spa_impl.h index 759c3472f..2eb5fa12a 100644 --- a/include/sys/spa_impl.h +++ b/include/sys/spa_impl.h @@ -116,6 +116,12 @@ typedef struct spa_taskqs { taskq_t **stqs_taskq; } spa_taskqs_t; +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 */ +} spa_avz_action_t; + struct spa { /* * Fields protected by spa_namespace_lock. @@ -251,6 +257,8 @@ struct spa { uint64_t spa_deadman_calls; /* number of deadman calls */ hrtime_t spa_sync_starttime; /* starting time of spa_sync */ uint64_t spa_deadman_synctime; /* deadman expiration timer */ + uint64_t spa_all_vdev_zaps; /* ZAP of per-vd ZAP obj #s */ + spa_avz_action_t spa_avz_action; /* destroy/rebuild AVZ? */ uint64_t spa_errata; /* errata issues detected */ spa_stats_t spa_stats; /* assorted spa statistics */ hrtime_t spa_ccw_fail_time; /* Conf cache write fail time */ diff --git a/include/sys/vdev.h b/include/sys/vdev.h index 8a2afd49f..5abd8c019 100644 --- a/include/sys/vdev.h +++ b/include/sys/vdev.h @@ -70,6 +70,10 @@ extern void vdev_dtl_reassess(vdev_t *vd, uint64_t txg, uint64_t scrub_txg, extern boolean_t vdev_dtl_required(vdev_t *vd); extern boolean_t vdev_resilver_needed(vdev_t *vd, uint64_t *minp, uint64_t *maxp); +extern void vdev_destroy_unlink_zap(vdev_t *vd, uint64_t zapobj, + dmu_tx_t *tx); +extern uint64_t vdev_create_link_zap(vdev_t *vd, dmu_tx_t *tx); +extern void vdev_construct_zaps(vdev_t *vd, dmu_tx_t *tx); extern void vdev_hold(vdev_t *); extern void vdev_rele(vdev_t *); @@ -133,7 +137,8 @@ extern void vdev_state_clean(vdev_t *vd); typedef enum vdev_config_flag { VDEV_CONFIG_SPARE = 1 << 0, VDEV_CONFIG_L2CACHE = 1 << 1, - VDEV_CONFIG_REMOVING = 1 << 2 + VDEV_CONFIG_REMOVING = 1 << 2, + VDEV_CONFIG_MOS = 1 << 3 } vdev_config_flag_t; extern void vdev_top_config_generate(spa_t *spa, nvlist_t *config); diff --git a/include/sys/vdev_impl.h b/include/sys/vdev_impl.h index e1706d603..4958cad9c 100644 --- a/include/sys/vdev_impl.h +++ b/include/sys/vdev_impl.h @@ -177,6 +177,7 @@ struct vdev { uint64_t vdev_islog; /* is an intent log device */ uint64_t vdev_removing; /* device is being removed? */ boolean_t vdev_ishole; /* is a hole in the namespace */ + uint64_t vdev_top_zap; /* * Leaf vdev state. @@ -215,6 +216,7 @@ struct vdev { spa_aux_vdev_t *vdev_aux; /* for l2cache and spares vdevs */ zio_t *vdev_probe_zio; /* root of current probe */ vdev_aux_t vdev_label_aux; /* on-disk aux state */ + uint64_t vdev_leaf_zap; /* * For DTrace to work in userland (libzpool) context, these fields must |