Home
last modified time | relevance | path

Searched refs:num_blocks (Results 1 – 25 of 90) 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()
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()
72 uint64_t end = std::max(first.start_block() + first.num_blocks(), in UnionOverlappingExtents()
73 second.start_block() + second.num_blocks()); in UnionOverlappingExtents()
80 if (extent.start_block() == kSparseHole || extent.num_blocks() == 0) in AddExtent()
92 del_blocks += it->num_blocks(); in AddExtent()
102 blocks_ += extent.num_blocks(); in AddExtent()
114 uint64_t base_end = base.start_block() + base.num_blocks(); in SubtractOverlappingExtents()
[all …]
Dextent_utils.cc44 : extent.start_block() + extent.num_blocks(); in AppendBlockToExtents()
46 extent.set_num_blocks(extent.num_blocks() + 1); in AppendBlockToExtents()
95 static_cast<uint64_t>(e.num_blocks())); in ExtentsToString()
107 if (last_ext.start_block() + last_ext.num_blocks() == in NormalizeExtents()
110 last_ext.set_num_blocks(last_ext.num_blocks() + curr_ext.num_blocks()); in NormalizeExtents()
131 if (scanned_blocks + extent.num_blocks() > block_offset) { in ExtentsSublist()
135 uint64_t new_num_blocks = extent.num_blocks(); in ExtentsSublist()
147 scanned_blocks += extent.num_blocks(); in ExtentsSublist()
155 return a.start_block() == b.start_block() && a.num_blocks() == b.num_blocks(); in operator ==()
160 << extent.start_block() + extent.num_blocks() - 1 << "]"; in operator <<()
Dmerge_sequence_generator.cc62 CHECK_EQ(src_extent.num_blocks(), dst_extent.num_blocks()); in SplitSelfOverlapping()
70 for (size_t i = 0; i < src_extent.num_blocks(); i += diff) { in SplitSelfOverlapping()
71 auto num_blocks = std::min<size_t>(diff, src_extent.num_blocks() - i); in SplitSelfOverlapping() local
73 ExtentForRange(i + src_extent.start_block(), num_blocks), in SplitSelfOverlapping()
74 ExtentForRange(i + dst_extent.start_block(), num_blocks))); in SplitSelfOverlapping()
102 src_extent.num_blocks()); in Create()
111 used_blocks += src_extent.num_blocks(); in Create()
114 if (used_blocks != aop.op.dst_extents(0).num_blocks()) { in Create()
117 << ", dst blocks " << aop.op.dst_extents(0).num_blocks(); in Create()
144 it.dst_extent().start_block() + it.dst_extent().num_blocks() - 1; in FindDependency()
[all …]
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()
145 last_end_block = base_ext.start_block() + base_ext.num_blocks(); in ShiftExtentsOverExtents()
149 base_ext.start_block() + base_ext.num_blocks()) { in ShiftExtentsOverExtents()
150 if (over_ext->start_block() + over_ext->num_blocks() <= in ShiftExtentsOverExtents()
151 base_ext.start_block() + base_ext.num_blocks()) { in ShiftExtentsOverExtents()
156 auto new_blocks = base_ext.start_block() + base_ext.num_blocks() - in ShiftExtentsOverExtents()
161 over_ext->num_blocks() - new_blocks)}; in ShiftExtentsOverExtents()
[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.cc122 uint64_t blocks_left = dst_ext.num_blocks(); in SplitSourceCopy()
124 if (curr_src_ext.num_blocks() <= blocks_left) { in SplitSourceCopy()
126 blocks_left -= curr_src_ext.num_blocks(); in SplitSourceCopy()
140 curr_src_ext.set_num_blocks(curr_src_ext.num_blocks() - blocks_left); in SplitSourceCopy()
142 blocks_left -= first_ext.num_blocks(); in SplitSourceCopy()
176 uint64_t data_size = dst_ext.num_blocks() * kBlockSize; in SplitAReplaceOp()
218 last_aop.op.dst_extents(last_dst_idx).num_blocks(); in MergeOperations()
221 last_aop.op.dst_extents(last_dst_idx).num_blocks() + in MergeOperations()
222 curr_aop.op.dst_extents(0).num_blocks(); in MergeOperations()
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()
Dextent_utils.h44 ret.resize(ret.size() + extent.num_blocks(), kSparseHole); in ExpandExtents()
47 block < (extent.start_block() + extent.num_blocks()); in ExpandExtents()
108 if (block_offset_ >= src_extents_[cur_extent_].num_blocks()) {
Dsquashfs_filesystem_unittest.cc57 EXPECT_LE(extent.start_block() + extent.num_blocks(), total_blocks); in ExpectBlocksInRange()
102 return a.extents[0].start_block() + a.extents[0].num_blocks() > in CheckSquashfs()
202 EXPECT_EQ(files[0].extents[0].num_blocks(), 1u); in TEST_F()
216 EXPECT_EQ(files[0].extents[0].num_blocks(), 1u); in TEST_F()
217 EXPECT_EQ(files[1].extents[0].num_blocks(), 2u); in TEST_F()
232 EXPECT_EQ(files[0].extents[0].num_blocks(), 2u); in TEST_F()
247 EXPECT_EQ(files[0].extents[0].num_blocks(), 2u); in TEST_F()
Dpayload_generation_config_android.cc80 if (part.verity.hash_tree_extent.num_blocks() != 0) { in VerifyVerityConfig()
86 part.verity.hash_tree_data_extent.num_blocks() * block_size; in VerifyVerityConfig()
89 tree_size == part.verity.hash_tree_extent.num_blocks() * block_size); in VerifyVerityConfig()
116 if (part.verity.fec_extent.num_blocks() != 0) { in VerifyVerityConfig()
120 part.verity.fec_data_extent.num_blocks() * block_size, in VerifyVerityConfig()
122 part.verity.fec_extent.num_blocks() * block_size, in VerifyVerityConfig()
/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):
Dblockdiff.py52 num_blocks = extent_start = extent_length = 0
68 extent_start = num_blocks
80 num_blocks += 1
/system/core/fs_mgr/libsnapshot/
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()
Dcow_snapuserd_test.cpp319 size_t num_blocks = size_ / options.block_size; in CreateCowDeviceWithCopyOverlap_2() local
320 size_t x = num_blocks; in CreateCowDeviceWithCopyOverlap_2()
345 x = num_blocks; in CreateCowDeviceWithCopyOverlap_2()
371 size_t num_blocks = size_ / options.block_size; in CreateCowDeviceWithCopyOverlap_1() local
372 size_t x = num_blocks; in CreateCowDeviceWithCopyOverlap_1()
373 size_t blk_src_copy = num_blocks - 1; in CreateCowDeviceWithCopyOverlap_1()
430 size_t num_blocks = size_ / options.block_size; in CreateCowDeviceOrderedOpsInverted() local
431 size_t blk_end_copy = num_blocks * 2; in CreateCowDeviceOrderedOpsInverted()
432 size_t source_blk = num_blocks - 1; in CreateCowDeviceOrderedOpsInverted()
435 size_t x = num_blocks; in CreateCowDeviceOrderedOpsInverted()
[all …]
Dutility.cpp172 uint64_t num_blocks) { in AppendExtent() argument
175 auto next_block = last_extent->start_block() + last_extent->num_blocks(); in AppendExtent()
177 last_extent->set_num_blocks(last_extent->num_blocks() + num_blocks); in AppendExtent()
183 new_extent->set_num_blocks(num_blocks); in AppendExtent()
Dsnapshot_writer.cpp109 bool CompressedSnapshotWriter::EmitZeroBlocks(uint64_t new_block_start, uint64_t num_blocks) { in EmitZeroBlocks() argument
110 return cow_->AddZeroBlocks(new_block_start, num_blocks); in EmitZeroBlocks()
156 bool OnlineKernelSnapshotWriter::EmitZeroBlocks(uint64_t new_block_start, uint64_t num_blocks) { in EmitZeroBlocks() argument
158 for (uint64_t i = 0; i < num_blocks; i++) { in EmitZeroBlocks()
/system/update_engine/payload_consumer/
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()
Dextent_writer.cc40 cur_extent_->num_blocks() * block_size_ - extent_bytes_written_; in Write()
59 CHECK_EQ(extent_bytes_written_, cur_extent_->num_blocks() * block_size_); in Write()
Dsnapshot_extent_writer_unittest.cc40 size_t num_blocks; member
59 bool EmitZeroBlocks(uint64_t new_block_start, uint64_t num_blocks) override { in EmitZeroBlocks() argument
101 size_t num_blocks) { in AddExtent() argument
104 extent->set_num_blocks(num_blocks); in AddExtent()
/system/keymaster/km_openssl/
Dhkdf.cpp54 const size_t num_blocks = (output_len + digest_size_ - 1) / digest_size_; in GenerateKey() local
55 if (num_blocks >= 256u) return false; in GenerateKey()
64 for (size_t i = 0; i < num_blocks; i++) { in GenerateKey()
/system/core/fs_mgr/libsnapshot/corpus/
Dlaunch_device.txt57 num_blocks: 947
70 num_blocks: 947
83 num_blocks: 947
/system/nfc/src/nfc/tags/
Dce_t3t.cc216 for (i = 0; i < p_cb->cur_cmd.num_blocks; i++) { in ce_t3t_handle_update_cmd()
240 if (p_cb->cur_cmd.num_blocks > p_cb->ndef_info.nbw) { in ce_t3t_handle_update_cmd()
243 p_cb->cur_cmd.num_blocks, p_cb->ndef_info.nbw); in ce_t3t_handle_update_cmd()
396 UINT8_TO_STREAM(p_dst, p_cb->cur_cmd.num_blocks); in ce_t3t_handle_check_cmd()
398 for (i = 0; i < p_cb->cur_cmd.num_blocks; i++) { in ce_t3t_handle_check_cmd()
416 if (p_cb->cur_cmd.num_blocks > p_cb->ndef_info.nbr) { in ce_t3t_handle_check_cmd()
420 p_cb->cur_cmd.num_blocks, p_cb->ndef_info.nbr); in ce_t3t_handle_check_cmd()
708 STREAM_TO_UINT8(p_cb->cur_cmd.num_blocks, p); in ce_t3t_data_cback()
711 for (i = 0; i < p_cb->cur_cmd.num_blocks; i++) { in ce_t3t_data_cback()
769 if (remaining < p_cb->cur_cmd.num_blocks * T3T_MSG_BLOCKSIZE) { in ce_t3t_data_cback()
[all …]
/system/nfc/src/nfa/rw/
Dnfa_rw_api.cc758 tNFA_STATUS NFA_RwT3tRead(uint8_t num_blocks, tNFA_T3T_BLOCK_DESC* t3t_blocks) { in NFA_RwT3tRead() argument
763 << StringPrintf("num_blocks to read: %i", num_blocks); in NFA_RwT3tRead()
766 if ((num_blocks == 0) || (t3t_blocks == nullptr)) in NFA_RwT3tRead()
770 sizeof(tNFA_RW_OPERATION) + (num_blocks * sizeof(tNFA_T3T_BLOCK_DESC)))); in NFA_RwT3tRead()
779 p_msg->params.t3t_read.num_blocks = num_blocks; in NFA_RwT3tRead()
784 (num_blocks * sizeof(tNFA_T3T_BLOCK_DESC))); in NFA_RwT3tRead()
809 tNFA_STATUS NFA_RwT3tWrite(uint8_t num_blocks, tNFA_T3T_BLOCK_DESC* t3t_blocks, in NFA_RwT3tWrite() argument
815 << StringPrintf("num_blocks to write: %i", num_blocks); in NFA_RwT3tWrite()
818 if ((num_blocks == 0) || (t3t_blocks == nullptr) | (p_data == nullptr)) in NFA_RwT3tWrite()
823 (num_blocks * (sizeof(tNFA_T3T_BLOCK_DESC) + 16)))); in NFA_RwT3tWrite()
[all …]
/system/update_engine/scripts/update_payload/
Dapplier.py115 read_length = min(max_length, ex.num_blocks * block_size)
145 write_length = min(data_length, ex.num_blocks * block_size)
183 num_bytes = ex.num_blocks * block_size
261 num_blocks = ex.num_blocks
262 count = num_blocks * block_size
267 if (start_block + num_blocks) * block_size > part_size:
312 part_file.write(b'\0' * (ex.num_blocks * block_size))
355 length += ex.num_blocks * self.block_size
/system/core/fs_mgr/libsnapshot/include/libsnapshot/
Dcow_writer.h59 bool AddZeroBlocks(uint64_t new_block_start, uint64_t num_blocks);
79 virtual bool EmitZeroBlocks(uint64_t new_block_start, uint64_t num_blocks) = 0;
114 virtual bool EmitZeroBlocks(uint64_t new_block_start, uint64_t num_blocks) override;

1234