mirror_zfs/module
Alexander Motin 3dcd071b51 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 11:14:37 -08:00
..
avl Prefer VERIFY0P(n) over VERIFY(n == NULL) 2025-08-07 11:41:37 -07:00
icp Linux 6.19 compat: in-tree build: fix duplicate GCM assembly functions 2026-02-17 13:52:43 -08:00
lua SPDX: license tags: MIT 2025-03-13 17:56:54 -07:00
nvpair nvpair: chase FreeBSD xdrproc_t definition 2026-02-05 13:48:31 -08:00
os zfs_vnops_os.c: Move a vput() to after zfs_setattr_dir() 2026-02-17 11:54:58 -08:00
unicode SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zcommon Add knob to disable slow io notifications 2025-11-12 13:07:14 -08:00
zfs Fix available space accounting for special/dedup (#18222) 2026-02-19 11:14:37 -08:00
zstd zstd: disable intrinsics 2025-11-12 13:06:22 -08:00
.gitignore FreeBSD: Ignore symlink to i386 includes 2022-08-02 16:34:23 -07:00
Kbuild.in spl: lift 64-bit math compat out to separate file 2026-02-05 13:48:31 -08:00
Makefile.bsd FreeBSD: Remove references to DEBUG_VFS_LOCKS 2026-02-05 13:48:31 -08:00
Makefile.in Fix --enable-invariants on FreeBSD 2026-02-05 13:48:31 -08:00