Home
last modified time | relevance | path

Searched refs:CowOperation (Results 1 – 20 of 20) sorted by relevance

/system/core/fs_mgr/libsnapshot/
Dcow_format.cpp26 std::ostream& operator<<(std::ostream& os, CowOperation const& op) { in operator <<()
59 int64_t GetNextOpOffset(const CowOperation& op, uint32_t cluster_ops) { in GetNextOpOffset()
69 int64_t GetNextDataOffset(const CowOperation& op, uint32_t cluster_ops) { in GetNextDataOffset()
71 return cluster_ops * sizeof(CowOperation); in GetNextDataOffset()
73 return sizeof(CowOperation); in GetNextDataOffset()
79 bool IsMetadataOp(const CowOperation& op) { in IsMetadataOp()
Dcow_reader.cpp102 if (header_.op_size != sizeof(CowOperation)) { in Parse()
104 << sizeof(CowOperation); in Parse()
111 if (header_.op_size != sizeof(CowOperation)) { in Parse()
113 << sizeof(CowOperation); in Parse()
155 auto ops_buffer = std::make_shared<std::vector<CowOperation>>(); in ParseOps()
162 uint64_t to_add = std::min(cluster_ops, (fd_size_ - pos) / sizeof(CowOperation)); in ParseOps()
166 to_add * sizeof(CowOperation))) { in ParseOps()
174 pos += sizeof(CowOperation) + GetNextOpOffset(current_op, header_.cluster_ops); in ParseOps()
245 if (ops_buffer->size() * sizeof(CowOperation) != footer_->op.ops_size) { in ParseOps()
272 [](CowOperation& op) { return IsMetadataOp(op); }), in InitializeMerge()
[all …]
Dsnapuserd.h122 const CowOperation* GetIterOp();
134 void CheckOverlap(const CowOperation* cow_op);
138 std::vector<const CowOperation*>::reverse_iterator read_ahead_iter_;
185 std::vector<std::pair<sector_t, const CowOperation*>>::iterator& it);
188 bool ProcessCowOp(const CowOperation* cow_op);
189 bool ProcessReplaceOp(const CowOperation* cow_op);
190 bool ProcessCopyOp(const CowOperation* cow_op);
193 bool ReadFromBaseDevice(const CowOperation* cow_op);
194 bool GetReadAheadPopulatedBuffer(const CowOperation* cow_op);
249 std::vector<std::pair<sector_t, const CowOperation*>>& GetChunkVec() { return chunk_vec_; } in GetChunkVec()
[all …]
Dcow_writer.cpp93 header_.op_size = sizeof(CowOperation); in SetupHeaders()
171 cluster_size_ = header_.cluster_ops * sizeof(CowOperation); in InitPos()
175 next_data_pos_ = next_op_pos_ + sizeof(CowOperation); in InitPos()
231 std::queue<CowOperation> toAdd; in OpenForAppend()
263 CowOperation op = {}; in EmitCopy()
274 CowOperation op = {}; in EmitRawBlocks()
312 CowOperation op = {}; in EmitZeroBlocks()
323 CowOperation op = {}; in EmitLabel()
330 CowOperation op = {}; in EmitCluster()
333 op.source = current_data_size_ + cluster_size_ - current_cluster_size_ - sizeof(CowOperation); in EmitCluster()
[all …]
Dsnapuserd_readahead.cpp174 void ReadAheadThread::CheckOverlap(const CowOperation* cow_op) { in CheckOverlap()
190 const CowOperation* cow_op = GetIterOp(); in PrepareReadAhead()
205 const CowOperation* op = GetIterOp(); in PrepareReadAhead()
251 const CowOperation* op = GetIterOp(); in ReconstructDataFromCow()
437 std::vector<const CowOperation*>& read_ahead_ops = snapuserd_->GetReadAheadOpsVec(); in InitializeIter()
442 std::vector<const CowOperation*>& read_ahead_ops = snapuserd_->GetReadAheadOpsVec(); in IterDone()
450 const CowOperation* ReadAheadThread::GetIterOp() { in GetIterOp()
Dinspect_cow.cpp63 static void ShowBad(CowReader& reader, const struct CowOperation& op) { in ShowBad()
75 if (op.data_length >= sizeof(CowOperation)) { in ShowBad()
76 std::cout << "The start, as an op, would be " << *(CowOperation*)buffer.get() << "\n"; in ShowBad()
121 const CowOperation& op = iter->Get(); in Inspect()
Dsnapuserd_worker.cpp136 bool WorkerThread::ProcessReplaceOp(const CowOperation* cow_op) { in ProcessReplaceOp()
145 bool WorkerThread::ReadFromBaseDevice(const CowOperation* cow_op) { in ReadFromBaseDevice()
163 bool WorkerThread::GetReadAheadPopulatedBuffer(const CowOperation* cow_op) { in GetReadAheadPopulatedBuffer()
179 bool WorkerThread::ProcessCopyOp(const CowOperation* cow_op) { in ProcessCopyOp()
203 bool WorkerThread::ProcessCowOp(const CowOperation* cow_op) { in ProcessCowOp()
231 std::vector<std::pair<sector_t, const CowOperation*>>::iterator& it) { in ReadUnalignedSector()
275 std::vector<std::pair<sector_t, const CowOperation*>>& chunk_vec = snapuserd_->GetChunkVec(); in ReadData()
276 std::vector<std::pair<sector_t, const CowOperation*>>::iterator it; in ReadData()
477 std::vector<std::pair<sector_t, const CowOperation*>>& chunk_vec = snapuserd_->GetChunkVec(); in GetNumberOfMergedOps()
512 const CowOperation* cow_op = it->second; in GetNumberOfMergedOps()
[all …]
Dsnapuserd.cpp383 const CowOperation* cow_op = &cowop_riter_->Get(); in ReadMetadata()
445 std::vector<const CowOperation*> vec; in ReadMetadata()
456 const CowOperation* cow_op = &cowop_riter_->Get(); in ReadMetadata()
531 const CowOperation* cow_op = vec[i]; in ReadMetadata()
Dsnapshot_reader.h81 std::vector<const CowOperation*> ops_;
Dsnapshot_reader.cpp92 const CowOperation* op = &op_iter_->Get(); in SetCow()
238 const CowOperation* op = nullptr; in ReadBlock()
Dcow_api_test.cpp796 AssertionResult CompareDataBlock(CowReader* reader, const CowOperation& op, in CompareDataBlock()
/system/update_engine/common/
Dcow_operation_convert_unittest.cc33 std::ostream& operator<<(std::ostream& out, CowOperation::Type op) { in operator <<()
35 case CowOperation::Type::CowCopy: in operator <<()
38 case CowOperation::Type::CowReplace: in operator <<()
48 std::ostream& operator<<(std::ostream& out, const CowOperation& c) { in operator <<()
55 void VerifyCowMergeOp(const std::vector<CowOperation>& cow_ops) { in VerifyCowMergeOp()
65 if (cow_op.op == CowOperation::CowCopy) { in VerifyCowMergeOp()
128 return cow_op.op == CowOperation::CowCopy; in TEST_F()
156 return cow_op.op == CowOperation::CowCopy; in TEST_F()
162 return cow_op.op == CowOperation::CowReplace; in TEST_F()
187 return cow_op.op == CowOperation::CowCopy; in TEST_F()
[all …]
Dcow_operation_convert.cc27 std::vector<CowOperation> ConvertToCowOperations( in ConvertToCowOperations()
33 std::vector<CowOperation> converted; in ConvertToCowOperations()
56 converted.push_back({CowOperation::CowCopy, src_block, dst_block}); in ConvertToCowOperations()
74 converted.push_back({CowOperation::CowReplace, src_block, dst_block}); in ConvertToCowOperations()
Dcow_operation_convert.h27 struct CowOperation { struct
50 std::vector<CowOperation> ConvertToCowOperations( argument
/system/core/fs_mgr/libsnapshot/include/libsnapshot/
Dcow_format.h112 struct CowOperation { struct
144 static_assert(sizeof(CowOperation) == sizeof(CowFooterOperation)); argument
182 std::ostream& operator<<(std::ostream& os, CowOperation const& arg);
184 int64_t GetNextOpOffset(const CowOperation& op, uint32_t cluster_size);
185 int64_t GetNextDataOffset(const CowOperation& op, uint32_t cluster_size);
187 bool IsMetadataOp(const CowOperation& op);
Dcow_reader.h83 virtual bool ReadData(const CowOperation& op, IByteSink* sink) = 0;
95 virtual const CowOperation& Get() = 0;
110 virtual const CowOperation& Get() = 0;
140 bool ReadData(const CowOperation& op, IByteSink* sink) override;
165 std::shared_ptr<std::vector<CowOperation>> ops_;
Dcow_writer.h126 bool WriteOperation(const CowOperation& op, const void* data = nullptr, size_t size = 0);
127 void AddOperation(const CowOperation& op);
/system/update_engine/payload_consumer/
Dvabc_partition_writer.cc99 const std::vector<CowOperation>& converted, in WriteAllCowOps()
106 case CowOperation::CowCopy: in WriteAllCowOps()
113 case CowOperation::CowReplace: in WriteAllCowOps()
Dvabc_partition_writer.h51 const std::vector<CowOperation>& converted,
/system/update_engine/payload_generator/
Dcow_size_estimator.cc68 const std::vector<CowOperation>& converted, in WriteAllCowOps()
75 case CowOperation::CowCopy: in WriteAllCowOps()
82 case CowOperation::CowReplace: in WriteAllCowOps()