/system/update_engine/payload_consumer/ |
D | extent_writer_unittest.cc | 44 const size_t kBlockSize = 4096; variable 70 direct_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F() 73 EXPECT_EQ(static_cast<off_t>(kBlockSize + bytes.size()), in TEST_F() 79 brillo::Blob expected_file(kBlockSize); in TEST_F() 89 direct_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F() 94 WriteAlignedExtents(kBlockSize * 3, kBlockSize * 3); in TEST_F() 102 WriteAlignedExtents(kBlockSize * 2, kBlockSize / 2); in TEST_F() 109 brillo::Blob data(kBlockSize * 3); in WriteAlignedExtents() 114 direct_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in WriteAlignedExtents() 134 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 | 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 | 40 const uint32_t kBlockSize = 4096; variable 69 bzip_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F() 98 vector<Extent> extents = {ExtentForBytes(kBlockSize, 0, kDecompressedLength)}; in TEST_F() 102 bzip_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F()
|
D | delta_performer_integration_test.cc | 130 EXPECT_EQ(0U, image_size % kBlockSize); in CompareFilesByBlock() 138 for (size_t i = 0; i < image_size; i += kBlockSize) { in CompareFilesByBlock() 139 EXPECT_EQ(0U, i % kBlockSize); in CompareFilesByBlock() 140 brillo::Blob a_sub(&a_data[i], &a_data[i + kBlockSize]); in CompareFilesByBlock() 141 brillo::Blob b_sub(&b_data[i], &b_data[i + kBlockSize]); in CompareFilesByBlock() 142 EXPECT_TRUE(a_sub == b_sub) << "Block " << (i / kBlockSize) << " differs"; in CompareFilesByBlock() 378 while (hardtocompress.size() < 3 * kBlockSize) { in GenerateDeltaFile() 467 while (hardtocompress.size() < 3 * kBlockSize) { in GenerateDeltaFile() 1043 kBlockSize, in TEST()
|
/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 | 164 size_t block_size_{kBlockSize}; 205 EXPECT_TRUE(WriteExtents(old_part_.path, old_extents, kBlockSize, data_blob)); in TEST_F() 206 EXPECT_TRUE(WriteExtents(new_part_.path, new_extents, kBlockSize, data_blob)); in TEST_F() 227 EXPECT_EQ(kBlockSize, op.src_length()); in TEST_F() 229 EXPECT_EQ(kBlockSize, op.dst_length()); in TEST_F() 260 file_data.resize(file_data.size() + kBlockSize, 'a' + i); in TEST_F() 263 EXPECT_TRUE(WriteExtents(old_part_.path, old_extents, kBlockSize, file_data)); in TEST_F() 264 EXPECT_TRUE(WriteExtents(new_part_.path, new_extents, kBlockSize, file_data)); in TEST_F() 293 EXPECT_EQ(num_blocks * kBlockSize, op.src_length()); in TEST_F() 294 EXPECT_EQ(num_blocks * kBlockSize, op.dst_length()); in TEST_F() [all …]
|
D | payload_generation_config.cc | 70 TEST_AND_RETURN_FALSE(fs_interface->GetBlockSize() == kBlockSize); in OpenFilesystem() 78 TEST_AND_RETURN_FALSE(fs_interface->GetBlockSize() == kBlockSize); in OpenFilesystem() 85 TEST_AND_RETURN_FALSE(fs_interface->GetBlockSize() == kBlockSize); in OpenFilesystem() 90 TEST_AND_RETURN_FALSE(size % kBlockSize == 0); in OpenFilesystem() 92 "<" + name + "-partition>", kBlockSize, size / kBlockSize); in OpenFilesystem()
|
D | delta_diff_utils.cc | 172 removed_bytes += min_num_blocks * kBlockSize; in RemoveIdenticalBlockRanges() 177 if (do_remove && (nonfull_block_bytes = total_bytes % kBlockSize)) in RemoveIdenticalBlockRanges() 178 removed_bytes -= kBlockSize - nonfull_block_bytes; in RemoveIdenticalBlockRanges() 395 old_part.size / kBlockSize, in DeltaReadPartition() 396 new_part.size / kBlockSize, in DeltaReadPartition() 472 ExtentForRange(0, new_part.size / kBlockSize)}; in DeltaReadPartition() 477 old_unvisited.push_back(ExtentForRange(0, old_part.size / kBlockSize)); in DeltaReadPartition() 538 old_num_blocks * kBlockSize, in DeltaMovedAndZeroBlocks() 539 new_num_blocks * kBlockSize, in DeltaMovedAndZeroBlocks() 540 kBlockSize, in DeltaMovedAndZeroBlocks() [all …]
|
D | ab_generator_unittest.cc | 61 const size_t part_size = part_num_blocks * kBlockSize; in TestSplitReplaceOrReplaceBzOperation() 78 const size_t op_ex1_offset = op_ex1_start_block * kBlockSize; in TestSplitReplaceOrReplaceBzOperation() 79 const size_t op_ex1_size = op_ex1_num_blocks * kBlockSize; in TestSplitReplaceOrReplaceBzOperation() 80 const size_t op_ex2_offset = op_ex2_start_block * kBlockSize; in TestSplitReplaceOrReplaceBzOperation() 81 const size_t op_ex2_size = op_ex2_num_blocks * kBlockSize; in TestSplitReplaceOrReplaceBzOperation() 211 const size_t part_size = part_num_blocks * kBlockSize; in TestMergeReplaceOrReplaceBzOperations() 230 const size_t total_op_size = total_op_num_blocks * kBlockSize; in TestMergeReplaceOrReplaceBzOperations() 234 const size_t first_op_size = first_op_num_blocks * kBlockSize; in TestMergeReplaceOrReplaceBzOperations() 516 second_op.set_data_length(2 * kBlockSize); in TEST_F() 525 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 | 142 file.extents = {ExtentForBytes(kBlockSize, start, cur_offset - start)}; in Init() 187 vector<Extent> full = {ExtentForBytes(kBlockSize, 0, size_)}; in Init() 301 return kBlockSize; in GetBlockSize() 305 return size_ / kBlockSize; in GetBlockCount()
|
D | delta_diff_generator.cc | 51 const size_t kBlockSize = 4096; // bytes variable
|
D | payload_signer.cc | 261 utils::DivRoundUp(signature_blob_length, kBlockSize)); in AddSignatureToManifest()
|
D | generate_delta_main.cc | 603 payload_config.block_size = kBlockSize; in Main()
|
/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/core/adb/client/ |
D | incremental_server.cpp | 47 static constexpr int kHashesPerBlock = kBlockSize / kDigestSize; 48 static constexpr int kCompressedSizeMax = kBlockSize * 0.95; 53 static constexpr int kCompressBound = std::max(kBlockSize, LZ4_COMPRESSBOUND(kBlockSize)); 75 return val & ~(kBlockSize - 1); in roundDownToBlockOffset() 79 return roundDownToBlockOffset(val + kBlockSize - 1); in roundUpToBlockOffset() 83 return roundUpToBlockOffset(bytes) / kBlockSize; in numBytesToNumBlocks() 87 return static_cast<off64_t>(blockIdx) * kBlockSize; in blockIndexToOffset() 142 template <size_t Size = kBlockSize> 162 bytes_read = adb_pread(fd_, buf, kBlockSize, offsetStart); in ReadDataBlock() 168 bytes_read = adb_pread(tree_fd_, buf, kBlockSize, offsetStart); in ReadTreeBlock() [all …]
|
D | incremental_utils.cpp | 38 return (offset & ~(kBlockSize - 1)) >> 12; in offsetToBlockIndex() 46 constexpr int hash_per_block = kBlockSize / kDigestSize; in verity_tree_blocks_for_file() 50 auto block_count = 1 + (fileSize - 1) / kBlockSize; in verity_tree_blocks_for_file() 60 return verity_tree_blocks_for_file(fileSize) * kBlockSize; in verity_tree_size_for_file() 224 static constexpr auto kNumBlocksInEocdSearch = kMaxZipCommentSize / kBlockSize + 1; in ZipPriorityBlocks()
|
D | incremental_utils.h | 33 constexpr int kBlockSize = 4096; variable
|
/system/gsid/ |
D | partition_installer.cpp | 200 static const size_t kBlockSize = 4096; in CommitGsiChunk() local 201 auto buffer = std::make_unique<char[]>(kBlockSize); in CommitGsiChunk() 206 size_t max_to_read = std::min(static_cast<uint64_t>(kBlockSize), remaining); in CommitGsiChunk()
|
/system/extras/partition_tools/ |
D | lpmake.cc | 102 kBlockSize = 'b', enumerator 122 { "block-size", required_argument, nullptr, (int)Option::kBlockSize }, in main() 202 case Option::kBlockSize: in main()
|
/system/incremental_delivery/libdataloader/include/ |
D | dataloader.h | 54 constexpr int kBlockSize = INCFS_DATA_FILE_BLOCK_SIZE; variable
|
/system/incremental_delivery/incfs/include/ |
D | incfs.h | 186 constexpr int kBlockSize = INCFS_DATA_FILE_BLOCK_SIZE; variable
|