mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 03:19:35 +03:00
ddt: remove struct names and forward declarations
Things get confused when there's more than one name for a thing. Note that we don't do this for ddt_object_t, ddt_histogram_t and ddt_stat_t because they're part of the public ZFS interface. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Sponsored-by: Klara, Inc. Sponsored-by: iXsystems, Inc. Closes #15887
This commit is contained in:
parent
c8f694fe39
commit
3bad70040a
@ -68,7 +68,7 @@ _Static_assert(DDT_CLASSES < UINT8_MAX,
|
|||||||
/*
|
/*
|
||||||
* On-disk ddt entry: key (name) and physical storage (value).
|
* 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 */
|
zio_cksum_t ddk_cksum; /* 256-bit block checksum */
|
||||||
/*
|
/*
|
||||||
* Encoded with logical & physical size, encryption, and compression,
|
* 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_GET_CRYPT(ddk) BF64_GET((ddk)->ddk_prop, 39, 1)
|
||||||
#define DDK_SET_CRYPT(ddk, x) BF64_SET((ddk)->ddk_prop, 39, 1, x)
|
#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];
|
dva_t ddp_dva[SPA_DVAS_PER_BP];
|
||||||
uint64_t ddp_refcnt;
|
uint64_t ddp_refcnt;
|
||||||
uint64_t ddp_phys_birth;
|
uint64_t ddp_phys_birth;
|
||||||
@ -117,7 +117,7 @@ enum ddt_phys_type {
|
|||||||
/*
|
/*
|
||||||
* In-core ddt entry
|
* In-core ddt entry
|
||||||
*/
|
*/
|
||||||
struct ddt_entry {
|
typedef struct {
|
||||||
/* key must be first for ddt_key_compare */
|
/* key must be first for ddt_key_compare */
|
||||||
ddt_key_t dde_key;
|
ddt_key_t dde_key;
|
||||||
ddt_phys_t dde_phys[DDT_PHYS_TYPES];
|
ddt_phys_t dde_phys[DDT_PHYS_TYPES];
|
||||||
@ -129,12 +129,12 @@ struct ddt_entry {
|
|||||||
uint8_t dde_loaded;
|
uint8_t dde_loaded;
|
||||||
kcondvar_t dde_cv;
|
kcondvar_t dde_cv;
|
||||||
avl_node_t dde_node;
|
avl_node_t dde_node;
|
||||||
};
|
} ddt_entry_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In-core ddt
|
* In-core ddt
|
||||||
*/
|
*/
|
||||||
struct ddt {
|
typedef struct {
|
||||||
kmutex_t ddt_lock;
|
kmutex_t ddt_lock;
|
||||||
avl_tree_t ddt_tree;
|
avl_tree_t ddt_tree;
|
||||||
avl_tree_t ddt_repair_tree;
|
avl_tree_t ddt_repair_tree;
|
||||||
@ -147,12 +147,12 @@ struct ddt {
|
|||||||
ddt_histogram_t ddt_histogram_cache[DDT_TYPES][DDT_CLASSES];
|
ddt_histogram_t ddt_histogram_cache[DDT_TYPES][DDT_CLASSES];
|
||||||
ddt_object_t ddt_object_stats[DDT_TYPES][DDT_CLASSES];
|
ddt_object_t ddt_object_stats[DDT_TYPES][DDT_CLASSES];
|
||||||
avl_node_t ddt_node;
|
avl_node_t ddt_node;
|
||||||
};
|
} ddt_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In-core and on-disk bookmark for DDT walks
|
* In-core and on-disk bookmark for DDT walks
|
||||||
*/
|
*/
|
||||||
typedef struct ddt_bookmark {
|
typedef struct {
|
||||||
uint64_t ddb_class;
|
uint64_t ddb_class;
|
||||||
uint64_t ddb_type;
|
uint64_t ddb_type;
|
||||||
uint64_t ddb_checksum;
|
uint64_t ddb_checksum;
|
||||||
|
@ -36,7 +36,7 @@ extern "C" {
|
|||||||
/*
|
/*
|
||||||
* Ops vector to access a specific DDT object type.
|
* Ops vector to access a specific DDT object type.
|
||||||
*/
|
*/
|
||||||
typedef struct ddt_ops {
|
typedef struct {
|
||||||
char ddt_op_name[32];
|
char ddt_op_name[32];
|
||||||
int (*ddt_op_create)(objset_t *os, uint64_t *object, dmu_tx_t *tx,
|
int (*ddt_op_create)(objset_t *os, uint64_t *object, dmu_tx_t *tx,
|
||||||
boolean_t prehash);
|
boolean_t prehash);
|
||||||
|
@ -62,8 +62,6 @@ typedef struct metaslab_class metaslab_class_t;
|
|||||||
typedef struct zio zio_t;
|
typedef struct zio zio_t;
|
||||||
typedef struct zilog zilog_t;
|
typedef struct zilog zilog_t;
|
||||||
typedef struct spa_aux_vdev spa_aux_vdev_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_phys zbookmark_phys_t;
|
||||||
typedef struct zbookmark_err_phys zbookmark_err_phys_t;
|
typedef struct zbookmark_err_phys zbookmark_err_phys_t;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user