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)));
786 * allocate_partition() - Allocate a partition and add it to a layout.
787 * @layout: The layout containing the partition.
788 * @id: The id of the partition.
789 * @offset: The offset into the layout at which the partition begins.
790 * @size: The size of the partition in blocks.
797 struct partition *partition;
800 result = vdo_allocate(1, struct partition, __func__, &partition);
804 partition->id = id;
805 partition->offset = offset;
806 partition->count = size;
807 partition->next = layout->head;
808 layout->head = partition;
814 * make_partition() - Create a new partition from the beginning or end of the unused space in a
817 * @id: The id of the partition to make.
819 * @beginning: True if the partition should start at the beginning of the unused space.
862 * @block_map_blocks: The size of the block map partition.
863 * @journal_blocks: The size of the journal partition.
864 * @summary_blocks: The size of the slab summary partition.
926 struct partition *part = layout->head;
936 * vdo_get_partition() - Get a partition by id.
937 * @layout: The layout from which to get a partition.
938 * @id: The id of the partition.
939 * @partition_ptr: A pointer to hold the partition.
944 struct partition **partition_ptr)
946 struct partition *partition;
948 for (partition = layout->head; partition != NULL; partition = partition->next) {
949 if (partition->id == id) {
951 *partition_ptr = partition;
960 * vdo_get_known_partition() - Get a partition by id from a validated layout.
961 * @layout: The layout from which to get a partition.
962 * @id: The id of the partition.
964 * Return: the partition
966 struct partition *vdo_get_known_partition(struct layout *layout, enum partition_id id)
968 struct partition *partition;
969 int result = vdo_get_partition(layout, id, &partition);
971 VDO_ASSERT_LOG_ONLY(result == VDO_SUCCESS, "layout has expected partition: %u", id);
973 return partition;
978 const struct partition *partition;
984 "layout partition count must fit in a byte");
996 for (partition = layout->head; partition != NULL; partition = partition->next) {
997 buffer[(*offset)++] = partition->id;
998 encode_u64_le(buffer, offset, partition->offset);
1001 encode_u64_le(buffer, offset, partition->count);
1013 struct partition *partition;
1070 result = vdo_get_partition(layout, REQUIRED_PARTITIONS[i], &partition);
1074 "layout is missing required partition %u",
1078 start += partition->count;