Home
last modified time | relevance | path

Searched refs:extent (Results 1 – 25 of 63) sorted by relevance

123

/system/update_engine/payload_generator/
Dextent_ranges.cc79 void ExtentRanges::AddExtent(Extent extent) { in AddExtent() argument
80 if (extent.start_block() == kSparseHole || extent.num_blocks() == 0) in AddExtent()
89 if (ExtentsOverlapOrTouch(*it, extent)) { in AddExtent()
96 extent = UnionOverlappingExtents(extent, *it); in AddExtent()
100 extent_set_.insert(extent); in AddExtent()
102 blocks_ += extent.num_blocks(); in AddExtent()
123 void ExtentRanges::SubtractExtent(const Extent& extent) { in SubtractExtent() argument
124 if (extent.start_block() == kSparseHole || extent.num_blocks() == 0) in SubtractExtent()
134 if (!ExtentsOverlap(*it, extent)) in SubtractExtent()
144 ExtentSet subtraction = SubtractOverlappingExtents(*it, extent); in SubtractExtent()
[all …]
Dextent_utils.cc41 Extent& extent = extents->back(); in AppendBlockToExtents() local
42 uint64_t next_block = extent.start_block() == kSparseHole in AppendBlockToExtents()
44 : extent.start_block() + extent.num_blocks(); in AppendBlockToExtents()
46 extent.set_num_blocks(extent.num_blocks() + 1); in AppendBlockToExtents()
75 for (const Extent& extent : extents) { in StoreExtents() local
77 *new_extent = extent; in StoreExtents()
127 for (const Extent& extent : extents) { in ExtentsSublist() local
131 if (scanned_blocks + extent.num_blocks() > block_offset) { in ExtentsSublist()
134 uint64_t new_start = extent.start_block(); in ExtentsSublist()
135 uint64_t new_num_blocks = extent.num_blocks(); in ExtentsSublist()
[all …]
Dextent_utils.h42 for (const auto& extent : extents) { in ExpandExtents() local
43 if (extent.start_block() == kSparseHole) { in ExpandExtents()
44 ret.resize(ret.size() + extent.num_blocks(), kSparseHole); in ExpandExtents()
46 for (uint64_t block = extent.start_block(); in ExpandExtents()
47 block < (extent.start_block() + extent.num_blocks()); in ExpandExtents()
125 std::ostream& operator<<(std::ostream& out, const Extent& extent);
Dfake_filesystem.cc44 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()
Ddeflate_utils.cc108 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()
125 ByteExtent ExpandToByteExtent(const BitExtent& extent) { in ExpandToByteExtent() argument
126 uint64_t offset = extent.offset / 8; in ExpandToByteExtent()
127 uint64_t length = ((extent.offset + extent.length + 7) / 8) - offset; in ExpandToByteExtent()
220 for (const auto& extent : extents) { in FindDeflates() local
221 if (IsBitExtentInExtent(extent, deflate)) { in FindDeflates()
235 for (const auto& extent : extents) { in CompactDeflates() local
236 size_t gap_bytes = extent.start_block() * kBlockSize - bytes_passed; in CompactDeflates()
[all …]
Dcow_size_estimator.cc39 for (const auto& extent : op.dst_extents()) { in PerformReplaceOp() local
40 buffer.resize(extent.num_blocks() * block_size); in PerformReplaceOp()
47 extent.start_block() * block_size, in PerformReplaceOp()
52 extent.start_block(), buffer.data(), buffer.size())); in PerformReplaceOp()
60 for (const auto& extent : op.dst_extents()) { in PerformZeroOp() local
62 writer->AddZeroBlocks(extent.start_block(), extent.num_blocks())); in PerformZeroOp()
Dannotated_operation.cc33 for (const auto& extent : extents) { in OutputExtents() local
34 *os << " (" << extent.start_block() << ", " << extent.num_blocks() << ")"; in OutputExtents()
Dextent_ranges.h55 void AddExtent(Extent extent);
56 void SubtractExtent(const Extent& extent);
67 bool OverlapsWithExtent(const Extent& extent) const;
Dmapfile_filesystem_unittest.cc48 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()
Dext2_filesystem_unittest.cc54 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/fs_mgr/liblp/
Dbuilder.cpp34 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 …]
Dimages.cpp318 const LpMetadataExtent& extent = metadata_.extents[extent_index]; in AddPartitionImage() local
319 if (extent.target_type != LP_TARGET_TYPE_LINEAR) { in AddPartitionImage()
351 uint64_t extent_last_sector = extent.num_sectors; in AddPartitionImage()
356 if (!SectorToBlock(extent.target_data, &output_block)) { in AddPartitionImage()
359 sparse_file* output_device = device_images_[extent.target_source].get(); in AddPartitionImage()
373 const LpMetadataExtent& extent = metadata_.extents[extent_index]; in AddPartitionImage() local
374 extent_last_sector += extent.num_sectors; in AddPartitionImage()
375 output_device = device_images_[extent.target_source].get(); in AddPartitionImage()
376 if (!SectorToBlock(extent.target_data, &output_block)) { in AddPartitionImage()
427 for (const auto& extent : metadata_.extents) { in CheckExtentOrdering() local
[all …]
Dbuilder_test.cpp72 LinearExtent* extent = system->extents()[0]->AsLinearExtent(); in TEST_F() local
73 ASSERT_NE(extent, nullptr); in TEST_F()
74 EXPECT_EQ(extent->num_sectors(), 65536 / LP_SECTOR_SIZE); in TEST_F()
79 EXPECT_EQ(extent->physical_sector(), 32); in TEST_F()
105 extent = system->extents()[0]->AsLinearExtent(); in TEST_F()
106 ASSERT_NE(extent, nullptr); in TEST_F()
107 EXPECT_EQ(extent->num_sectors(), 32768 / LP_SECTOR_SIZE); in TEST_F()
108 EXPECT_EQ(extent->physical_sector(), 32); in TEST_F()
227 for (const auto& extent : exported->extents) { in TEST_F() local
228 ASSERT_EQ(extent.target_type, LP_TARGET_TYPE_LINEAR); in TEST_F()
[all …]
/system/extras/partition_tools/
Dlpunpack.cc49 bool ExtractExtent(const LpMetadataExtent& extent, int output_fd);
64 bool WriteExtent(const LpMetadataExtent& extent);
219 const LpMetadataExtent& extent = metadata_->extents[index]; in ExtractPartition() local
221 if (extent.target_type != LP_TARGET_TYPE_LINEAR) { in ExtractPartition()
222 std::cerr << "Unsupported target type in extent: " << extent.target_type << "\n"; in ExtractPartition()
225 if (extent.target_source != 0) { in ExtractPartition()
229 total_size += extent.num_sectors * LP_SECTOR_SIZE; in ExtractPartition()
245 const LpMetadataExtent& extent = metadata_->extents[index]; in ExtractPartition() local
247 if (!writer.WriteExtent(extent)) { in ExtractPartition()
257 bool SparseWriter::WriteExtent(const LpMetadataExtent& extent) { in WriteExtent() argument
[all …]
Dlpdump.cc297 ParseLinearExtentData(const LpMetadata& pt, const LpMetadataExtent& extent) { in ParseLinearExtentData() argument
298 if (extent.target_type != LP_TARGET_TYPE_LINEAR) { in ParseLinearExtentData()
301 const auto& block_device = pt.block_devices[extent.target_source]; in ParseLinearExtentData()
303 return std::make_tuple(std::move(device_name), extent.target_data); in ParseLinearExtentData()
327 const LpMetadataExtent& extent = pt.extents[partition.first_extent_index + i]; in PrintMetadata() local
328 cout << " " << first_sector << " .. " << (first_sector + extent.num_sectors - 1) in PrintMetadata()
330 first_sector += extent.num_sectors; in PrintMetadata()
331 if (extent.target_type == LP_TARGET_TYPE_LINEAR) { in PrintMetadata()
332 const auto& block_device = pt.block_devices[extent.target_source]; in PrintMetadata()
334 cout << "linear " << device_name.c_str() << " " << extent.target_data; in PrintMetadata()
[all …]
Dlpadd.cc115 bool WriteExtent(borrowed_fd fd, uint64_t file_size, const LpMetadataExtent& extent);
306 const auto& extent = metadata_->extents[extent_index]; in WritePartition() local
307 if (!WriteExtent(fd, file_size, extent)) { in WritePartition()
318 bool SuperHelper::WriteExtent(borrowed_fd fd, uint64_t file_size, const LpMetadataExtent& extent) { in WriteExtent() argument
320 CHECK(extent.target_type == LP_TARGET_TYPE_LINEAR); in WriteExtent()
321 CHECK(extent.target_source == 0); in WriteExtent()
333 std::min(file_size - (uint64_t)pos, extent.num_sectors * LP_SECTOR_SIZE); in WriteExtent()
336 if (lseek(super_fd_, extent.target_data * LP_SECTOR_SIZE, SEEK_SET) < 0) { in WriteExtent()
/system/core/fs_mgr/libfiemap/
Dmetadata.cpp134 for (const auto& extent : file->extents()) { in FillPartitionExtents() local
135 if (extent.fe_length % LP_SECTOR_SIZE != 0) { in FillPartitionExtents()
136 LOG(ERROR) << "Extent is not sector-aligned: " << extent.fe_length; in FillPartitionExtents()
139 if (extent.fe_physical % LP_SECTOR_SIZE != 0) { in FillPartitionExtents()
140 LOG(ERROR) << "Extent physical sector is not sector-aligned: " << extent.fe_physical; in FillPartitionExtents()
145 std::min(static_cast<uint64_t>(extent.fe_length / LP_SECTOR_SIZE), sectors_needed); in FillPartitionExtents()
153 uint64_t physical_sector = extent.fe_physical / LP_SECTOR_SIZE; in FillPartitionExtents()
/system/core/fs_mgr/
Dfs_mgr_dm_linear.cpp97 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/libsnapshot/
Dmake_cow_from_ab_ota.cpp237 for (const auto& extent : op.dst_extents()) { in ProcessZero() local
238 if (!writer_->AddZeroBlocks(extent.start_block(), extent.num_blocks())) { in ProcessZero()
249 for (const auto& extent : extents) { in SizeOfAllExtents() local
250 total += extent.num_blocks() * kBlockSize; in SizeOfAllExtents()
341 for (const auto& extent : op.src_extents()) { in ProcessDiff() local
342 uint64_t offset = extent.start_block() * kBlockSize; in ProcessDiff()
348 uint64_t size = extent.num_blocks() * kBlockSize; in ProcessDiff()
400 for (const auto& extent : op.dst_extents()) { in ProcessDiff() local
401 uint64_t size = extent.num_blocks() * kBlockSize; in ProcessDiff()
404 if (!writer_->AddRawBlocks(extent.start_block(), &dest[dest_pos], size)) { in ProcessDiff()
[all …]
/system/update_engine/common/
Dcow_operation_convert_unittest.cc92 for (const auto& extent : src_extents) { in AddOperation() local
93 *op->add_src_extents() = ExtentForRange(extent[0], extent[1]); in AddOperation()
95 for (const auto& extent : dst_extents) { in AddOperation() local
96 *op->add_dst_extents() = ExtentForRange(extent[0], extent[1]); in AddOperation()
/system/extras/ext4_utils/
Dmke2fs.conf15 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/
DConvertMQDescriptors.h79 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()
/system/update_engine/payload_consumer/
Dvabc_partition_writer.cc139 for (const auto& extent : operation.dst_extents()) { in PerformZeroOrDiscardOperation() local
141 cow_writer_->AddZeroBlocks(extent.start_block(), extent.num_blocks())); in PerformZeroOrDiscardOperation()
Dextent_reader_unittest.cc66 for (const auto& extent : extents) { in ReadExtents() local
69 &sample_[extent.start_block() * kBlockSize], in ReadExtents()
70 &sample_[(extent.start_block() + extent.num_blocks()) * kBlockSize]); in ReadExtents()
/system/libfmq/base/fmq/
DMQDescriptorBase.h44 uint64_t extent __attribute__((aligned(8))); member
50 static_assert(offsetof(GrantorDescriptor, extent) == 16, "wrong offset");

123