mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Add zpool properties for allocation class space
The existing zpool properties accounting pool space (size, allocated, fragmentation, expandsize, free, capacity) are based on the normal metaslab class or are cumulative properties of several classes combined. Add properties reporting the space accounting metrics for each metaslab class individually. Also introduce pool-wide AVAIL, USABLE, and USED properties reporting values corresponding to FREE, SIZE, and ALLOC deflated for raidz. Update ZTS to recognize the new properties and validate reported values. While in zpool_get_parsable.cfg, add "fragmentation" to the list of parsable properties. Sponsored-by: Klara, Inc. Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ameer Hamza <ahamza@ixsystems.com> Signed-off-by: Ryan Moeller <ryan.moeller@klarasystems.com> Cloes #18238
This commit is contained in:
committed by
Brian Behlendorf
parent
6ba3f915d0
commit
ac0fd40c8c
@@ -275,9 +275,90 @@ typedef enum {
|
||||
ZPOOL_PROP_LAST_SCRUBBED_TXG,
|
||||
ZPOOL_PROP_DEDUPUSED,
|
||||
ZPOOL_PROP_DEDUPSAVED,
|
||||
ZPOOL_PROP_AVAILABLE,
|
||||
ZPOOL_PROP_USABLE,
|
||||
ZPOOL_PROP_USED,
|
||||
ZPOOL_PROP_NORMAL_SIZE,
|
||||
ZPOOL_PROP_NORMAL_CAPACITY,
|
||||
ZPOOL_PROP_NORMAL_FREE,
|
||||
ZPOOL_PROP_NORMAL_ALLOCATED,
|
||||
ZPOOL_PROP_NORMAL_AVAILABLE,
|
||||
ZPOOL_PROP_NORMAL_USABLE,
|
||||
ZPOOL_PROP_NORMAL_USED,
|
||||
ZPOOL_PROP_NORMAL_EXPANDSZ,
|
||||
ZPOOL_PROP_NORMAL_FRAGMENTATION,
|
||||
ZPOOL_PROP_SPECIAL_SIZE,
|
||||
ZPOOL_PROP_SPECIAL_CAPACITY,
|
||||
ZPOOL_PROP_SPECIAL_FREE,
|
||||
ZPOOL_PROP_SPECIAL_ALLOCATED,
|
||||
ZPOOL_PROP_SPECIAL_AVAILABLE,
|
||||
ZPOOL_PROP_SPECIAL_USABLE,
|
||||
ZPOOL_PROP_SPECIAL_USED,
|
||||
ZPOOL_PROP_SPECIAL_EXPANDSZ,
|
||||
ZPOOL_PROP_SPECIAL_FRAGMENTATION,
|
||||
ZPOOL_PROP_DEDUP_SIZE,
|
||||
ZPOOL_PROP_DEDUP_CAPACITY,
|
||||
ZPOOL_PROP_DEDUP_FREE,
|
||||
ZPOOL_PROP_DEDUP_ALLOCATED,
|
||||
ZPOOL_PROP_DEDUP_AVAILABLE,
|
||||
ZPOOL_PROP_DEDUP_USABLE,
|
||||
ZPOOL_PROP_DEDUP_USED,
|
||||
ZPOOL_PROP_DEDUP_EXPANDSZ,
|
||||
ZPOOL_PROP_DEDUP_FRAGMENTATION,
|
||||
ZPOOL_PROP_LOG_SIZE,
|
||||
ZPOOL_PROP_LOG_CAPACITY,
|
||||
ZPOOL_PROP_LOG_FREE,
|
||||
ZPOOL_PROP_LOG_ALLOCATED,
|
||||
ZPOOL_PROP_LOG_AVAILABLE,
|
||||
ZPOOL_PROP_LOG_USABLE,
|
||||
ZPOOL_PROP_LOG_USED,
|
||||
ZPOOL_PROP_LOG_EXPANDSZ,
|
||||
ZPOOL_PROP_LOG_FRAGMENTATION,
|
||||
ZPOOL_PROP_ELOG_SIZE,
|
||||
ZPOOL_PROP_ELOG_CAPACITY,
|
||||
ZPOOL_PROP_ELOG_FREE,
|
||||
ZPOOL_PROP_ELOG_ALLOCATED,
|
||||
ZPOOL_PROP_ELOG_AVAILABLE,
|
||||
ZPOOL_PROP_ELOG_USABLE,
|
||||
ZPOOL_PROP_ELOG_USED,
|
||||
ZPOOL_PROP_ELOG_EXPANDSZ,
|
||||
ZPOOL_PROP_ELOG_FRAGMENTATION,
|
||||
ZPOOL_PROP_SELOG_SIZE,
|
||||
ZPOOL_PROP_SELOG_CAPACITY,
|
||||
ZPOOL_PROP_SELOG_FREE,
|
||||
ZPOOL_PROP_SELOG_ALLOCATED,
|
||||
ZPOOL_PROP_SELOG_AVAILABLE,
|
||||
ZPOOL_PROP_SELOG_USABLE,
|
||||
ZPOOL_PROP_SELOG_USED,
|
||||
ZPOOL_PROP_SELOG_EXPANDSZ,
|
||||
ZPOOL_PROP_SELOG_FRAGMENTATION,
|
||||
ZPOOL_NUM_PROPS
|
||||
} zpool_prop_t;
|
||||
|
||||
/* Offsets for metaslab class properties. */
|
||||
typedef enum {
|
||||
ZPOOL_MC_PROP_SIZE,
|
||||
ZPOOL_MC_PROP_CAPACITY,
|
||||
ZPOOL_MC_PROP_FREE,
|
||||
ZPOOL_MC_PROP_ALLOCATED,
|
||||
ZPOOL_MC_PROP_AVAILABLE,
|
||||
ZPOOL_MC_PROP_USABLE,
|
||||
ZPOOL_MC_PROP_USED,
|
||||
ZPOOL_MC_PROP_EXPANDSZ,
|
||||
ZPOOL_MC_PROP_FRAGMENTATION,
|
||||
ZPOOL_NUM_MC_PROPS
|
||||
} zpool_mc_prop_t;
|
||||
|
||||
/* Offsets for metaslab class property groups. */
|
||||
typedef enum {
|
||||
ZPOOL_MC_PROPS_NORMAL = ZPOOL_PROP_NORMAL_SIZE,
|
||||
ZPOOL_MC_PROPS_SPECIAL = ZPOOL_PROP_SPECIAL_SIZE,
|
||||
ZPOOL_MC_PROPS_DEDUP = ZPOOL_PROP_DEDUP_SIZE,
|
||||
ZPOOL_MC_PROPS_LOG = ZPOOL_PROP_LOG_SIZE,
|
||||
ZPOOL_MC_PROPS_ELOG = ZPOOL_PROP_ELOG_SIZE,
|
||||
ZPOOL_MC_PROPS_SELOG = ZPOOL_PROP_SELOG_SIZE,
|
||||
} zpool_mc_props_t;
|
||||
|
||||
/* Small enough to not hog a whole line of printout in zpool(8). */
|
||||
#define ZPROP_MAX_COMMENT 32
|
||||
#define ZPROP_BOOLEAN_NA 2
|
||||
|
||||
Reference in New Issue
Block a user