mirror_zfs/module
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
..
avl SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
icp SPDX: license tags: LicenseRef-OpenZFS-ThirdParty-PublicDomain 2025-03-13 17:57:31 -07:00
lua SPDX: license tags: MIT 2025-03-13 17:56:54 -07:00
nvpair nvlist: Add nvlist_snprintf() and zfs_dbgmsg_nvlist() 2025-04-18 09:22:16 -04:00
os Linux 6.0 compat: Check for migratepage VFS (#17217) 2025-04-10 17:36:31 -07:00
unicode SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zcommon GCC 15: Fix unterminated-string-initialization (#17244) 2025-04-16 09:33:29 -07:00
zfs Handle interaction between gang blocks, copies, and FDT. 2025-04-21 11:26:30 -04:00
zstd SPDX: license tags: BSD-3-Clause OR GPL-2.0-only 2025-03-13 17:57:17 -07:00
.gitignore FreeBSD: Ignore symlink to i386 includes 2022-08-02 16:34:23 -07:00
Kbuild.in nvlist: Add nvlist_snprintf() and zfs_dbgmsg_nvlist() 2025-04-18 09:22:16 -04:00
Makefile.bsd freebsd: unbreak module/Makefile.bsd build on 15-CURRENT-arm64 2025-04-05 19:43:41 -04:00
Makefile.in Fix "make install" with DESTDIR set (#16995) 2025-02-07 16:38:58 -08:00