Lines Matching full:blocks
119 printf("%p: Blocks %d-%d (%d)\n", reg,
198 /* Marks a the first num_blocks blocks in a block group as used, and accounts
255 /* Reduces an existing allocation by len blocks by return the last blocks
256 to the free pool in their block group. Assumes that the blocks being
318 error("failed to reserve %u blocks in block group %u\n", bg->header_blocks, i);
409 error("failed to allocate %u blocks, out of space?", len);
420 error("failed to reserve %u blocks in block group %u\n", found_allocate_len, found_bg);
459 /* Allocate len blocks. The blocks may be spread across multiple block groups,
460 and are returned in a linked list of the blocks in each block group. The
533 /* Gets the starting block and length in blocks of the first region
548 /* Returns the number of free blocks in a block group */
607 /* Then split off len blocks */
613 /* Reserve the next blocks for oob data (indirect or extent blocks) */
614 int reserve_oob_blocks(struct block_allocation *alloc, int blocks)
616 struct region *oob = split_allocation(alloc, blocks);
632 static int advance_list_ptr(struct region_list *list, int blocks)
636 while (reg != NULL && blocks > 0) {
637 if (reg->len > list->partial_iter + blocks) {
638 list->partial_iter += blocks;
642 blocks -= (reg->len - list->partial_iter);
647 if (blocks > 0)
654 int advance_blocks(struct block_allocation *alloc, int blocks)
656 return advance_list_ptr(&alloc->list, blocks);
659 int advance_oob_blocks(struct block_allocation *alloc, int blocks)
661 return advance_list_ptr(&alloc->oob_list, blocks);
669 error("failed to allocate %d blocks", len);