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

Function blst_leaf_fill

freebsd/kern/subr_blist.c:989–1002  ·  view source on GitHub ↗

* BLST_LEAF_FILL() - allocate specific blocks in leaf bitmap * * This routine allocates all blocks in the specified range * regardless of any existing allocations in that range. Returns * the number of blocks allocated by the call. */

Source from the content-addressed store, hash-verified

987 * the number of blocks allocated by the call.
988 */
989static daddr_t
990blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count)
991{
992 daddr_t nblks;
993 u_daddr_t mask;
994
995 mask = bitrange(blk & BLIST_MASK, count);
996
997 /* Count the number of blocks that we are allocating. */
998 nblks = bitcount64(scan->bm_bitmap & mask);
999
1000 scan->bm_bitmap &= ~mask;
1001 return (nblks);
1002}
1003
1004/*
1005 * BLIST_META_FILL() - allocate specific blocks at a meta node

Callers 1

blst_meta_fillFunction · 0.85

Calls 1

bitrangeFunction · 0.85

Tested by

no test coverage detected