MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ddt_bp_create

Function ddt_bp_create

freebsd/contrib/openzfs/module/zfs/ddt.c:275–296  ·  view source on GitHub ↗

* The bp created via this function may be used for repairs and scrub, but it * will be missing the salt / IV required to do a full decrypting read. */

Source from the content-addressed store, hash-verified

273 * will be missing the salt / IV required to do a full decrypting read.
274 */
275void
276ddt_bp_create(enum zio_checksum checksum,
277 const ddt_key_t *ddk, const ddt_phys_t *ddp, blkptr_t *bp)
278{
279 BP_ZERO(bp);
280
281 if (ddp != NULL)
282 ddt_bp_fill(ddp, bp, ddp->ddp_phys_birth);
283
284 bp->blk_cksum = ddk->ddk_cksum;
285
286 BP_SET_LSIZE(bp, DDK_GET_LSIZE(ddk));
287 BP_SET_PSIZE(bp, DDK_GET_PSIZE(ddk));
288 BP_SET_COMPRESS(bp, DDK_GET_COMPRESS(ddk));
289 BP_SET_CRYPT(bp, DDK_GET_CRYPT(ddk));
290 BP_SET_FILL(bp, 1);
291 BP_SET_CHECKSUM(bp, checksum);
292 BP_SET_TYPE(bp, DMU_OT_DEDUP);
293 BP_SET_LEVEL(bp, 0);
294 BP_SET_DEDUP(bp, 1);
295 BP_SET_BYTEORDER(bp, ZFS_HOST_BYTEORDER);
296}
297
298void
299ddt_key_fill(ddt_key_t *ddk, const blkptr_t *bp)

Callers 7

ddt_phys_freeFunction · 0.85
ddt_repair_entryFunction · 0.85
ddt_repair_tableFunction · 0.85
dsl_scan_ddt_entryFunction · 0.85
zio_ddt_read_startFunction · 0.85
dump_ddeFunction · 0.85
zdb_ddt_leak_initFunction · 0.85

Calls 1

ddt_bp_fillFunction · 0.85

Tested by

no test coverage detected