mirror_zfs/module
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
..
avl Prefer VERIFY0P(n) over VERIFY(n == NULL) 2025-08-07 11:41:37 -07:00
icp ICP: AES-GCM assembly: remove unused Gmul functions 2026-02-19 10:10:02 -08:00
lua SPDX: license tags: MIT 2025-03-13 17:56:54 -07:00
nvpair nvpair: chase FreeBSD xdrproc_t definition 2026-01-28 21:41:33 -05:00
os zfs_vnops_os.c: Move a vput() to after zfs_setattr_dir() 2026-02-10 09:29:37 -05:00
zcommon Add snapshots_changed_nsecs dataset property 2026-01-06 09:36:20 -08:00
zfs Fix available space accounting for special/dedup (#18222) 2026-02-19 10:36:35 -08:00
zstd Zstd: Document update policy 2026-01-20 13:41:24 -08:00
.gitignore FreeBSD: Ignore symlink to i386 includes 2022-08-02 16:34:23 -07:00
Kbuild.in Zstd: Integrate v1.5.7 into the ZFS build system 2026-01-20 13:41:06 -08:00
Makefile.bsd Zstd: Integrate v1.5.7 into the ZFS build system 2026-01-20 13:41:06 -08:00
Makefile.in Fix --enable-invariants on FreeBSD 2026-01-14 14:54:12 -08:00