* 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. */
| 987 | * the number of blocks allocated by the call. |
| 988 | */ |
| 989 | static daddr_t |
| 990 | blst_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 |
no test coverage detected