ZFS embedded data
ZFS embedded data stores a sufficiently small compressed block inside its block pointer instead of allocating a separate data block.
The payload ceiling is 112 bytes inside a 128-byte pointer (14 eight-byte words). This is compressed payload size, not logical file size or total metadata cost. Encryption uses the same space for parameters, so encrypted pointers cannot embed data. [2]
In the zfs-2.3.0 normal compression path, embedding also requires a smaller-than-logical payload, no deduplication or encryption, level zero, an eligible object type and the enabled feature. All-zero data takes a separate hole path. A 112-byte payload fits the size limit; 113 bytes does not. Size alone is insufficient. [3]
The embedded_data feature becomes active immediately when enabled and is not read-only compatible. Import/recovery software must support it; this is not a recommendation to upgrade a pool. [1]
zfs send -e can emit WRITE_EMBEDDED records. The receiver needs embedded_data and, when active at the sender, lz4_compress. This stream cannot be received as an encrypted dataset. Compact transmission and target encryption are separate requirements. [4]
Relations
- related
- ZFS, ZFS recordsize, Lossless compression, ZFS raw send
Citations
- OpenZFS 2.3: zpool-features(7), embedded_data
- OpenZFS zfs-2.3.0: spa.h, embedded block-pointer layout
- OpenZFS zfs-2.3.0: zio_write_compress, embedded-data and hole branches
- OpenZFS 2.3: zfs-send(8), --embed receiver requirements
Sources & caveats
- Source review of OpenZFS 2.3 documentation and the zfs-2.3.0 normal write path; no pool, benchmark or send/receive experiment.
- The 112/113-byte comparison checks only payload capacity, not complete allocation eligibility.