mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Introduce dedupused/dedupsaved pool properties
Currently there is only a dedup ratio reported via pool properties. If dedup is enabled only for some datasets, it is impossible to say how much space the ratio actually covers. Fix this by introducing dedupused/dedupsaved pool properties, similar to earlier added block cloning ones. Combined with work to expose allocation classes stats, it should give user-space enough visibility to correlate `zpool list` and `zfs list` space numbers. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Ryan Moeller <ryan.moeller@klarasystems.com> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Closes #18245
This commit is contained in:
@@ -3370,7 +3370,9 @@
|
||||
<enumerator name='ZPOOL_PROP_DEDUP_TABLE_QUOTA' value='37'/>
|
||||
<enumerator name='ZPOOL_PROP_DEDUPCACHED' value='38'/>
|
||||
<enumerator name='ZPOOL_PROP_LAST_SCRUBBED_TXG' value='39'/>
|
||||
<enumerator name='ZPOOL_NUM_PROPS' value='40'/>
|
||||
<enumerator name='ZPOOL_PROP_DEDUPUSED' value='40'/>
|
||||
<enumerator name='ZPOOL_PROP_DEDUPSAVED' value='41'/>
|
||||
<enumerator name='ZPOOL_NUM_PROPS' value='42'/>
|
||||
</enum-decl>
|
||||
<typedef-decl name='zpool_prop_t' type-id='af1ba157' id='5d0c23fb'/>
|
||||
<typedef-decl name='regoff_t' type-id='95e97e5e' id='54a2a2a8'/>
|
||||
|
||||
@@ -380,6 +380,8 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf,
|
||||
case ZPOOL_PROP_BCLONESAVED:
|
||||
case ZPOOL_PROP_BCLONEUSED:
|
||||
case ZPOOL_PROP_DEDUP_TABLE_SIZE:
|
||||
case ZPOOL_PROP_DEDUPUSED:
|
||||
case ZPOOL_PROP_DEDUPSAVED:
|
||||
case ZPOOL_PROP_DEDUPCACHED:
|
||||
if (literal)
|
||||
(void) snprintf(buf, len, "%llu",
|
||||
|
||||
Reference in New Issue
Block a user