Files
mirror_zfs/include
Alexander Motin d06a1d9ac3 Fix available space accounting for special/dedup (#18222)
Currently, spa_dspace (base to calculate dataset AVAIL) only includes
the normal allocation class capacity, but dd_used_bytes tracks space
allocated across all classes.  Since we don't want to report free
space of other classes as available (we can't promise new allocations
will be able to use it), report only allocated space, similar to how
we report space saved by dedup and block cloning.

Since we need deflated space here, make allocation classes track
deflated allocated space also.  While here, make mc_deferred also
deflated, matching its use contexts.  Also while there, use
atomic_load() to read the allocation class stats.

Reviewed-by: Rob Norris <robn@despairlabs.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com>
Closes #18190
Closes #18222
2026-02-19 10:36:35 -08:00
..
2025-03-13 17:56:54 -07:00
2025-03-13 17:56:27 -07:00
2024-02-05 10:00:41 -08:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2025-08-06 10:36:56 -07:00
2025-03-13 17:56:27 -07:00
2025-08-06 10:31:21 -07:00
2025-09-12 09:53:31 -07:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00
2025-03-13 17:56:27 -07:00