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

Function dnode_setdblksz

freebsd/contrib/openzfs/module/zfs/dnode.c:431–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

429}
430
431static void
432dnode_setdblksz(dnode_t *dn, int size)
433{
434 ASSERT0(P2PHASE(size, SPA_MINBLOCKSIZE));
435 ASSERT3U(size, <=, SPA_MAXBLOCKSIZE);
436 ASSERT3U(size, >=, SPA_MINBLOCKSIZE);
437 ASSERT3U(size >> SPA_MINBLOCKSHIFT, <,
438 1<<(sizeof (dn->dn_phys->dn_datablkszsec) * 8));
439 dn->dn_datablksz = size;
440 dn->dn_datablkszsec = size >> SPA_MINBLOCKSHIFT;
441 dn->dn_datablkshift = ISP2(size) ? highbit64(size - 1) : 0;
442}
443
444static dnode_t *
445dnode_create(objset_t *os, dnode_phys_t *dnp, dmu_buf_impl_t *db,

Callers 4

dnode_createFunction · 0.85
dnode_allocateFunction · 0.85
dnode_reallocateFunction · 0.85
dnode_set_blkszFunction · 0.85

Calls 1

highbit64Function · 0.50

Tested by

no test coverage detected