/system/update_engine/payload_consumer/ |
D | extent_writer_unittest.cc | 44 const size_t kBlockSize = 4096; variable 69 EXPECT_TRUE(direct_writer.Init({extents.begin(), extents.end()}, kBlockSize)); in TEST_F() 72 EXPECT_EQ(static_cast<off_t>(kBlockSize + bytes.size()), in TEST_F() 78 brillo::Blob expected_file(kBlockSize); in TEST_F() 87 EXPECT_TRUE(direct_writer.Init({extents.begin(), extents.end()}, kBlockSize)); in TEST_F() 92 WriteAlignedExtents(kBlockSize * 3, kBlockSize * 3); in TEST_F() 100 WriteAlignedExtents(kBlockSize * 2, kBlockSize / 2); in TEST_F() 107 brillo::Blob data(kBlockSize * 3); in WriteAlignedExtents() 111 EXPECT_TRUE(direct_writer.Init({extents.begin(), extents.end()}, kBlockSize)); in WriteAlignedExtents() 131 data.begin() + kBlockSize, in WriteAlignedExtents() [all …]
|
D | extent_reader_unittest.cc | 43 const size_t kBlockSize = 8; variable 69 &sample_[extent.start_block() * kBlockSize], in ReadExtents() 70 &sample_[(extent.start_block() + extent.num_blocks()) * kBlockSize]); in ReadExtents() 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() 94 EXPECT_TRUE(reader.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F() 103 EXPECT_TRUE(reader.Init(fd_, {}, kBlockSize)); in TEST_F() 113 EXPECT_TRUE(reader.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F() 115 brillo::Blob blob(utils::BlocksInExtents(extents) * kBlockSize + 1); in TEST_F() 122 EXPECT_TRUE(reader.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F() [all …]
|
D | snapshot_extent_writer_unittest.cc | 94 .block_size = static_cast<uint32_t>(kBlockSize)}; 110 writer_.Init(extents, kBlockSize); in TEST_F() 112 std::vector<uint8_t> buf(kBlockSize, 0); in TEST_F() 117 writer_.Write(buf.data(), kBlockSize - 1); in TEST_F() 121 writer_.Write(buf.data() + kBlockSize - 1, 1); in TEST_F() 133 writer_.Init(extents, kBlockSize); in TEST_F() 135 std::vector<uint8_t> buf(kBlockSize * 2, 0); in TEST_F() 156 writer_.Init(extents, kBlockSize); in TEST_F() 158 std::vector<uint8_t> buf(kBlockSize * 3); in TEST_F() 163 buf[kBlockSize - 1] = 254; in TEST_F() [all …]
|
D | mount_history.cc | 31 static constexpr ssize_t kBlockSize = 4096; in LogMountHistory() local 37 brillo::Blob block0_buffer(kBlockSize); in LogMountHistory() 41 blockdevice_fd, block0_buffer.data(), kBlockSize, 0, &bytes_read)) { in LogMountHistory() 46 if (bytes_read != kBlockSize) { in LogMountHistory()
|
D | bzip_extent_writer_unittest.cc | 39 const uint32_t kBlockSize = 4096; variable 67 EXPECT_TRUE(bzip_writer.Init({extents.begin(), extents.end()}, kBlockSize)); in TEST_F() 96 vector<Extent> extents = {ExtentForBytes(kBlockSize, 0, kDecompressedLength)}; in TEST_F() 99 EXPECT_TRUE(bzip_writer.Init({extents.begin(), extents.end()}, kBlockSize)); in TEST_F()
|
D | mock_partition_writer.h | 29 MockPartitionWriter() : PartitionWriter({}, {}, nullptr, kBlockSize, false) {} in MockPartitionWriter()
|
D | partition_writer_unittest.cc | 88 EXPECT_TRUE(extent_writer.Init(op.src_extents(), kBlockSize)); in PerformSourceCopyOp() 117 partition_update_, install_part_, &dynamic_control_, kBlockSize, false};
|
D | delta_performer_integration_test.cc | 174 EXPECT_EQ(0U, image_size % kBlockSize); in CompareFilesByBlock() 182 for (size_t i = 0; i < image_size; i += kBlockSize) { in CompareFilesByBlock() 183 EXPECT_EQ(0U, i % kBlockSize); in CompareFilesByBlock() 184 brillo::Blob a_sub(&a_data[i], &a_data[i + kBlockSize]); in CompareFilesByBlock() 185 brillo::Blob b_sub(&b_data[i], &b_data[i + kBlockSize]); in CompareFilesByBlock() 186 EXPECT_TRUE(a_sub == b_sub) << "Block " << (i / kBlockSize) << " differs"; in CompareFilesByBlock() 420 while (hardtocompress.size() < 3 * kBlockSize) { in GenerateDeltaFile() 510 while (hardtocompress.size() < 3 * kBlockSize) { in GenerateDeltaFile() 1041 kBlockSize, in TEST_F()
|
/system/core/fs_mgr/libsnapshot/ |
D | snapshot_reader_test.cpp | 30 static constexpr uint32_t kBlockSize = 4096; variable 56 std::string block(kBlockSize, 0); in WriteBaseDevice() 84 std::string block(kBlockSize, 0); in TestBlockReads() 85 ASSERT_EQ(reader->Seek(i * kBlockSize, SEEK_SET), i * kBlockSize); in TestBlockReads() 86 ASSERT_EQ(reader->Read(block.data(), block.size()), kBlockSize); in TestBlockReads() 91 std::string block(kBlockSize, 0); in TestBlockReads() 92 ASSERT_EQ(reader->Seek(3 * kBlockSize, SEEK_SET), 3 * kBlockSize); in TestBlockReads() 93 ASSERT_EQ(reader->Read(block.data(), block.size()), kBlockSize); in TestBlockReads() 96 ASSERT_EQ(reader->Seek(5 * kBlockSize, SEEK_SET), 5 * kBlockSize); in TestBlockReads() 97 ASSERT_EQ(reader->Read(block.data(), block.size()), kBlockSize); in TestBlockReads() [all …]
|
D | estimate_cow_from_nonab_ota.cpp | 47 static constexpr size_t kBlockSize = 4096; variable 318 options.block_size = kBlockSize; in AnalyzePartition() 329 std::string zeroes(kBlockSize, '\0'); in AnalyzePartition() 330 std::string chunk(kBlockSize, '\0'); in AnalyzePartition() 331 std::string src_chunk(kBlockSize, '\0'); in AnalyzePartition() 351 uint64_t source_offset = block_number * kBlockSize; in AnalyzePartition() 353 off64_t offset = block_number * kBlockSize; in AnalyzePartition() 393 std::string chunk(kBlockSize, '\0'); in GetBlockMap()
|
D | make_cow_from_ab_ota.cpp | 52 static constexpr uint64_t kBlockSize = 4096; variable 191 options.block_size = kBlockSize; in ProcessPartition() 250 total += extent.num_blocks() * kBlockSize; in SizeOfAllExtents() 342 uint64_t offset = extent.start_block() * kBlockSize; in ProcessDiff() 348 uint64_t size = extent.num_blocks() * kBlockSize; in ProcessDiff() 401 uint64_t size = extent.num_blocks() * kBlockSize; in ProcessDiff() 537 dst_size += extent.num_blocks() * kBlockSize; in ProcessReplace() 598 uint64_t extent_size = extent.num_blocks() * kBlockSize; in ProcessReplace()
|
D | partition_cow_creator.cpp | 38 static constexpr uint64_t kBlockSize = 4096; variable 157 size += kBlockSize - 1; in GetCowSize() 158 size &= ~(kBlockSize - 1); in GetCowSize()
|
D | power_test.cpp | 509 constexpr size_t kBlockSize = 4096; in Check() local 510 uint8_t canonical_buffer[kBlockSize]; in Check() 511 uint8_t image_buffer[kBlockSize]; in Check() 512 uint8_t md_buffer[kBlockSize]; in Check() 517 size_t bytes = (size_t)std::min((uint64_t)kBlockSize, remaining); in Check()
|
/system/update_engine/payload_generator/ |
D | deflate_utils.cc | 65 kMinimumSquashfsImageSize / kBlockSize) { in IsSquashfsImage() 69 file.extents[0].start_block() * kBlockSize, in IsSquashfsImage() 109 return (bit_extent.offset / 8) >= (extent.start_block() * kBlockSize) && in IsBitExtentInExtent() 111 ((extent.start_block() + extent.num_blocks()) * kBlockSize); in IsBitExtentInExtent() 183 utils::BlocksInExtents(base_extents) * kBlockSize); in ShiftBitExtentsOverExtents() 194 if (byte_o_ext.offset >= b_ext.start_block() * kBlockSize && in ShiftBitExtentsOverExtents() 196 (b_ext.start_block() + b_ext.num_blocks()) * kBlockSize) { in ShiftBitExtentsOverExtents() 198 (b_ext.start_block() + b_ext.num_blocks()) * kBlockSize) { in ShiftBitExtentsOverExtents() 200 o_ext->offset += gap_blocks * kBlockSize * 8; in ShiftBitExtentsOverExtents() 236 size_t gap_bytes = extent.start_block() * kBlockSize - bytes_passed; in CompactDeflates() [all …]
|
D | delta_diff_utils_unittest.cc | 154 size_t block_size_{kBlockSize}; 193 brillo::Blob ones(kBlockSize, 1); in TEST_F() 199 for (uint32_t i = 0; i < kBlockSize; i++) { in TEST_F() 207 WriteExtents(new_part_.path, new_extents, kBlockSize, data_to_test)); in TEST_F() 241 brillo::Blob data_blob(kBlockSize); in TEST_F() 248 EXPECT_TRUE(WriteExtents(old_part_.path, old_extents, kBlockSize, data_blob)); in TEST_F() 249 EXPECT_TRUE(WriteExtents(new_part_.path, new_extents, kBlockSize, data_blob)); in TEST_F() 273 brillo::Blob data_blob(kBlockSize); in TEST_F() 280 EXPECT_TRUE(WriteExtents(old_part_.path, old_extents, kBlockSize, data_blob)); in TEST_F() 283 EXPECT_TRUE(WriteExtents(new_part_.path, new_extents, kBlockSize, data_blob)); in TEST_F() [all …]
|
D | payload_generation_config.cc | 72 TEST_AND_RETURN_FALSE(fs_interface->GetBlockSize() == kBlockSize); in OpenFilesystem() 80 TEST_AND_RETURN_FALSE(fs_interface->GetBlockSize() == kBlockSize); in OpenFilesystem() 87 TEST_AND_RETURN_FALSE(fs_interface->GetBlockSize() == kBlockSize); in OpenFilesystem() 95 TEST_AND_RETURN_FALSE(fs_interface->GetBlockSize() == kBlockSize); in OpenFilesystem() 100 TEST_AND_RETURN_FALSE(size % kBlockSize == 0); in OpenFilesystem() 102 "<" + name + "-partition>", kBlockSize, size / kBlockSize); in OpenFilesystem()
|
D | delta_diff_utils.cc | 297 old_part.size / kBlockSize, in DeltaReadPartition() 298 new_part.size / kBlockSize, in DeltaReadPartition() 370 ExtentForRange(0, new_part.size / kBlockSize)}; in DeltaReadPartition() 375 old_unvisited.push_back(ExtentForRange(0, old_part.size / kBlockSize)); in DeltaReadPartition() 436 old_num_blocks * kBlockSize, in DeltaMovedAndZeroBlocks() 437 new_num_blocks * kBlockSize, in DeltaMovedAndZeroBlocks() 438 kBlockSize, in DeltaMovedAndZeroBlocks() 710 blocks_to_read * kBlockSize > kMaxBsdiffDestinationSize) { in ReadExtentsToDiff() 711 LOG(INFO) << "bsdiff ignored, data too big: " << blocks_to_read * kBlockSize in ReadExtentsToDiff() 718 blocks_to_read * kBlockSize > kMaxPuffdiffDestinationSize) { in ReadExtentsToDiff() [all …]
|
D | ab_generator_unittest.cc | 61 const size_t part_size = part_num_blocks * kBlockSize; in TestSplitReplaceOrReplaceXzOperation() 77 const size_t op_ex1_offset = op_ex1_start_block * kBlockSize; in TestSplitReplaceOrReplaceXzOperation() 78 const size_t op_ex1_size = op_ex1_num_blocks * kBlockSize; in TestSplitReplaceOrReplaceXzOperation() 79 const size_t op_ex2_offset = op_ex2_start_block * kBlockSize; in TestSplitReplaceOrReplaceXzOperation() 80 const size_t op_ex2_size = op_ex2_num_blocks * kBlockSize; in TestSplitReplaceOrReplaceXzOperation() 209 const size_t part_size = part_num_blocks * kBlockSize; in TestMergeReplaceOrReplaceXzOperations() 227 const size_t total_op_size = total_op_num_blocks * kBlockSize; in TestMergeReplaceOrReplaceXzOperations() 231 const size_t first_op_size = first_op_num_blocks * kBlockSize; in TestMergeReplaceOrReplaceXzOperations() 512 second_op.set_data_length(2 * kBlockSize); in TEST_F() 521 third_op.set_data_length(3 * kBlockSize); in TEST_F() [all …]
|
D | boot_img_filesystem.cc | 99 return kBlockSize; in GetBlockSize() 103 return utils::DivRoundUp(utils::FileSize(filename_), kBlockSize); in GetBlockCount() 111 file.extents = {ExtentForBytes(kBlockSize, offset, size)}; in GetFile()
|
D | delta_diff_generator.h | 26 extern const size_t kBlockSize;
|
D | ab_generator.cc | 176 uint64_t data_size = dst_ext.num_blocks() * kBlockSize; in SplitAReplaceOp() 274 brillo::Blob data(utils::BlocksInExtents(dst_extents) * kBlockSize); in AddDataAndSetType() 276 target_part_path, dst_extents, &data, data.size(), kBlockSize)); in AddDataAndSetType() 305 : utils::BlocksInExtents(aop.op.src_extents()) * kBlockSize; in AddSourceHash() 307 source_part_path, src_extents, &src_data, src_length, kBlockSize)); in AddSourceHash()
|
D | squashfs_filesystem.cc | 185 file.extents = {ExtentForBytes(kBlockSize, start, cur_offset - start)}; in Init() 232 vector<Extent> full = {ExtentForBytes(kBlockSize, 0, size_)}; in Init() 360 return kBlockSize; in GetBlockSize() 364 return size_ / kBlockSize; in GetBlockCount()
|
/system/extras/verity/ |
D | build_verity_tree_main.cpp | 48 constexpr size_t kBlockSize = 4096; in main() local 122 HashTreeBuilder builder(kBlockSize, hash_function); in main() 157 if (!generate_verity_tree(argv[0], argv[1], &builder, salt, kBlockSize, in main()
|
/system/gsid/ |
D | partition_installer.cpp | 194 static const size_t kBlockSize = 4096; in CommitGsiChunk() local 195 auto buffer = std::make_unique<char[]>(kBlockSize); in CommitGsiChunk() 200 size_t max_to_read = std::min(static_cast<uint64_t>(kBlockSize), remaining); in CommitGsiChunk()
|
/system/extras/partition_tools/ |
D | lpmake.cc | 110 kBlockSize = 'b', enumerator 180 { "block-size", required_argument, nullptr, (int)Option::kBlockSize }, in main() 269 case Option::kBlockSize: in main()
|