diff --git a/include/sys/ddt.h b/include/sys/ddt.h index a11324209d..013692c96d 100644 --- a/include/sys/ddt.h +++ b/include/sys/ddt.h @@ -68,7 +68,7 @@ _Static_assert(DDT_CLASSES < UINT8_MAX, /* * On-disk ddt entry: key (name) and physical storage (value). */ -typedef struct ddt_key { +typedef struct { zio_cksum_t ddk_cksum; /* 256-bit block checksum */ /* * Encoded with logical & physical size, encryption, and compression, @@ -96,7 +96,7 @@ typedef struct ddt_key { #define DDK_GET_CRYPT(ddk) BF64_GET((ddk)->ddk_prop, 39, 1) #define DDK_SET_CRYPT(ddk, x) BF64_SET((ddk)->ddk_prop, 39, 1, x) -typedef struct ddt_phys { +typedef struct { dva_t ddp_dva[SPA_DVAS_PER_BP]; uint64_t ddp_refcnt; uint64_t ddp_phys_birth; @@ -117,7 +117,7 @@ enum ddt_phys_type { /* * In-core ddt entry */ -struct ddt_entry { +typedef struct { /* key must be first for ddt_key_compare */ ddt_key_t dde_key; ddt_phys_t dde_phys[DDT_PHYS_TYPES]; @@ -129,12 +129,12 @@ struct ddt_entry { uint8_t dde_loaded; kcondvar_t dde_cv; avl_node_t dde_node; -}; +} ddt_entry_t; /* * In-core ddt */ -struct ddt { +typedef struct { kmutex_t ddt_lock; avl_tree_t ddt_tree; avl_tree_t ddt_repair_tree; @@ -147,12 +147,12 @@ struct ddt { ddt_histogram_t ddt_histogram_cache[DDT_TYPES][DDT_CLASSES]; ddt_object_t ddt_object_stats[DDT_TYPES][DDT_CLASSES]; avl_node_t ddt_node; -}; +} ddt_t; /* * In-core and on-disk bookmark for DDT walks */ -typedef struct ddt_bookmark { +typedef struct { uint64_t ddb_class; uint64_t ddb_type; uint64_t ddb_checksum; diff --git a/include/sys/ddt_impl.h b/include/sys/ddt_impl.h index 9960f96668..09937c7146 100644 --- a/include/sys/ddt_impl.h +++ b/include/sys/ddt_impl.h @@ -36,7 +36,7 @@ extern "C" { /* * Ops vector to access a specific DDT object type. */ -typedef struct ddt_ops { +typedef struct { char ddt_op_name[32]; int (*ddt_op_create)(objset_t *os, uint64_t *object, dmu_tx_t *tx, boolean_t prehash); diff --git a/include/sys/spa.h b/include/sys/spa.h index 08099cd4fa..cada3c8410 100644 --- a/include/sys/spa.h +++ b/include/sys/spa.h @@ -62,8 +62,6 @@ typedef struct metaslab_class metaslab_class_t; typedef struct zio zio_t; typedef struct zilog zilog_t; typedef struct spa_aux_vdev spa_aux_vdev_t; -typedef struct ddt ddt_t; -typedef struct ddt_entry ddt_entry_t; typedef struct zbookmark_phys zbookmark_phys_t; typedef struct zbookmark_err_phys zbookmark_err_phys_t;