Home
last modified time | relevance | path

Searched refs:extents (Results 1 – 25 of 78) sorted by relevance

1234

/system/update_engine/payload_generator/
Dextent_utils_unittest.cc35 vector<Extent> extents; in TEST() local
37 EXPECT_EQ(0U, extents.size()); in TEST()
38 AppendBlockToExtents(&extents, kSparseHole); in TEST()
39 EXPECT_EQ(1U, extents.size()); in TEST()
40 AppendBlockToExtents(&extents, 0); in TEST()
41 EXPECT_EQ(2U, extents.size()); in TEST()
42 AppendBlockToExtents(&extents, kSparseHole); in TEST()
43 AppendBlockToExtents(&extents, kSparseHole); in TEST()
45 ASSERT_EQ(3U, extents.size()); in TEST()
46 EXPECT_EQ(kSparseHole, extents[0].start_block()); in TEST()
[all …]
Dextent_utils.cc38 void AppendBlockToExtents(vector<Extent>* extents, uint64_t block) { in AppendBlockToExtents() argument
40 if (!extents->empty()) { in AppendBlockToExtents()
41 Extent& extent = extents->back(); in AppendBlockToExtents()
54 extents->push_back(new_extent); in AppendBlockToExtents()
58 google::protobuf::RepeatedPtrField<Extent>* extents, in ExtendExtents() argument
62 ExtentsToVector(*extents, &extents_vector); in ExtendExtents()
68 extents->Clear(); in ExtendExtents()
69 StoreExtents(extents_vector, extents); in ExtendExtents()
73 void StoreExtents(const vector<Extent>& extents, in StoreExtents() argument
75 for (const Extent& extent : extents) { in StoreExtents()
[all …]
Dext2_filesystem_unittest.cc53 void ExpectBlocksInRange(const vector<Extent>& extents, uint64_t total_blocks) { in ExpectBlocksInRange() argument
54 for (const Extent& extent : extents) { in ExpectBlocksInRange()
91 ExpectBlocksInRange(file.extents, fs->GetBlockCount()); in TEST_F()
94 EXPECT_FALSE(map_files["<free-space>"].extents.empty()); in TEST_F()
121 ExpectBlocksInRange(file.extents, fs->GetBlockCount()); in TEST_F()
159 EXPECT_TRUE(map_files["/link-short_symlink"].extents.empty()); in TEST_F()
161 utils::BlocksInExtents(map_files["/link-long_symlink"].extents)); in TEST_F()
164 EXPECT_EQ(map_files["/link-hard-regular-16k"].extents, in TEST_F()
165 map_files["/regular-16k"].extents); in TEST_F()
166 EXPECT_FALSE(map_files["/regular-16k"].extents.empty()); in TEST_F()
[all …]
Dextent_utils.h33 void AppendBlockToExtents(std::vector<Extent>* extents, uint64_t block);
38 std::vector<uint64_t> ExpandExtents(const T& extents) { in ExpandExtents() argument
40 for (const auto& extent : extents) { in ExpandExtents()
55 void StoreExtents(const std::vector<Extent>& extents,
59 void ExtentsToVector(const google::protobuf::RepeatedPtrField<Extent>& extents,
63 std::string ExtentsToString(const std::vector<Extent>& extents);
68 google::protobuf::RepeatedPtrField<Extent>* extents,
74 void NormalizeExtents(std::vector<Extent>* extents);
80 std::vector<Extent> ExtentsSublist(const std::vector<Extent>& extents,
Dboot_img_filesystem_unittest.cc82 EXPECT_EQ(1u, files[0].extents.size()); in TEST_F()
83 EXPECT_EQ(1u, files[0].extents[0].start_block()); in TEST_F()
84 EXPECT_EQ(1u, files[0].extents[0].num_blocks()); in TEST_F()
88 EXPECT_EQ(1u, files[1].extents.size()); in TEST_F()
89 EXPECT_EQ(2u, files[1].extents[0].start_block()); in TEST_F()
90 EXPECT_EQ(2u, files[1].extents[0].num_blocks()); in TEST_F()
107 EXPECT_EQ(1u, files[0].extents.size()); in TEST_F()
108 EXPECT_EQ(1u, files[0].extents[0].start_block()); in TEST_F()
109 EXPECT_EQ(1u, files[0].extents[0].num_blocks()); in TEST_F()
113 EXPECT_EQ(1u, files[1].extents.size()); in TEST_F()
[all …]
Ddeflate_utils_unittest.cc125 vector<Extent> extents = { in TEST() local
140 out_deflates = FindDeflates(extents, in_deflates); in TEST()
145 vector<Extent> extents = {}; in TEST() local
149 out_deflates = FindDeflates(extents, in_deflates); in TEST()
152 extents = {}; in TEST()
154 out_deflates = FindDeflates(extents, in_deflates); in TEST()
159 vector<Extent> extents = { in TEST() local
166 ASSERT_TRUE(CompactDeflates(extents, in_deflates, &out_deflates)); in TEST()
171 vector<Extent> extents = {}; in TEST() local
175 EXPECT_FALSE(CompactDeflates(extents, in_deflates, &out_deflates)); in TEST()
[all …]
Dsquashfs_filesystem_unittest.cc54 void ExpectBlocksInRange(const vector<Extent>& extents, uint64_t total_blocks) { in ExpectBlocksInRange() argument
55 for (const Extent& extent : extents) { in ExpectBlocksInRange()
87 ExpectBlocksInRange(file.extents, fs->GetBlockCount()); in CheckSquashfs()
95 return a.extents[0].start_block() < in CheckSquashfs()
96 b.extents[0].start_block(); in CheckSquashfs()
102 return a.extents[0].start_block() + a.extents[0].num_blocks() > in CheckSquashfs()
103 b.extents[0].start_block(); in CheckSquashfs()
127 file.extents.emplace_back(); in TEST_F()
128 file.extents[0].set_start_block(0); in TEST_F()
129 file.extents[0].set_num_blocks(1); in TEST_F()
[all …]
Ddeflate_utils.cc49 const vector<Extent>& extents, in CopyExtentsToFile() argument
52 brillo::Blob data(utils::BlocksInExtents(extents) * block_size); in CopyExtentsToFile()
54 utils::ReadExtents(in_path, extents, &data, data.size(), block_size)); in CopyExtentsToFile()
64 utils::BlocksInExtents(file.extents) >= in IsSquashfsImage()
69 file.extents[0].start_block() * kBlockSize, in IsSquashfsImage()
95 ShiftExtentsOverExtents(file.extents, &in_file.extents)); in RealignSplittedFiles()
97 ShiftBitExtentsOverExtents(file.extents, &in_file.deflates)); in RealignSplittedFiles()
100 num_blocks += utils::BlocksInExtents(in_file.extents); in RealignSplittedFiles()
104 TEST_AND_RETURN_FALSE(utils::BlocksInExtents(file.extents) == num_blocks); in RealignSplittedFiles()
215 vector<BitExtent> FindDeflates(const vector<Extent>& extents, in FindDeflates() argument
[all …]
Dmapfile_filesystem_unittest.cc47 void ExpectBlocksInRange(const vector<Extent>& extents, uint64_t total_blocks) { in ExpectBlocksInRange() argument
48 for (const Extent& extent : extents) { in ExpectBlocksInRange()
94 ExpectBlocksInRange(file.extents, fs->GetBlockCount()); in TEST_F()
97 EXPECT_EQ(map_files["/fileA"].extents, in TEST_F()
99 EXPECT_EQ(map_files["/fileB"].extents, in TEST_F()
102 map_files["/fileC"].extents, in TEST_F()
105 EXPECT_EQ(map_files["/file with spaces"].extents, in TEST_F()
107 EXPECT_EQ(map_files["/1234"].extents, (vector<Extent>{ExtentForRange(7, 1)})); in TEST_F()
Dfake_filesystem.cc40 const std::vector<Extent>& extents) { in AddFile() argument
43 file.extents = extents; in AddFile()
44 for (const Extent& extent : extents) { in AddFile()
Dext2_filesystem.cc58 vector<Extent>* extents = static_cast<vector<Extent>*>(priv); in ProcessInodeAllBlocks() local
59 AppendBlockToExtents(extents, *blocknr); in ProcessInodeAllBlocks()
232 &file.extents); in GetFiles()
293 AppendBlockToExtents(&inode_file.extents, block); in GetFiles()
308 AppendBlockToExtents(&free_space.extents, block); in GetFiles()
318 if (ino_file.second.extents.empty()) in GetFiles()
323 ranges.AddExtents(file.extents); in GetFiles()
324 file.extents = ranges.GetExtentsForBlockCount(ranges.blocks()); in GetFiles()
348 vector<Extent> extents; in LoadSettings() local
354 &extents); in LoadSettings()
[all …]
Dsquashfs_filesystem.cc190 file.extents = {ExtentForBytes(kBlockSize, start, cur_offset - start)}; in Init()
198 return a.extents[0].start_block() < b.extents[0].start_block(); in Init()
207 auto first_begin = first->extents[0].start_block(); in Init()
208 auto first_end = first_begin + first->extents[0].num_blocks(); in Init()
209 auto second_begin = second->extents[0].start_block(); in Init()
210 auto second_end = second_begin + second->extents[0].num_blocks(); in Init()
223 first->extents[0].set_num_blocks(second_begin - first_begin); in Init()
235 file_extents.AddExtents(file.extents); in Init()
246 file.extents = {metadata_extents[i]}; in Init()
252 return a.extents[0].start_block() < b.extents[0].start_block(); in Init()
[all …]
Dmapfile_filesystem.cc95 mapped_file.extents = {}; in GetFiles()
103 mapped_file.extents.push_back(ExtentForRange(block_start, 1)); in GetFiles()
121 mapped_file.extents.push_back( in GetFiles()
132 std::reverse(mapped_file.extents.begin(), mapped_file.extents.end()); in GetFiles()
Ddeflate_utils.h68 const std::vector<Extent>& extents,
84 bool CompactDeflates(const std::vector<Extent>& extents,
89 bool FindAndCompactDeflates(const std::vector<Extent>& extents,
Dextent_ranges.h57 void AddExtents(const std::vector<Extent>& extents);
58 void SubtractExtents(const std::vector<Extent>& extents);
92 std::vector<Extent> FilterExtentRanges(const std::vector<Extent>& extents,
Dextent_ranges.cc175 void ExtentRanges::AddExtents(const vector<Extent>& extents) { in AddExtents() argument
176 for (vector<Extent>::const_iterator it = extents.begin(), e = extents.end(); in AddExtents()
183 void ExtentRanges::SubtractExtents(const vector<Extent>& extents) { in SubtractExtents() argument
184 for (vector<Extent>::const_iterator it = extents.begin(), e = extents.end(); in SubtractExtents()
275 vector<Extent> FilterExtentRanges(const vector<Extent>& extents, in FilterExtentRanges() argument
279 for (Extent extent : extents) { in FilterExtentRanges()
/system/update_engine/payload_consumer/
Dextent_reader_unittest.cc64 void ReadExtents(vector<Extent> extents, brillo::Blob* blob) { in ReadExtents() argument
66 for (const auto& extent : extents) { in ReadExtents()
80 vector<Extent> extents = {ExtentForRange(1, 1)}; in TEST_F() local
82 EXPECT_TRUE(reader.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F()
84 brillo::Blob blob1(utils::BlocksInExtents(extents) * kBlockSize); in TEST_F()
87 ReadExtents(extents, &blob2); in TEST_F()
92 vector<Extent> extents = {ExtentForRange(1, 0)}; in TEST_F() local
94 EXPECT_TRUE(reader.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F()
111 vector<Extent> extents = {ExtentForRange(1, 1)}; in TEST_F() local
113 EXPECT_TRUE(reader.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F()
[all …]
Dfile_descriptor_utils_unittest.cc93 auto extents = CreateExtentList({{0, 5}}); in TEST_F() local
97 source_, extents, target_, extents, 4, nullptr)); in TEST_F()
115 auto extents = CreateExtentList({{0, 5}}); in TEST_F() local
118 source_, extents, target_, extents, 4, nullptr)); in TEST_F()
172 auto extents = CreateExtentList({{0, 5}}); in TEST_F() local
175 EXPECT_FALSE(fd_utils::ReadAndHashExtents(source_, extents, 4, &hash_out)); in TEST_F()
180 auto extents = CreateExtentList({{0, 5}}); in TEST_F() local
181 EXPECT_TRUE(fd_utils::ReadAndHashExtents(source_, extents, 4, nullptr)); in TEST_F()
187 auto extents = CreateExtentList({{1, 1}, {4, 1}, {2, 2}, {0, 1}}); in TEST_F() local
189 EXPECT_TRUE(fd_utils::ReadAndHashExtents(source_, extents, 4, &hash_out)); in TEST_F()
Dextent_writer_unittest.cc66 vector<Extent> extents = {ExtentForRange(1, 1)}; in TEST_F() local
70 direct_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F()
86 vector<Extent> extents = {ExtentForRange(1, 1)}; in TEST_F() local
89 direct_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F()
107 vector<Extent> extents = { in WriteAlignedExtents() local
114 direct_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in WriteAlignedExtents()
144 vector<Extent> extents = {ExtentForRange(1, 1), in TEST_F() local
155 direct_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F()
Dbzip_extent_writer_unittest.cc56 vector<Extent> extents = {ExtentForRange(0, 1)}; in TEST_F() local
69 bzip_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F()
98 vector<Extent> extents = {ExtentForBytes(kBlockSize, 0, kDecompressedLength)}; in TEST_F() local
102 bzip_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F()
Dextent_writer.h42 const google::protobuf::RepeatedPtrField<Extent>& extents,
58 const google::protobuf::RepeatedPtrField<Extent>& extents, in Init() argument
62 extents_ = extents; in Init()
/system/core/fs_mgr/liblp/
Dbuilder_test.cpp70 ASSERT_EQ(system->extents().size(), 1); in TEST_F()
72 LinearExtent* extent = system->extents()[0]->AsLinearExtent(); in TEST_F()
84 EXPECT_EQ(system->extents().size(), 1); in TEST_F()
85 EXPECT_EQ(system->extents()[0]->num_sectors(), 65536 / LP_SECTOR_SIZE); in TEST_F()
89 EXPECT_EQ(system->extents().size(), 0); in TEST_F()
93 EXPECT_EQ(system->extents().size(), 1); in TEST_F()
94 EXPECT_EQ(system->extents()[0]->num_sectors(), 131072 / LP_SECTOR_SIZE); in TEST_F()
98 EXPECT_EQ(system->extents().size(), 1); in TEST_F()
99 EXPECT_EQ(system->extents()[0]->num_sectors(), (1024 * 256) / LP_SECTOR_SIZE); in TEST_F()
104 EXPECT_EQ(system->extents().size(), 1); in TEST_F()
[all …]
Dbuilder.cpp55 out->extents.emplace_back( in AddTo()
90 out->extents.emplace_back(LpMetadataExtent{num_sectors_, LP_TARGET_TYPE_ZERO, 0, 0}); in AddTo()
266 metadata->extents.clear(); in UpdateMetadataForOtherSuper()
311 header_.extents.entry_size = sizeof(LpMetadataExtent); in MetadataBuilder()
348 const LpMetadataExtent& extent = metadata.extents[source.first_extent_index + i]; in ImportExtents()
590 void MetadataBuilder::ExtentsToFreeList(const std::vector<Interval>& extents, in ExtentsToFreeList() argument
594 for (size_t i = 1; i < extents.size(); i++) { in ExtentsToFreeList()
595 const Interval& previous = extents[i - 1]; in ExtentsToFreeList()
596 const Interval& current = extents[i]; in ExtentsToFreeList()
624 for (const auto& extent : partition->extents()) { in GetFreeRegions()
[all …]
Dwriter.cpp57 std::string extents(reinterpret_cast<const char*>(metadata.extents.data()), in SerializeMetadata()
58 metadata.extents.size() * sizeof(LpMetadataExtent)); in SerializeMetadata()
66 header.extents.offset = header.partitions.offset + partitions.size(); in SerializeMetadata()
67 header.groups.offset = header.extents.offset + extents.size(); in SerializeMetadata()
72 std::string tables = partitions + extents + groups + block_devices; in SerializeMetadata()
151 if (partition.first_extent_index + partition.num_extents > metadata.extents.size()) { in ValidateAndSerializeMetadata()
159 for (const auto& extent : metadata.extents) { in ValidateAndSerializeMetadata()
/system/update_engine/scripts/
Dpayload_info.py134 def _DisplayExtents(extents, name): argument
136 num_blocks = sum([ext.num_blocks for ext in extents])
138 '(%s,%s)' % (ext.start_block, ext.num_blocks) for ext in extents)
141 extent_plural = 's' if len(extents) > 1 else ''
144 (name, len(extents), extent_plural, num_blocks, block_plural))

1234