Lines Matching refs:partition

636  * @partition: The slab depot partition
647 int vdo_configure_slab_depot(const struct partition *partition,
657 __func__, (unsigned long long) partition->count,
658 (unsigned long long) partition->offset,
662 slab_count = (partition->count / slab_size);
671 last_block = partition->offset + total_slab_blocks;
675 .first_block = partition->offset,
683 (unsigned long long) (partition->count - (last_block - partition->offset)));
773 * allocate_partition() - Allocate a partition and add it to a layout.
774 * @layout: The layout containing the partition.
775 * @id: The id of the partition.
776 * @offset: The offset into the layout at which the partition begins.
777 * @size: The size of the partition in blocks.
784 struct partition *partition;
787 result = vdo_allocate(1, struct partition, __func__, &partition);
791 partition->id = id;
792 partition->offset = offset;
793 partition->count = size;
794 partition->next = layout->head;
795 layout->head = partition;
801 * make_partition() - Create a new partition from the beginning or end of the unused space in a
804 * @id: The id of the partition to make.
806 * @beginning: True if the partition should start at the beginning of the unused space.
849 * @block_map_blocks: The size of the block map partition.
850 * @journal_blocks: The size of the journal partition.
851 * @summary_blocks: The size of the slab summary partition.
913 struct partition *part = layout->head;
923 * vdo_get_partition() - Get a partition by id.
924 * @layout: The layout from which to get a partition.
925 * @id: The id of the partition.
926 * @partition_ptr: A pointer to hold the partition.
931 struct partition **partition_ptr)
933 struct partition *partition;
935 for (partition = layout->head; partition != NULL; partition = partition->next) {
936 if (partition->id == id) {
938 *partition_ptr = partition;
947 * vdo_get_known_partition() - Get a partition by id from a validated layout.
948 * @layout: The layout from which to get a partition.
949 * @id: The id of the partition.
951 * Return: the partition
953 struct partition *vdo_get_known_partition(struct layout *layout, enum partition_id id)
955 struct partition *partition;
956 int result = vdo_get_partition(layout, id, &partition);
958 VDO_ASSERT_LOG_ONLY(result == VDO_SUCCESS, "layout has expected partition: %u", id);
960 return partition;
965 const struct partition *partition;
971 "layout partition count must fit in a byte");
983 for (partition = layout->head; partition != NULL; partition = partition->next) {
984 buffer[(*offset)++] = partition->id;
985 encode_u64_le(buffer, offset, partition->offset);
988 encode_u64_le(buffer, offset, partition->count);
1000 struct partition *partition;
1057 result = vdo_get_partition(layout, REQUIRED_PARTITIONS[i], &partition);
1061 "layout is missing required partition %u",
1065 start += partition->count;