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

Function bpobj_alloc

freebsd/contrib/openzfs/module/zfs/bpobj.c:77–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77uint64_t
78bpobj_alloc(objset_t *os, int blocksize, dmu_tx_t *tx)
79{
80 int size;
81
82 if (spa_version(dmu_objset_spa(os)) < SPA_VERSION_BPOBJ_ACCOUNT)
83 size = BPOBJ_SIZE_V0;
84 else if (spa_version(dmu_objset_spa(os)) < SPA_VERSION_DEADLISTS)
85 size = BPOBJ_SIZE_V1;
86 else if (!spa_feature_is_active(dmu_objset_spa(os),
87 SPA_FEATURE_LIVELIST))
88 size = BPOBJ_SIZE_V2;
89 else
90 size = sizeof (bpobj_phys_t);
91
92 return (dmu_object_alloc(os, DMU_OT_BPOBJ, blocksize,
93 DMU_OT_BPOBJ_HDR, size, tx));
94}
95
96void
97bpobj_free(objset_t *os, uint64_t obj, dmu_tx_t *tx)

Callers 6

bpobj_alloc_emptyFunction · 0.85
dsl_deadlist_allocFunction · 0.85
dle_enqueueFunction · 0.85
dsl_pool_createFunction · 0.85
spa_createFunction · 0.85

Calls 4

spa_versionFunction · 0.85
dmu_objset_spaFunction · 0.85
spa_feature_is_activeFunction · 0.85
dmu_object_allocFunction · 0.85

Tested by

no test coverage detected