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

Function snprintf_blkptr

freebsd/contrib/openzfs/module/zfs/spa_misc.c:1519–1547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1517}
1518
1519void
1520snprintf_blkptr(char *buf, size_t buflen, const blkptr_t *bp)
1521{
1522 char type[256];
1523 char *checksum = NULL;
1524 char *compress = NULL;
1525
1526 if (bp != NULL) {
1527 if (BP_GET_TYPE(bp) & DMU_OT_NEWTYPE) {
1528 dmu_object_byteswap_t bswap =
1529 DMU_OT_BYTESWAP(BP_GET_TYPE(bp));
1530 (void) snprintf(type, sizeof (type), "bswap %s %s",
1531 DMU_OT_IS_METADATA(BP_GET_TYPE(bp)) ?
1532 "metadata" : "data",
1533 dmu_ot_byteswap[bswap].ob_name);
1534 } else {
1535 (void) strlcpy(type, dmu_ot[BP_GET_TYPE(bp)].ot_name,
1536 sizeof (type));
1537 }
1538 if (!BP_IS_EMBEDDED(bp)) {
1539 checksum =
1540 zio_checksum_table[BP_GET_CHECKSUM(bp)].ci_name;
1541 }
1542 compress = zio_compress_table[BP_GET_COMPRESS(bp)].ci_name;
1543 }
1544
1545 SNPRINTF_BLKPTR(snprintf, ' ', buf, buflen, bp, type, checksum,
1546 compress);
1547}
1548
1549void
1550spa_freeze(spa_t *spa)

Callers 12

print_log_bpFunction · 0.85
print_log_blockFunction · 0.85
dump_ddeFunction · 0.85
snprintf_blkptr_compactFunction · 0.85
dump_dsl_datasetFunction · 0.85
dump_bptree_cbFunction · 0.85
dump_objsetFunction · 0.85
dump_uberblockFunction · 0.85
zdb_blkptr_doneFunction · 0.85
zdb_blkptr_cbFunction · 0.85
count_block_cbFunction · 0.85
zdb_print_blkptrFunction · 0.85

Calls 2

snprintfFunction · 0.85
strlcpyFunction · 0.50

Tested by

no test coverage detected