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

Function space_range_cb

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

ARGSUSED */

Source from the content-addressed store, hash-verified

862
863/* ARGSUSED */
864static int
865space_range_cb(void *arg, const blkptr_t *bp, boolean_t bp_freed, dmu_tx_t *tx)
866{
867 struct space_range_arg *sra = arg;
868
869 if (bp->blk_birth > sra->mintxg && bp->blk_birth <= sra->maxtxg) {
870 if (dsl_pool_sync_context(spa_get_dsl(sra->spa)))
871 sra->used += bp_get_dsize_sync(sra->spa, bp);
872 else
873 sra->used += bp_get_dsize(sra->spa, bp);
874 sra->comp += BP_GET_PSIZE(bp);
875 sra->uncomp += BP_GET_UCSIZE(bp);
876 }
877 return (0);
878}
879
880int
881bpobj_space(bpobj_t *bpo, uint64_t *usedp, uint64_t *compp, uint64_t *uncompp)

Callers

nothing calls this directly

Calls 4

dsl_pool_sync_contextFunction · 0.85
spa_get_dslFunction · 0.85
bp_get_dsize_syncFunction · 0.85
bp_get_dsizeFunction · 0.85

Tested by

no test coverage detected