Lines Matching refs:slabs

207  * theoretically slabs could contain precisely 2^23 blocks; there is an assumption that at least
1340 * Wholly full slabs must be the only ones with lowest priority, 0.
1343 * have lower priority than previously opened slabs that have a significant number of free
1351 * For all other slabs, the priority is derived from the logarithm of the number of free
1369 * so slabs with lots of free blocks will be opened for allocation before slabs that have few free
1897 /* Unit tests have slabs with only one reference block (and it's a runt). */
2540 list_add_tail(&slab->allocq_entry, &scrubber->slabs);
2640 return list_first_entry_or_null(&scrubber->slabs, struct vdo_slab,
2645 * has_slabs_to_scrub() - Check whether a scrubber has slabs to scrub.
2648 * Return: true if the scrubber has slabs to scrub.
2666 * finish_scrubbing() - Stop scrubbing, either because there are no more slabs to scrub or because
2684 /* All of our slabs were scrubbed, and we're the last allocator to finish. */
2969 * scrub_slabs() - Scrub all of an allocator's slabs that are eligible for scrubbing.
3008 * get_depot_slab_iterator() - Return a slab_iterator over the slabs in a slab_depot.
3012 * @stride: The difference in slab number between successive slabs.
3014 * Iteration always occurs from higher to lower numbered slabs.
3022 struct vdo_slab **slabs = depot->slabs;
3025 .slabs = slabs,
3026 .next = (((slabs == NULL) || (start < end)) ? NULL : slabs[start]),
3052 iterator->next = iterator->slabs[slab->slab_number - iterator->stride];
3216 * Return: VDO_SUCCESS if the waiter was queued, VDO_NO_SPACE if there are no slabs to scrub, and
3341 /* Perform an action on each of an allocator's slabs in parallel. */
3351 * Since we are going to dequeue all of the slabs, the open slab will become invalid, so
3508 /* Prepare slabs for allocation or scrubbing. */
3523 /* Sort the slabs by cleanliness, then by emptiness hint. */
3538 slab = depot->slabs[current_slab_status.slab_number];
3589 /* Terse because there are a lot of slabs to dump and syslog is lossy. */
3616 /* Terse because there are a lot of slabs to dump and syslog is lossy. */
3629 * Wait for a while after each batch of 32 slabs dumped, an arbitrary number,
3768 * @slab_count: The number of slabs the depot should have in the new array.
3770 * Any existing slab pointers will be copied into the new array, and slabs will be allocated as
3771 * needed. The newly allocated slabs will not be distributed for use by the block allocators.
3787 if (depot->slabs != NULL) {
3788 memcpy(depot->new_slabs, depot->slabs,
3813 * vdo_abandon_new_slabs() - Abandon any new slabs in this depot, freeing them as needed.
3953 INIT_LIST_HEAD(&scrubber->slabs);
4046 * blocks, or that the block allocator try to use slabs that already have allocated blocks
4047 * in preference to slabs that have never been opened. For reasons we have not been able to
4050 * allocation. Assigning a low priority to unopened slabs (max_priority/2, say) would be
4125 /* Allocate slabs. */
4130 /* Use the new slabs. */
4138 depot->slabs = depot->new_slabs;
4164 * Calculate the bit shift for efficiently mapping block numbers to slabs. Using a shift
4239 if (depot->slabs != NULL) {
4243 free_slab(vdo_forget(depot->slabs[i]));
4246 vdo_free(vdo_forget(depot->slabs));
4282 * vdo_allocate_reference_counters() - Allocate the reference counters for all slabs in the depot.
4353 return depot->slabs[slab_number];
4399 (slab_block_number_from_pbn(depot->slabs[slab_number], pbn, &sbn) ==
4405 * the slabs in the depot.
4428 * vdo_get_slab_depot_data_blocks() - Get the total number of data blocks in all the slabs in the
4434 * Return: The total number of data blocks in all slabs.
4518 /* Combine the summary from each zone so each zone is correct for all slabs. */
4682 /* Check it out, we've already got all the new slabs allocated! */
4701 * finish_registration() - Finish registering new slabs now that all of the allocators have
4702 * received their new slabs.
4711 vdo_free(depot->slabs);
4712 depot->slabs = depot->new_slabs;
4737 * vdo_use_new_slabs() - Use the new slabs allocated for resize.
4743 VDO_ASSERT_LOG_ONLY(depot->new_slabs != NULL, "Must have new slabs to use");
4973 * vdo_scrub_all_unrecovered_slabs() - Scrub all unrecovered slabs.