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

Function blkid2offset

freebsd/contrib/openzfs/cmd/zdb/zdb.c:2143–2159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2141}
2142
2143static uint64_t
2144blkid2offset(const dnode_phys_t *dnp, const blkptr_t *bp,
2145 const zbookmark_phys_t *zb)
2146{
2147 if (dnp == NULL) {
2148 ASSERT(zb->zb_level < 0);
2149 if (zb->zb_object == 0)
2150 return (zb->zb_blkid);
2151 return (zb->zb_blkid * BP_GET_LSIZE(bp));
2152 }
2153
2154 ASSERT(zb->zb_level >= 0);
2155
2156 return ((zb->zb_blkid <<
2157 (zb->zb_level * (dnp->dn_indblkshift - SPA_BLKPTRSHIFT))) *
2158 dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT);
2159}
2160
2161static void
2162snprintf_zstd_header(spa_t *spa, char *blkbuf, size_t buflen,

Callers 2

print_indirectFunction · 0.85
zdb_blkptr_cbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected