mirror_zfs/include
Paul Dagnelie 5f5321effa
Handle interaction between gang blocks, copies, and FDT.
With the advent of fast dedup, there are no longer separate dedup tables
for different copies values. There is now logic that will add DVAs to
the dedup table entry if more copies are needed for new writes. However,
this interacts poorly with ganging. There are two different cases that
can result in mixed gang/non-gang BPs, which are illegal in ZFS.

This change modifies updates of existing FDT; if there are already gang
DVAs in the FDT, we prevent the new write from extending the DDT
entry. We cannot safely mix different gang trees in one block
pointer. if there are non-gang DVAs in the FDT, then this allocation may
not be gangs. If it would gang, we have to redo the whole write as a
non-dedup write.

This change also fixes a refcount leak that could occur if the lead DDT
write failed.

Sponsored by: iXsystems, Inc.
Sponsored-by: Klara, Inc.
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com>
Closes: #17123
2025-04-21 11:26:30 -04:00
..
os Cleanup VERIFY() macros (#17163) 2025-04-16 09:01:32 -07:00
sys Handle interaction between gang blocks, copies, and FDT. 2025-04-21 11:26:30 -04:00
.gitignore OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00
cityhash.h SPDX: license tags: MIT 2025-03-13 17:56:54 -07:00
libnvpair.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libuutil_common.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libuutil_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libuutil.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzdb.h libzdb: Initial breakout of libzdb 2024-02-05 10:00:41 -08:00
libzfs_core.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzfs.h Show default quotas in zfs userspace tools 2025-04-03 10:36:45 -07:00
libzfsbootenv.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzutil.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
Makefile.am include: move zio_priority_t into zfs.h 2025-02-22 18:46:26 -05:00
thread_pool.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfeature_common.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_comutil.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_deleg.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_fletcher.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_namecheck.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_prop.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_valstr.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00