Home
last modified time | relevance | path

Searched refs:new_block (Results 1 – 24 of 24) sorted by relevance

/system/core/fs_mgr/libsnapshot/snapuserd/user-space-merge/
Dsnapuserd_readahead.cpp49 if (dest_blocks_.count(cow_op->new_block) || source_blocks_.count(source_block) || in CheckOverlap()
58 source_blocks_.insert(cow_op->new_block); in CheckOverlap()
87 blocks.push_back(cow_op->new_block); in PrepareNextReadAhead()
115 blocks.push_back(op->new_block); in PrepareNextReadAhead()
162 if (bm->new_block == 0 && bm->file_offset == 0) { in ReconstructDataFromCow()
168 read_ahead_buffer_map[bm->new_block] = bufptr; in ReconstructDataFromCow()
182 if (read_ahead_buffer_map.find(op->new_block) != read_ahead_buffer_map.end()) { in ReconstructDataFromCow()
393 bm->new_block = 0; in UpdateScratchMetadata()
399 uint64_t new_block = blocks_[block_index]; in UpdateScratchMetadata() local
404 bm->new_block = new_block; in UpdateScratchMetadata()
[all …]
Dread_worker.cpp53 SNAP_LOG(ERROR) << "ProcessReplaceOp failed for block " << cow_op->new_block in ProcessReplaceOp()
66 SNAP_LOG(DEBUG) << " ReadFromBaseDevice...: new-block: " << cow_op->new_block in ReadFromSourceDevice()
115 SNAP_LOG(ERROR) << "ProcessXorOp failed for block " << cow_op->new_block in ProcessXorOp()
133 MERGE_GROUP_STATE state = snapuserd_->ProcessMergingBlock(cow_op->new_block, buffer); in ProcessOrderedOp()
140 << (cow_op->new_block >> SECTOR_SHIFT) in ProcessOrderedOp()
141 << " Block-number: " << cow_op->new_block; in ProcessOrderedOp()
142 if (!ReadDataFromBaseDevice(ChunkToSector(cow_op->new_block), buffer, BLOCK_SZ)) { in ProcessOrderedOp()
144 << (cow_op->new_block >> SECTOR_SHIFT) << " after merge-complete."; in ProcessOrderedOp()
159 snapuserd_->NotifyIOCompletion(cow_op->new_block); in ProcessOrderedOp()
380 << " CowOperation-new-block: " << cow_op->new_block in ReadAlignedSector()
[all …]
Dsnapuserd_transitions.cpp612 void SnapshotHandler::NotifyIOCompletion(uint64_t new_block) { in NotifyIOCompletion() argument
613 auto it = block_to_ra_index_.find(new_block); in NotifyIOCompletion()
614 CHECK(it != block_to_ra_index_.end()) << " invalid block: " << new_block; in NotifyIOCompletion()
654 MERGE_GROUP_STATE SnapshotHandler::ProcessMergingBlock(uint64_t new_block, void* buffer) { in ProcessMergingBlock() argument
655 auto it = block_to_ra_index_.find(new_block); in ProcessMergingBlock()
672 if (resume_merge_ && GetRABuffer(&lock, new_block, buffer)) { in ProcessMergingBlock()
689 if (!GetRABuffer(&lock, new_block, buffer)) { in ProcessMergingBlock()
Dsnapuserd_core.h182 void NotifyIOCompletion(uint64_t new_block);
184 MERGE_GROUP_STATE ProcessMergingBlock(uint64_t new_block, void* buffer);
Dsnapuserd_core.cpp213 chunk_vec_.push_back(std::make_pair(ChunkToSector(cow_op->new_block), cow_op)); in ReadMetadata()
217 block_to_ra_index_[cow_op->new_block] = ra_index; in ReadMetadata()
Dmerge_worker.cpp50 *source_offset = cow_op->new_block * BLOCK_SZ; in PrepareMerge()
69 uint64_t next_offset = op->new_block * BLOCK_SZ; in PrepareMerge()
/system/core/fs_mgr/libsnapshot/libsnapshot_cow/
Dcow_format.cpp82 os << "new_block:" << op.new_block << ", "; in operator <<()
95 os << ", new_block:" << op.new_block; in operator <<()
185 const uint64_t new_block = op->new_block; in GetBlockOffset() local
187 if (op->type() != kCowReplaceOp || io_block < new_block) { in GetBlockOffset()
189 << " CowOperation: new_block: " << new_block; in GetBlockOffset()
199 const size_t block_distance = io_block - new_block; in GetBlockOffset()
Dwriter_base.cpp91 bool CowWriterBase::AddCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks) { in AddCopy() argument
95 if (!ValidateNewBlock(new_block + i)) { in AddCopy()
100 return EmitCopy(new_block, old_block, num_blocks); in AddCopy()
154 bool CowWriterBase::ValidateNewBlock(uint64_t new_block) { in ValidateNewBlock() argument
155 if (options_.max_blocks && new_block >= options_.max_blocks.value()) { in ValidateNewBlock()
156 LOG(ERROR) << "New block " << new_block << " exceeds maximum block count " in ValidateNewBlock()
Dsnapshot_reader_test.cpp63 std::string new_block = MakeNewBlockString(); in WriteCow() local
68 ASSERT_TRUE(writer->AddRawBlocks(5, new_block.data(), new_block.size())); in WriteCow()
161 std::string new_block = "This is a new block"; in MakeNewBlockString() local
162 new_block.resize(kBlockSize / 2, '*'); in MakeNewBlockString()
163 new_block.resize(kBlockSize, '!'); in MakeNewBlockString()
164 return new_block; in MakeNewBlockString()
Dwriter_base.h38 bool AddCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks = 1) override;
54 virtual bool EmitCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks = 1) = 0;
63 bool ValidateNewBlock(uint64_t new_block);
Dtest_v3.cpp164 ASSERT_EQ(op->new_block, 1); in TEST_F()
173 ASSERT_EQ(op->new_block, 2); in TEST_F()
207 ASSERT_EQ(op->new_block, 5); in TEST_F()
244 ASSERT_EQ(op->new_block, 5 + i); in TEST_F()
289 ASSERT_EQ(op->new_block, 5 + i); in TEST_F()
328 ASSERT_EQ(op->new_block, 10 + i); in TEST_F()
364 ASSERT_EQ(op->new_block, 50); in TEST_F()
404 ASSERT_EQ(op->new_block, 50 + i); in TEST_F()
454 ASSERT_EQ(op->new_block, 10 + i); in TEST_F()
460 ASSERT_EQ(op->new_block, 15 + i); in TEST_F()
[all …]
Dtest_v2.cpp91 ASSERT_EQ(op->new_block, 10 + i); in TEST_F()
137 ASSERT_EQ(op->new_block, 10); in TEST_F()
148 ASSERT_EQ(op->new_block, 50); in TEST_F()
159 ASSERT_EQ(op->new_block, 51); in TEST_F()
168 ASSERT_EQ(op->new_block, 52); in TEST_F()
212 ASSERT_EQ(op->new_block, 10); in TEST_F()
223 ASSERT_EQ(op->new_block, 50); in TEST_F()
235 ASSERT_EQ(op->new_block, 51); in TEST_F()
244 ASSERT_EQ(op->new_block, 52); in TEST_F()
279 ASSERT_EQ(op->new_block, 50); in TEST_F()
[all …]
Dcow_reader.cpp387 merge_op_blocks->emplace_back(current_op.new_block); in GetSequenceDataV2()
388 } else if (seq_ops_set.count(current_op.new_block) == 0) { in GetSequenceDataV2()
389 other_ops->push_back(current_op.new_block); in GetSequenceDataV2()
391 block_map->insert({current_op.new_block, i}); in GetSequenceDataV2()
418 merge_op_blocks->emplace_back(current_op.new_block); in GetSequenceData()
419 } else if (seq_ops_set.count(current_op.new_block) == 0) { in GetSequenceData()
420 other_ops->push_back(current_op.new_block); in GetSequenceData()
422 block_map->insert({current_op.new_block, i}); in GetSequenceData()
480 overwritten_blocks[op->new_block] = op; in VerifyMergeOps()
757 offset = xor_data_loc_->at(op->new_block); in ReadData()
Dparser_v2.cpp114 xor_data_loc->insert({current_op.new_block, data_pos}); in ParseOps()
213 if (v2_op.new_block > std::numeric_limits<uint32_t>::max()) { in Translate()
217 new_op.new_block = v2_op.new_block; in Translate()
Dsnapshot_reader.cpp50 if (op->new_block >= ops_.size()) { in CompressedSnapshotReader()
51 ops_.resize(op->new_block + num_blocks, nullptr); in CompressedSnapshotReader()
54 size_t vec_index = op->new_block; in CompressedSnapshotReader()
Dinspect_cow.cpp85 if (auto iter = parser.xor_data_loc()->find(op.new_block); in ShowRawOpStreamV2()
209 off_t offset = uint64_t(op->new_block) * header.block_size; in Inspect()
212 PLOG(ERROR) << "failed to write block " << op->new_block; in Inspect()
Dwriter_v2.cpp310 bool CowWriterV2::EmitCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks) { in EmitCopy() argument
316 op.new_block = new_block + i; in EmitCopy()
401 op.new_block = new_block_start + i; in EmitBlocks()
454 op.new_block = new_block_start + i; in EmitZeroBlocks()
Dwriter_v3.cpp312 bool CowWriterV3::EmitCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks) { in EmitCopy() argument
319 op.new_block = new_block + i; in EmitCopy()
367 op.new_block = new_block_start + blocks_written; in ConstructCowOpCompressedBuffers()
428 op.new_block = new_block_start + i; in EmitZeroBlocks()
Dwriter_v2.h33 virtual bool EmitCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks = 1) override;
Dparser_v3.cpp116 xor_data_loc_->insert({op.new_block, data_pos}); in ParseOps()
Dwriter_v3.h45 virtual bool EmitCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks = 1) override;
/system/core/fs_mgr/libsnapshot/include/libsnapshot/
Dcow_format.h173 uint64_t new_block; member
211 uint32_t new_block; member
323 uint64_t new_block; member
Dcow_writer.h79 virtual bool AddCopy(uint64_t new_block, uint64_t old_block, uint64_t num_blocks = 1) = 0;
/system/update_engine/payload_consumer/
Dsnapshot_extent_writer_unittest.cc48 bool AddCopy(uint64_t new_block, in AddCopy() argument
52 operations_[new_block + i] = { in AddCopy()