mirror_zfs/man/man7
Rob Norris db2b1fdb79 ddt: add FDT feature and support for legacy and new on-disk formats
This is the supporting infrastructure for the upcoming dedup features.

Traditionally, dedup objects live directly in the MOS root. While their
details vary (checksum, type and class), they are all the same "kind" of
thing - a store of dedup entries.

The new features are more varied than that, and are better thought of as
a set of related stores for the overall state of a dedup table.

This adds a new feature flag, SPA_FEATURE_FAST_DEDUP. Enabling this will
cause new DDTs to be created as a ZAP in the MOS root, named
DDT-<checksum>. The is used as the root object for the normal type/class
store objects, but will also be a place for any storage required by new
features.

This commit adds two new fields to ddt_t, for version and flags. These
are intended to describe the structure and features of the overall dedup
table, and are stored as-is in the DDT root. In this commit, flags are
always zero, but the intent is that they can be used to hang optional
logic or state onto for new dedup features. Version is always 1.

For a "legacy" dedup table, where no DDT root directory exists, the
version will be 0.

ddt_configure() is expected to determine the version and flags features
currently in operation based on whether or not the fast_dedup feature is
enabled, and from what's available on disk. In this way, its possible to
support both old and new tables.

This also provides a migration path. A legacy setup can be upgraded to
FDT by creating the DDT root ZAP, moving the existing objects into it,
and setting version and flags appropriately. There's no support for that
here, but it would be straightforward to add later and allows the
possibility that newer features could be applied to existing dedup
tables.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Sponsored-by: Klara, Inc.
Sponsored-by: iXsystems, Inc.
Closes #15892
2024-08-16 11:58:59 -07:00
..
dracut.zfs.7 one-word manpage correction: snapshot->rollback (#16294) 2024-07-12 16:27:12 -07:00
vdevprops.7 Add some missing vdev properties (#16346) 2024-07-23 16:34:09 -07:00
zfsconcepts.7 zfsconcepts: add description of block cloning 2023-10-06 09:06:29 -07:00
zfsprops.7 Add support for multiple lines to the sharenfs property for FreeBSD (#16338) 2024-07-23 16:38:19 -07:00
zpool-features.7 ddt: add FDT feature and support for legacy and new on-disk formats 2024-08-16 11:58:59 -07:00
zpoolconcepts.7 Add slow disk diagnosis to ZED 2024-02-08 09:19:52 -08:00
zpoolprops.7 zpoolprops.7: Fix max length of name of user property 2024-08-08 15:23:33 -07:00