Home
last modified time | relevance | path

Searched refs:num_blocks (Results 1 – 25 of 96) sorted by relevance

1234

/system/update_engine/payload_generator/
Dextent_ranges.cc40 return a.start_block() + a.num_blocks() >= b.start_block(); in ExtentsOverlapOrTouch()
42 return b.start_block() + b.num_blocks() >= a.start_block(); in ExtentsOverlapOrTouch()
48 return a.num_blocks() != 0; in ExtentsOverlap()
52 return a.start_block() + a.num_blocks() > b.start_block(); in ExtentsOverlap()
54 return b.start_block() + b.num_blocks() > a.start_block(); in ExtentsOverlap()
73 uint64_t end = std::max(first.start_block() + first.num_blocks(), in UnionOverlappingExtents()
74 second.start_block() + second.num_blocks()); in UnionOverlappingExtents()
81 if (extent.start_block() == kSparseHole || extent.num_blocks() == 0) in AddExtent()
96 del_blocks += it->num_blocks(); in AddExtent()
106 blocks_ += extent.num_blocks(); in AddExtent()
[all …]
Dmerge_sequence_generator.cc94 CHECK_EQ(src_extent.num_blocks(), dst_extent.num_blocks()); in SplitSelfOverlapping()
103 for (size_t i = 0; i < src_extent.num_blocks(); i += diff) { in SplitSelfOverlapping()
104 auto num_blocks = std::min<size_t>(diff, src_extent.num_blocks() - i); in SplitSelfOverlapping() local
106 ExtentForRange(i + src_extent.start_block(), num_blocks), in SplitSelfOverlapping()
107 ExtentForRange(i + dst_extent.start_block(), num_blocks), in SplitSelfOverlapping()
126 if (op.src_extent().num_blocks() == op.dst_extent().num_blocks()) { in ProcessXorOps()
128 op.src_extent().num_blocks() + 1); in ProcessXorOps()
130 CHECK_EQ(op.src_extent().num_blocks(), in ProcessXorOps()
131 op.dst_extent().num_blocks() + 1); in ProcessXorOps()
158 src_extent.num_blocks()); in ProcessCopyOps()
[all …]
Dextent_utils.cc45 : extent.start_block() + extent.num_blocks(); in AppendBlockToExtents()
47 extent.set_num_blocks(extent.num_blocks() + 1); in AppendBlockToExtents()
97 static_cast<uint64_t>(e.num_blocks())); in ExtentsToStringTemplate()
118 if (last_ext.start_block() + last_ext.num_blocks() == in NormalizeExtents()
121 last_ext.set_num_blocks(last_ext.num_blocks() + curr_ext.num_blocks()); in NormalizeExtents()
142 if (scanned_blocks + extent.num_blocks() > block_offset) { in ExtentsSublist()
146 uint64_t new_num_blocks = extent.num_blocks(); in ExtentsSublist()
158 scanned_blocks += extent.num_blocks(); in ExtentsSublist()
166 return a.start_block() == b.start_block() && a.num_blocks() == b.num_blocks(); in operator ==()
175 << extent.start_block() + extent.num_blocks() - 1 << "]"; in operator <<()
Dextent_utils.h46 ret.resize(ret.size() + extent.num_blocks(), kSparseHole); in ExpandExtents()
49 block < (extent.start_block() + extent.num_blocks()); in ExpandExtents()
114 if (block_offset_ >= extents_[cur_extent_].num_blocks()) {
141 if (n - cur_block_count < extent.num_blocks()) { in GetNthBlock()
144 cur_block_count += extent.num_blocks(); in GetNthBlock()
151 block < extent.start_block() + extent.num_blocks(); in ExtentContains()
157 small.start_block() + small.num_blocks() <= in ExtentContains()
158 big.start_block() + big.num_blocks(); in ExtentContains()
Ddeflate_utils.cc92 size_t num_blocks = 0; in RealignSplittedFiles() local
100 num_blocks += utils::BlocksInExtents(in_file.extents); in RealignSplittedFiles()
104 TEST_AND_RETURN_FALSE(utils::BlocksInExtents(file.extents) == num_blocks); in RealignSplittedFiles()
111 ((extent.start_block() + extent.num_blocks()) * kBlockSize); in IsBitExtentInExtent()
155 last_end_block = base_ext.start_block() + base_ext.num_blocks(); in ShiftExtentsOverExtents()
159 base_ext.start_block() + base_ext.num_blocks()) { in ShiftExtentsOverExtents()
160 if (over_ext->start_block() + over_ext->num_blocks() <= in ShiftExtentsOverExtents()
161 base_ext.start_block() + base_ext.num_blocks()) { in ShiftExtentsOverExtents()
166 auto new_blocks = base_ext.start_block() + base_ext.num_blocks() - in ShiftExtentsOverExtents()
171 over_ext->num_blocks() - new_blocks)}; in ShiftExtentsOverExtents()
[all …]
Dmerge_sequence_generator_unittest.cc233 src_block_count += merge_op.src_extent().num_blocks(); in ValidateSplitSequence()
234 dst_block_count += merge_op.dst_extent().num_blocks(); in ValidateSplitSequence()
246 ASSERT_EQ(src_block_count, src_extent.num_blocks()); in ValidateSplitSequence()
247 ASSERT_EQ(dst_block_count, dst_extent.num_blocks()); in ValidateSplitSequence()
303 ASSERT_EQ(sequence[0].src_extent().num_blocks(), 6UL); in TEST_F()
304 ASSERT_EQ(sequence[0].dst_extent().num_blocks(), 5UL); in TEST_F()
342 ASSERT_EQ(sequence[0].src_extent().num_blocks(), 6UL); in TEST_F()
343 ASSERT_EQ(sequence[0].dst_extent().num_blocks(), 5UL); in TEST_F()
349 ASSERT_EQ(sequence[1].src_extent().num_blocks(), 6UL); in TEST_F()
350 ASSERT_EQ(sequence[1].dst_extent().num_blocks(), 5UL); in TEST_F()
[all …]
Dboot_img_filesystem_unittest.cc84 EXPECT_EQ(1u, files[0].extents[0].num_blocks()); in TEST_F()
90 EXPECT_EQ(2u, files[1].extents[0].num_blocks()); in TEST_F()
109 EXPECT_EQ(1u, files[0].extents[0].num_blocks()); in TEST_F()
115 EXPECT_EQ(2u, files[1].extents[0].num_blocks()); in TEST_F()
147 EXPECT_EQ(2u, files[0].extents[0].num_blocks()); in TEST_F()
153 EXPECT_EQ(1u, files[1].extents[0].num_blocks()); in TEST_F()
Dab_generator.cc121 uint64_t blocks_left = dst_ext.num_blocks(); in SplitSourceCopy()
123 if (curr_src_ext.num_blocks() <= blocks_left) { in SplitSourceCopy()
125 blocks_left -= curr_src_ext.num_blocks(); in SplitSourceCopy()
139 curr_src_ext.set_num_blocks(curr_src_ext.num_blocks() - blocks_left); in SplitSourceCopy()
141 blocks_left -= first_ext.num_blocks(); in SplitSourceCopy()
175 uint64_t data_size = dst_ext.num_blocks() * kBlockSize; in SplitAReplaceOp()
217 last_aop.op.dst_extents(last_dst_idx).num_blocks(); in MergeOperations()
220 last_aop.op.dst_extents(last_dst_idx).num_blocks() + in MergeOperations()
221 curr_aop.op.dst_extents(0).num_blocks(); in MergeOperations()
Dcow_size_estimator.cc57 op.dst_extent().num_blocks()); in CowDryRun()
66 std::vector<unsigned char> old_data(op.dst_extent().num_blocks() * in CowDryRun()
78 std::vector<unsigned char> new_data(op.dst_extent().num_blocks() * in CowDryRun()
112 cow_writer->AddZeroBlocks(ext.start_block(), ext.num_blocks()); in CowDryRun()
121 std::vector<unsigned char> data(ext.num_blocks() * block_size); in CowDryRun()
Dmapfile_filesystem.cc57 off_t num_blocks = file_size / kMapfileBlockSize; in CreateFromFile() local
64 return base::WrapUnique(new MapfileFilesystem(mapfile_filename, num_blocks)); in CreateFromFile()
68 off_t num_blocks) in MapfileFilesystem() argument
69 : mapfile_filename_(mapfile_filename), num_blocks_(num_blocks) {} in MapfileFilesystem()
/system/update_engine/payload_consumer/
Dextent_map_unittest.cc77 ASSERT_EQ(ret[0].num_blocks(), 3U); in TEST_F()
80 ASSERT_EQ(ret[1].num_blocks(), 2U); in TEST_F()
85 ASSERT_EQ(ret[0].num_blocks(), 3U); in TEST_F()
88 ASSERT_EQ(ret[1].num_blocks(), 5U); in TEST_F()
100 ASSERT_EQ(ret[0].num_blocks(), 5U); in TEST_F()
103 ASSERT_EQ(ret[1].num_blocks(), 5U); in TEST_F()
106 ASSERT_EQ(ret[2].num_blocks(), 5U); in TEST_F()
119 ASSERT_EQ(ret[0].num_blocks(), 5U); in TEST_F()
124 ASSERT_EQ(ret[0].num_blocks(), 3U); in TEST_F()
127 ASSERT_EQ(ret[1].num_blocks(), 5U); in TEST_F()
[all …]
Dxor_extent_writer.cc71 (src_block + xor_ext.num_blocks()) * BlockSize() + src_offset > in WriteExtent()
81 xor_ext.num_blocks() * BlockSize())); in WriteExtent()
84 xor_block_data.resize(BlockSize() * xor_ext.num_blocks()); in WriteExtent()
121 if (ext.start_block() + ext.num_blocks() > in WriteReplaceExtents()
122 extent.start_block() + extent.num_blocks()) { in WriteReplaceExtents()
132 ext.start_block(), dst_block_data, ext.num_blocks() * BlockSize())); in WriteReplaceExtents()
Dsnapshot_extent_writer_unittest.cc40 size_t num_blocks; member
48 uint64_t num_blocks) override { in EmitCopy() argument
49 for (size_t i = 0; i < num_blocks; i++) { in EmitCopy()
64 bool EmitZeroBlocks(uint64_t new_block_start, uint64_t num_blocks) override { in EmitZeroBlocks() argument
117 size_t num_blocks) { in AddExtent() argument
120 extent->set_num_blocks(num_blocks); in AddExtent()
Dvabc_partition_writer.cc117 TEST_AND_RETURN_FALSE(cow_op.src_extent().num_blocks() != 0); in WriteAllCopyOps()
121 cow_op.src_extent().num_blocks())); in WriteAllCopyOps()
126 for (size_t i = cow_op.src_extent().num_blocks(); i > 0; i--) { in WriteAllCopyOps()
235 for (size_t i = 0; i < dst_extent.num_blocks(); i++) { in WriteMergeSequence()
239 for (int i = dst_extent.num_blocks() - 1; i >= 0; i--) { in WriteMergeSequence()
245 for (size_t i = 0; i < dst_extent.num_blocks(); i++) { in WriteMergeSequence()
249 for (int i = dst_extent.num_blocks() - 1; i >= 0; i--) { in WriteMergeSequence()
267 cow_writer_->AddZeroBlocks(extent.start_block(), extent.num_blocks())); in PerformZeroOrDiscardOperation()
Dextent_reader.cc44 total_size_ += extent.num_blocks() * block_size_; in Init()
75 cur_extent_->num_blocks() * block_size_ - cur_extent_bytes_read_; in Read()
92 if (cur_extent_bytes_read_ == cur_extent_->num_blocks() * block_size_) { in Read()
/system/core/fs_mgr/libsnapshot/snapuserd/user-space-merge/
Dsnapuserd_test.cpp309 size_t num_blocks = size_ / options.block_size; in CreateCowDeviceWithCopyOverlap_2() local
310 size_t x = num_blocks; in CreateCowDeviceWithCopyOverlap_2()
335 x = num_blocks; in CreateCowDeviceWithCopyOverlap_2()
361 size_t num_blocks = size_ / options.block_size; in CreateCowDeviceWithCopyOverlap_1() local
362 size_t x = num_blocks; in CreateCowDeviceWithCopyOverlap_1()
363 size_t blk_src_copy = num_blocks - 1; in CreateCowDeviceWithCopyOverlap_1()
420 size_t num_blocks = size_ / options.block_size; in CreateCowDeviceOrderedOpsInverted() local
421 size_t blk_end_copy = num_blocks * 3; in CreateCowDeviceOrderedOpsInverted()
422 size_t source_blk = num_blocks - 1; in CreateCowDeviceOrderedOpsInverted()
426 size_t x = num_blocks; in CreateCowDeviceOrderedOpsInverted()
[all …]
/system/core/fs_mgr/libsnapshot/include/libsnapshot/
Dcow_writer.h71 bool AddCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks = 1);
81 bool AddZeroBlocks(uint64_t new_block_start, uint64_t num_blocks);
102 virtual bool EmitCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks = 1) = 0;
106 virtual bool EmitZeroBlocks(uint64_t new_block_start, uint64_t num_blocks) = 0;
120 void EnqueueCompressBlocks(const void* buffer, size_t num_blocks);
127 const void* buffer, size_t num_blocks,
133 size_t num_blocks; member
148 bool CompressBlocks(const void* buffer, size_t num_blocks,
177 virtual bool EmitCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks = 1) override;
181 virtual bool EmitZeroBlocks(uint64_t new_block_start, uint64_t num_blocks) override;
[all …]
Dsnapshot_writer.h77 bool EmitCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks = 1) override;
81 bool EmitZeroBlocks(uint64_t new_block_start, uint64_t num_blocks) override;
113 bool EmitZeroBlocks(uint64_t new_block_start, uint64_t num_blocks) override;
116 bool EmitCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks = 1) override;
/system/core/fs_mgr/libsnapshot/libsnapshot_cow/
Dcow_compress.cpp106 bool CompressWorker::CompressBlocks(const void* buffer, size_t num_blocks, in CompressBlocks() argument
108 return CompressBlocks(compression_, block_size_, buffer, num_blocks, compressed_data); in CompressBlocks()
112 const void* buffer, size_t num_blocks, in CompressBlocks() argument
115 while (num_blocks) { in CompressBlocks()
127 num_blocks -= 1; in CompressBlocks()
152 bool ret = CompressBlocks(blocks.buffer, blocks.num_blocks, &blocks.compressed_data); in RunThread()
171 void CompressWorker::EnqueueCompressBlocks(const void* buffer, size_t num_blocks) { in EnqueueCompressBlocks() argument
177 blocks.num_blocks = num_blocks; in EnqueueCompressBlocks()
Dcow_writer.cpp63 bool ICowWriter::AddCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks) { in AddCopy() argument
64 CHECK(num_blocks != 0); in AddCopy()
66 for (size_t i = 0; i < num_blocks; i++) { in AddCopy()
72 return EmitCopy(new_block, old_block, num_blocks); in AddCopy()
82 uint64_t num_blocks = size / options_.block_size; in AddRawBlocks() local
83 uint64_t last_block = new_block_start + num_blocks - 1; in AddRawBlocks()
98 uint64_t num_blocks = size / options_.block_size; in AddXorBlocks() local
99 uint64_t last_block = new_block_start + num_blocks - 1; in AddXorBlocks()
110 bool ICowWriter::AddZeroBlocks(uint64_t new_block_start, uint64_t num_blocks) { in AddZeroBlocks() argument
111 uint64_t last_block = new_block_start + num_blocks - 1; in AddZeroBlocks()
[all …]
/system/core/fs_mgr/libsnapshot/
Dsnapshot_writer.cpp118 uint64_t num_blocks) { in EmitCopy() argument
119 return cow_->AddCopy(new_block, old_block, num_blocks); in EmitCopy()
132 bool CompressedSnapshotWriter::EmitZeroBlocks(uint64_t new_block_start, uint64_t num_blocks) { in EmitZeroBlocks() argument
133 return cow_->AddZeroBlocks(new_block_start, num_blocks); in EmitZeroBlocks()
188 bool OnlineKernelSnapshotWriter::EmitZeroBlocks(uint64_t new_block_start, uint64_t num_blocks) { in EmitZeroBlocks() argument
190 for (uint64_t i = 0; i < num_blocks; i++) { in EmitZeroBlocks()
199 uint64_t num_blocks) { in EmitCopy() argument
205 CHECK(num_blocks != 0); in EmitCopy()
207 for (size_t i = 0; i < num_blocks; i++) { in EmitCopy()
Dpartition_cow_creator.cpp97 if (s_it->num_blocks() <= s_offset || d_it->num_blocks() <= d_offset) { in OptimizeSourceCopyOperation()
104 auto s_step = s_it->num_blocks() - s_offset; in OptimizeSourceCopyOperation()
105 auto d_step = d_it->num_blocks() - d_offset; in OptimizeSourceCopyOperation()
122 while (s_it != src_extents.end() && s_offset >= s_it->num_blocks()) { in OptimizeSourceCopyOperation()
126 while (d_it != dst_extents.end() && d_offset >= d_it->num_blocks()) { in OptimizeSourceCopyOperation()
136 const auto block_boundary = de.start_block() + de.num_blocks(); in WriteExtent()
/system/core/fs_mgr/libsnapshot/snapuserd/dm-snapshot-merge/
Dcow_snapuserd_test.cpp393 size_t num_blocks = size_ / options.block_size; in CreateCowDeviceWithCopyOverlap_2() local
394 size_t x = num_blocks; in CreateCowDeviceWithCopyOverlap_2()
419 x = num_blocks; in CreateCowDeviceWithCopyOverlap_2()
445 size_t num_blocks = size_ / options.block_size; in CreateCowDeviceWithCopyOverlap_1() local
446 size_t x = num_blocks; in CreateCowDeviceWithCopyOverlap_1()
447 size_t blk_src_copy = num_blocks - 1; in CreateCowDeviceWithCopyOverlap_1()
504 size_t num_blocks = size_ / options.block_size; in CreateCowDeviceOrderedOpsInverted() local
505 size_t blk_end_copy = num_blocks * 3; in CreateCowDeviceOrderedOpsInverted()
506 size_t source_blk = num_blocks - 1; in CreateCowDeviceOrderedOpsInverted()
510 size_t x = num_blocks; in CreateCowDeviceOrderedOpsInverted()
[all …]
/system/update_engine/scripts/
Dpayload_info.py141 num_blocks = sum([ext.num_blocks for ext in extents])
143 '(%s,%s)' % (ext.start_block, ext.num_blocks) for ext in extents)
147 block_plural = 's' if num_blocks > 1 else ''
149 (name, len(extents), extent_plural, num_blocks, block_plural))
178 read_blocks += sum([ext.num_blocks for ext in curr_op.src_extents])
179 written_blocks += sum([ext.num_blocks for ext in curr_op.dst_extents])
183 last_ext.start_block + last_ext.num_blocks):
/system/chre/apps/nearby/location/lbs/contexthub/nanoapps/nearby/crypto/
Dhkdf.c32 const size_t num_blocks = (okmLen + SHA2_HASH_SIZE - 1) / SHA2_HASH_SIZE; in hkdfExpand() local
33 if (num_blocks >= 256u) return; in hkdfExpand()
52 for (size_t i = 0; i < num_blocks; i++) { in hkdfExpand()

1234