/system/update_engine/payload_consumer/ |
D | extent_map.h | 39 bool AddExtent(const Extent& extent, T&& value) { in AddExtent() argument 40 if (set_.OverlapsWithExtent(extent)) { in AddExtent() 43 const auto& [it, inserted] = map_.insert({extent, std::forward<T>(value)}); in AddExtent() 45 set_.AddExtent(extent); in AddExtent() 55 std::optional<T> Get(const Extent& extent) const { in Get() argument 56 const auto it = map_.find(extent); in Get() 58 for (const auto& ext : set_.GetCandidateRange(extent)) { in Get() 65 if (ExtentContains(ext, extent)) { in Get() 68 if (ExtentRanges::ExtentsOverlap(ext, extent)) { in Get() 72 << extent << ", partial match in map: " << ext; in Get() [all …]
|
D | xor_extent_writer.cc | 29 const Extent& extent, in WriteExtent() argument 32 const auto xor_extents = xor_map_.GetIntersectingExtents(extent); in WriteExtent() 44 << extent; in WriteExtent() 51 if (!ExtentContains(extent, xor_ext)) { in WriteExtent() 54 << xor_ext << " InstallOp extent: " << extent; in WriteExtent() 67 const auto i = xor_ext.start_block() - extent.start_block(); in WriteExtent() 110 const auto replace_extents = xor_map_.GetNonIntersectingExtents(extent); in WriteExtent() 111 return WriteReplaceExtents(replace_extents, extent, bytes, size); in WriteExtent() 116 const Extent& extent, in WriteReplaceExtents() argument 119 const uint64_t new_block_start = extent.start_block(); in WriteReplaceExtents() [all …]
|
D | snapshot_extent_writer.cc | 29 const Extent& extent, in WriteExtent() argument 32 extent.start_block(), bytes, extent.num_blocks() * block_size); in WriteExtent()
|
D | install_plan.cc | 192 Extent extent = partition.hash_tree_data_extent(); in ParseVerityConfig() local 193 hash_tree_data_offset = extent.start_block() * block_size; in ParseVerityConfig() 194 hash_tree_data_size = extent.num_blocks() * block_size; in ParseVerityConfig() 195 extent = partition.hash_tree_extent(); in ParseVerityConfig() 196 hash_tree_offset = extent.start_block() * block_size; in ParseVerityConfig() 197 hash_tree_size = extent.num_blocks() * block_size; in ParseVerityConfig() 210 Extent extent = partition.fec_data_extent(); in ParseVerityConfig() local 211 fec_data_offset = extent.start_block() * block_size; in ParseVerityConfig() 212 fec_data_size = extent.num_blocks() * block_size; in ParseVerityConfig() 213 extent = partition.fec_extent(); in ParseVerityConfig() [all …]
|
D | xor_extent_writer.h | 51 const Extent& extent, 56 const Extent& extent,
|
/system/update_engine/payload_generator/ |
D | extent_ranges.cc | 80 void ExtentRanges::AddExtent(Extent extent) { in AddExtent() argument 81 if (extent.start_block() == kSparseHole || extent.num_blocks() == 0) in AddExtent() 91 ? ExtentsOverlapOrTouch(*it, extent) in AddExtent() 92 : ExtentsOverlap(*it, extent); in AddExtent() 100 extent = UnionOverlappingExtents(extent, *it); in AddExtent() 104 extent_set_.insert(extent); in AddExtent() 106 blocks_ += extent.num_blocks(); in AddExtent() 127 void ExtentRanges::SubtractExtent(const Extent& extent) { in SubtractExtent() argument 128 if (extent.start_block() == kSparseHole || extent.num_blocks() == 0) in SubtractExtent() 138 if (!ExtentsOverlap(*it, extent)) in SubtractExtent() [all …]
|
D | extent_utils.h | 44 for (const auto& extent : extents) { in ExpandExtents() local 45 if (extent.start_block() == kSparseHole) { in ExpandExtents() 46 ret.resize(ret.size() + extent.num_blocks(), kSparseHole); in ExpandExtents() 48 for (uint64_t block = extent.start_block(); in ExpandExtents() 49 block < (extent.start_block() + extent.num_blocks()); in ExpandExtents() 131 std::ostream& operator<<(std::ostream& out, const Extent& extent); 132 std::ostream& operator<<(std::ostream& out, const std::vector<Extent>& extent); 135 const google::protobuf::RepeatedPtrField<Extent>& extent); 140 for (const auto& extent : extents) { in GetNthBlock() local 141 if (n - cur_block_count < extent.num_blocks()) { in GetNthBlock() [all …]
|
D | extent_utils.cc | 42 Extent& extent = extents->back(); in AppendBlockToExtents() local 43 uint64_t next_block = extent.start_block() == kSparseHole in AppendBlockToExtents() 45 : extent.start_block() + extent.num_blocks(); in AppendBlockToExtents() 47 extent.set_num_blocks(extent.num_blocks() + 1); in AppendBlockToExtents() 76 for (const Extent& extent : extents) { in StoreExtents() local 78 *new_extent = extent; in StoreExtents() 138 for (const Extent& extent : extents) { in ExtentsSublist() local 142 if (scanned_blocks + extent.num_blocks() > block_offset) { in ExtentsSublist() 145 uint64_t new_start = extent.start_block(); in ExtentsSublist() 146 uint64_t new_num_blocks = extent.num_blocks(); in ExtentsSublist() [all …]
|
D | fake_filesystem.cc | 44 for (const Extent& extent : extents) { in AddFile() local 45 EXPECT_LE(0U, extent.start_block()); in AddFile() 46 EXPECT_LE(extent.start_block() + extent.num_blocks(), block_count_); in AddFile()
|
D | extent_ranges.h | 66 void AddExtent(Extent extent); 67 void SubtractExtent(const Extent& extent); 78 bool OverlapsWithExtent(const Extent& extent) const; 101 std::vector<Extent> GetIntersectingExtents(const Extent& extent) const; 108 const Extent& extent) const;
|
D | deflate_utils.cc | 108 bool IsBitExtentInExtent(const Extent& extent, const BitExtent& bit_extent) { in IsBitExtentInExtent() argument 109 return (bit_extent.offset / 8) >= (extent.start_block() * kBlockSize) && in IsBitExtentInExtent() 111 ((extent.start_block() + extent.num_blocks()) * kBlockSize); in IsBitExtentInExtent() 135 ByteExtent ExpandToByteExtent(const BitExtent& extent) { in ExpandToByteExtent() argument 136 uint64_t offset = extent.offset / 8; in ExpandToByteExtent() 137 uint64_t length = ((extent.offset + extent.length + 7) / 8) - offset; in ExpandToByteExtent() 230 for (const auto& extent : extents) { in FindDeflates() local 231 if (IsBitExtentInExtent(extent, deflate)) { in FindDeflates() 245 for (const auto& extent : extents) { in CompactDeflates() local 246 size_t gap_bytes = extent.start_block() * kBlockSize - bytes_passed; in CompactDeflates() [all …]
|
D | annotated_operation.cc | 33 for (const auto& extent : extents) { in OutputExtents() local 34 *os << " (" << extent.start_block() << ", " << extent.num_blocks() << ")"; in OutputExtents()
|
D | mapfile_filesystem_unittest.cc | 48 for (const Extent& extent : extents) { in ExpectBlocksInRange() local 49 EXPECT_LE(0U, extent.start_block()); in ExpectBlocksInRange() 50 EXPECT_LE(extent.start_block() + extent.num_blocks(), total_blocks); in ExpectBlocksInRange()
|
D | ext2_filesystem_unittest.cc | 54 for (const Extent& extent : extents) { in ExpectBlocksInRange() local 55 EXPECT_LE(0U, extent.start_block()); in ExpectBlocksInRange() 56 EXPECT_LE(extent.start_block() + extent.num_blocks(), total_blocks); in ExpectBlocksInRange()
|
/system/core/fastboot/ |
D | super_flash_helper.cpp | 87 for (const auto& extent : extents_) { in GetSparseLayout() local 88 if (extent.offset / block_size > UINT_MAX) { in GetSparseLayout() 93 unsigned int block = extent.offset / block_size; in GetSparseLayout() 96 switch (extent.type) { in GetSparseLayout() 100 rv = sparse_file_add_fill(s.get(), 0, extent.size, block); in GetSparseLayout() 103 rv = sparse_file_add_data(s.get(), extent.blob->data(), extent.size, block); in GetSparseLayout() 106 auto iter = image_fds_.find(extent.image_name); in GetSparseLayout() 108 LOG(FATAL) << "image added but not found: " << extent.image_name; in GetSparseLayout() 111 rv = sparse_file_add_fd(s.get(), iter->second.get(), extent.image_offset, in GetSparseLayout() 112 extent.size, block); in GetSparseLayout()
|
/system/core/fs_mgr/liblp/ |
D | super_layout_builder.cpp | 93 for (const auto& extent : old) { in AddGapExtents() local 95 if (current_offset > extent.offset) { in AddGapExtents() 100 if (extent.offset != current_offset) { in AddGapExtents() 101 uint64_t gap_size = extent.offset - current_offset; in AddGapExtents() 103 current_offset = extent.offset; in AddGapExtents() 106 extents->emplace_back(extent); in AddGapExtents() 107 current_offset += extent.size; in AddGapExtents() 219 std::ostream& operator<<(std::ostream& stream, const SuperImageExtent& extent) { in operator <<() argument 220 stream << "extent:" << extent.offset << ":" << extent.size << ":"; in operator <<() 221 switch (extent.type) { in operator <<() [all …]
|
D | builder.cpp | 34 std::ostream& operator<<(std::ostream& os, const Extent& extent) { in operator <<() argument 35 switch (extent.GetExtentType()) { in operator <<() 41 auto linear_extent = static_cast<const LinearExtent*>(&extent); in operator <<() 101 void Partition::AddExtent(std::unique_ptr<Extent>&& extent) { in AddExtent() argument 102 size_ += extent->num_sectors() * LP_SECTOR_SIZE; in AddExtent() 104 if (LinearExtent* new_extent = extent->AsLinearExtent()) { in AddExtent() 111 extent = std::make_unique<LinearExtent>( in AddExtent() 118 extents_.push_back(std::move(extent)); in AddExtent() 136 Extent* extent = extents_.back().get(); in ShrinkTo() local 137 if (extent->num_sectors() > sectors_to_remove) { in ShrinkTo() [all …]
|
D | images.cpp | 323 const LpMetadataExtent& extent = metadata_.extents[extent_index]; in AddPartitionImage() local 324 if (extent.target_type != LP_TARGET_TYPE_LINEAR) { in AddPartitionImage() 356 uint64_t extent_last_sector = extent.num_sectors; in AddPartitionImage() 361 if (!SectorToBlock(extent.target_data, &output_block)) { in AddPartitionImage() 364 sparse_file* output_device = device_images_[extent.target_source].get(); in AddPartitionImage() 378 const LpMetadataExtent& extent = metadata_.extents[extent_index]; in AddPartitionImage() local 379 extent_last_sector += extent.num_sectors; in AddPartitionImage() 380 output_device = device_images_[extent.target_source].get(); in AddPartitionImage() 381 if (!SectorToBlock(extent.target_data, &output_block)) { in AddPartitionImage() 432 for (const auto& extent : metadata_.extents) { in CheckExtentOrdering() local [all …]
|
D | builder_test.cpp | 74 LinearExtent* extent = system->extents()[0]->AsLinearExtent(); in TEST_F() local 75 ASSERT_NE(extent, nullptr); in TEST_F() 76 EXPECT_EQ(extent->num_sectors(), 65536 / LP_SECTOR_SIZE); in TEST_F() 81 EXPECT_EQ(extent->physical_sector(), 32); in TEST_F() 107 extent = system->extents()[0]->AsLinearExtent(); in TEST_F() 108 ASSERT_NE(extent, nullptr); in TEST_F() 109 EXPECT_EQ(extent->num_sectors(), 32768 / LP_SECTOR_SIZE); in TEST_F() 110 EXPECT_EQ(extent->physical_sector(), 32); in TEST_F() 229 for (const auto& extent : exported->extents) { in TEST_F() local 230 ASSERT_EQ(extent.target_type, LP_TARGET_TYPE_LINEAR); in TEST_F() [all …]
|
/system/extras/partition_tools/ |
D | lpunpack.cc | 50 bool ExtractExtent(const LpMetadataExtent& extent, int output_fd); 65 bool WriteExtent(borrowed_fd image_fd, const LpMetadataExtent& extent); 242 const LpMetadataExtent& extent = metadata_->extents[index]; in ExtractPartition() local 243 …std::cout << " Dealing with extent " << i << " from target source " << extent.target_source << ".… in ExtractPartition() 245 if (extent.target_type != LP_TARGET_TYPE_LINEAR) { in ExtractPartition() 246 std::cerr << "Unsupported target type in extent: " << extent.target_type << "\n"; in ExtractPartition() 249 if (extent.target_source >= image_fds_.size()) { in ExtractPartition() 250 …std::cerr << "Insufficient number of super images passed, need at least " << extent.target_source … in ExtractPartition() 253 total_size += extent.num_sectors * LP_SECTOR_SIZE; in ExtractPartition() 269 const LpMetadataExtent& extent = metadata_->extents[index]; in ExtractPartition() local [all …]
|
D | lpdump.cc | 304 ParseLinearExtentData(const LpMetadata& pt, const LpMetadataExtent& extent) { in ParseLinearExtentData() argument 305 if (extent.target_type != LP_TARGET_TYPE_LINEAR) { in ParseLinearExtentData() 308 const auto& block_device = pt.block_devices[extent.target_source]; in ParseLinearExtentData() 310 return std::make_tuple(std::move(device_name), extent.target_data); in ParseLinearExtentData() 334 const LpMetadataExtent& extent = pt.extents[partition.first_extent_index + i]; in PrintMetadata() local 335 cout << " " << first_sector << " .. " << (first_sector + extent.num_sectors - 1) in PrintMetadata() 337 first_sector += extent.num_sectors; in PrintMetadata() 338 if (extent.target_type == LP_TARGET_TYPE_LINEAR) { in PrintMetadata() 339 const auto& block_device = pt.block_devices[extent.target_source]; in PrintMetadata() 341 cout << "linear " << device_name.c_str() << " " << extent.target_data; in PrintMetadata() [all …]
|
/system/core/fs_mgr/ |
D | fs_mgr_dm_linear.cpp | 97 const auto& extent = params.metadata->extents[params.partition->first_extent_index + i]; in CreateDmTableInternal() local 99 switch (extent.target_type) { in CreateDmTableInternal() 101 target = std::make_unique<DmTargetZero>(sector, extent.num_sectors); in CreateDmTableInternal() 104 const auto& block_device = params.metadata->block_devices[extent.target_source]; in CreateDmTableInternal() 111 target = std::make_unique<DmTargetLinear>(sector, extent.num_sectors, dev_string, in CreateDmTableInternal() 112 extent.target_data); in CreateDmTableInternal() 116 LOG(ERROR) << "Unknown target type in metadata: " << extent.target_type; in CreateDmTableInternal() 122 sector += extent.num_sectors; in CreateDmTableInternal()
|
/system/core/fs_mgr/libfiemap/ |
D | metadata.cpp | 143 for (const auto& extent : file->extents()) { in FillPartitionExtents() local 144 if (extent.fe_length % LP_SECTOR_SIZE != 0) { in FillPartitionExtents() 145 LOG(ERROR) << "Extent is not sector-aligned: " << extent.fe_length; in FillPartitionExtents() 148 if (extent.fe_physical % LP_SECTOR_SIZE != 0) { in FillPartitionExtents() 149 LOG(ERROR) << "Extent physical sector is not sector-aligned: " << extent.fe_physical; in FillPartitionExtents() 154 std::min(static_cast<uint64_t>(extent.fe_length / LP_SECTOR_SIZE), sectors_needed); in FillPartitionExtents() 162 uint64_t physical_sector = extent.fe_physical / LP_SECTOR_SIZE; in FillPartitionExtents()
|
/system/extras/ext4_utils/ |
D | mke2fs.conf | 15 features = has_journal,extent,huge_file,dir_nlink,extra_isize,uninit_bg 19 features = has_journal,extent,huge_file,flex_bg,inline_data,64bit,dir_nlink,extra_isize
|
/system/libfmq/include/fmq/ |
D | ConvertMQDescriptors.h | 79 if (static_cast<int32_t>(grantor.offset) < 0 || static_cast<int64_t>(grantor.extent) < 0 || in unsafeHidlToAidlMQDescriptor() 89 .extent = static_cast<int64_t>(grantor.extent)}); in unsafeHidlToAidlMQDescriptor()
|