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

Function blist_fill

freebsd/kern/subr_blist.c:347–358  ·  view source on GitHub ↗

* blist_fill() - mark a region in the block bitmap as off-limits * to the allocator (i.e. allocate it), ignoring any * existing allocations. Return the number of blocks * actually filled that were free before the call. */

Source from the content-addressed store, hash-verified

345 * actually filled that were free before the call.
346 */
347daddr_t
348blist_fill(blist_t bl, daddr_t blkno, daddr_t count)
349{
350 daddr_t filled;
351
352 KASSERT(blkno >= 0 && blkno + count <= bl->bl_blocks,
353 ("filling invalid range: blkno %jx, count %d, blocks %jd",
354 (uintmax_t)blkno, (int)count, (uintmax_t)bl->bl_blocks));
355 filled = blst_meta_fill(bl->bl_root, blkno, count, bl->bl_radix);
356 bl->bl_avail -= filled;
357 return (filled);
358}
359
360/*
361 * blist_resize() - resize an existing radix tree to handle the

Callers 2

mainFunction · 0.85
swapoff_oneFunction · 0.85

Calls 1

blst_meta_fillFunction · 0.85

Tested by

no test coverage detected