mirror_zfs/lib/libzfs
Paul Dagnelie 246e5883bb
Implement allocation size ranges and use for gang leaves (#17111)
When forced to resort to ganging, ZFS currently allocates three child
blocks, each one third of the size of the original. This is true
regardless of whether larger allocations could be made, which would
allow us to have fewer gang leaves. This improves performance when
fragmentation is high enough to require ganging, but not so high that
all the free ranges are only just big enough to hold a third of the
recordsize. This is also useful for improving the behavior of a future
change to allow larger gang headers.

We add the ability for the allocation codepath to allocate a range of
sizes instead of a single fixed size. We then use this to pre-allocate
the DVAs for the gang children. If those allocations fail, we fall back
to the normal write path, which will likely re-gang.

Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com>
Co-authored-by: Paul Dagnelie <paul.dagnelie@klarasystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
2025-05-02 15:32:18 -07:00
..
os SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
.gitignore Clean up lib dependencies 2020-07-10 14:26:00 -07:00
libzfs_changelist.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzfs_config.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzfs_crypto.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzfs_dataset.c Implement allocation size ranges and use for gang leaves (#17111) 2025-05-02 15:32:18 -07:00
libzfs_diff.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzfs_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzfs_import.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzfs_iter.c Sort the blocking snapshots list #12751 (#17264) 2025-05-01 17:40:23 -07:00
libzfs_mount.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzfs_pool.c vdev_to_nvlist_iter: ignore draid parameters when matching names (#17228) 2025-04-14 17:10:48 -07:00
libzfs_sendrecv.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzfs_status.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzfs_util.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzfs.abi nvlist: Add nvlist_snprintf() and zfs_dbgmsg_nvlist() 2025-04-18 09:22:16 -04:00
libzfs.pc.in Spruce up pkg-config files for libzfs/libzfs_core 2020-09-04 11:11:18 -07:00
libzfs.suppr Library ABI tracking with abigail 2020-11-17 09:18:52 -08:00
Makefile.am Bump SONAME of libzfs and libzpool 2024-10-06 14:49:33 -07:00
THIRDPARTYLICENSE.openssl Fix typos in lib/ 2019-09-02 17:53:27 -07:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00