Home
last modified time | relevance | path

Searched refs:BLOCK_SZ (Results 1 – 16 of 16) sorted by relevance

/system/core/fs_mgr/libsnapshot/snapuserd/user-space-merge/
Dsnapuserd_dm_user.cpp88 void* buffer = bufsink_.GetPayloadBuffer(BLOCK_SZ); in ReadFromSourceDevice()
97 offset *= BLOCK_SZ; in ReadFromSourceDevice()
99 if (!android::base::ReadFullyAtOffset(backing_store_fd_, buffer, BLOCK_SZ, offset)) { in ReadFromSourceDevice()
107 << "at block :" << offset / BLOCK_SZ << " offset:" << offset % BLOCK_SZ; in ReadFromSourceDevice()
139 void* buffer = bufsink_.GetPayloadBuffer(BLOCK_SZ); in ProcessZeroOp()
145 memset(buffer, 0, BLOCK_SZ); in ProcessZeroOp()
150 void* buffer = bufsink_.GetPayloadBuffer(BLOCK_SZ); in ProcessOrderedOp()
165 if (!ReadDataFromBaseDevice(ChunkToSector(cow_op->new_block), BLOCK_SZ)) { in ProcessOrderedOp()
241 xorsink_.Initialize(&bufsink_, BLOCK_SZ); in Init()
307 CHECK(read_size <= BLOCK_SZ); in ReadDataFromBaseDevice()
[all …]
Dsnapuserd_readahead.cpp38 source_block /= BLOCK_SZ; in CheckOverlap()
39 source_offset = cow_op->source % BLOCK_SZ; in CheckOverlap()
70 *source_offset *= BLOCK_SZ; in PrepareNextReadAhead()
92 next_offset *= BLOCK_SZ; in PrepareNextReadAhead()
96 if (next_offset != (*source_offset + nr_consecutive * BLOCK_SZ)) { in PrepareNextReadAhead()
247 int num_ops = (snapuserd_->GetBufferDataSize()) / BLOCK_SZ; in ReadAheadAsyncIO()
276 size_t io_size = (linear_blocks * BLOCK_SZ); in ReadAheadAsyncIO()
379 file_offset += BLOCK_SZ; in UpdateScratchMetadata()
443 for (size_t byte_offset = 0; byte_offset < BLOCK_SZ; byte_offset++) { in ProcessXorData()
449 xor_buf_offset += BLOCK_SZ; in ProcessXorData()
[all …]
Dsnapuserd_merge.cpp39 *source_offset = cow_op->new_block * BLOCK_SZ; in PrepareMerge()
54 uint64_t next_offset = op->new_block * BLOCK_SZ; in PrepareMerge()
55 if (next_offset != (*source_offset + nr_consecutive * BLOCK_SZ)) { in PrepareMerge()
83 int total_ops_merged_per_commit = (PAYLOAD_BUFFER_SZ / BLOCK_SZ) * 2; in MergeReplaceZeroOps()
89 int num_ops = PAYLOAD_BUFFER_SZ / BLOCK_SZ; in MergeReplaceZeroOps()
115 bufsink_.UpdateBufferOffset(BLOCK_SZ); in MergeReplaceZeroOps()
118 size_t io_size = linear_blocks * BLOCK_SZ; in MergeReplaceZeroOps()
213 size_t io_size = (linear_blocks * BLOCK_SZ); in MergeOrderedOpsAsync()
391 size_t io_size = (linear_blocks * BLOCK_SZ); in MergeOrderedOps()
Dsnapuserd_core.cpp94 int ret = msync(mapped_addr_, BLOCK_SZ, MS_SYNC); in CommitMerge()
172 if (!(header.block_size == BLOCK_SZ)) { in ReadMetadata()
189 int num_ra_ops_per_iter = ((GetBufferDataSize()) / BLOCK_SZ); in ReadMetadata()
223 num_ra_ops_per_iter = ((GetBufferDataSize()) / BLOCK_SZ); in ReadMetadata()
396 return ((buffer_size * sizeof(struct ScratchMetadata)) / BLOCK_SZ); in GetBufferMetadataSize()
Dsnapuserd_core.h58 static_assert(PAYLOAD_BUFFER_SZ >= BLOCK_SZ);
198 bool IsBlockAligned(uint64_t read_size) { return ((read_size & (BLOCK_SZ - 1)) == 0); } in IsBlockAligned()
232 bool IsBlockAligned(size_t size) { return ((size & (BLOCK_SZ - 1)) == 0); } in IsBlockAligned()
392 bool IsBlockAligned(uint64_t read_size) { return ((read_size & (BLOCK_SZ - 1)) == 0); } in IsBlockAligned()
Dsnapuserd_transitions.cpp241 ret = msync(mapped_addr_, BLOCK_SZ, MS_SYNC); in ReadAheadIOCompleted()
625 memcpy(buffer, it->second, BLOCK_SZ); in GetRABuffer()
Dsnapuserd_test.cpp586 size_t xor_offset = BLOCK_SZ / 2; in CreateCowDevice()
/system/core/fs_mgr/libsnapshot/snapuserd/dm-snapshot-merge/
Dsnapuserd_readahead.cpp201 *source_offset *= BLOCK_SZ; in PrepareReadAhead()
220 next_offset *= BLOCK_SZ; in PrepareReadAhead()
222 if (next_offset + nr_consecutive * BLOCK_SZ != *source_offset) { in PrepareReadAhead()
317 int num_ops = (snapuserd_->GetBufferDataSize()) / BLOCK_SZ; in ReadAheadIOStart()
349 source_offset = source_offset - (linear_blocks - 1) * BLOCK_SZ; in ReadAheadIOStart()
350 size_t io_size = (linear_blocks * BLOCK_SZ); in ReadAheadIOStart()
367 offset += BLOCK_SZ; in ReadAheadIOStart()
375 file_offset += BLOCK_SZ; in ReadAheadIOStart()
385 << backing_store_device_ << "at block :" << source_offset / BLOCK_SZ in ReadAheadIOStart()
386 << " offset :" << source_offset % BLOCK_SZ in ReadAheadIOStart()
Dsnapuserd_worker.cpp82 void* buffer = bufsink_.GetPayloadBuffer(BLOCK_SZ); in ConstructKernelCowHeader()
84 memset(buffer, 0, BLOCK_SZ); in ConstructKernelCowHeader()
107 void* buffer = bufsink_.GetPayloadBuffer(BLOCK_SZ); in ReadFromBaseDevice()
116 offset *= BLOCK_SZ; in ReadFromBaseDevice()
118 if (!android::base::ReadFullyAtOffset(backing_store_fd_, buffer, BLOCK_SZ, offset)) { in ReadFromBaseDevice()
120 << "at block :" << offset / BLOCK_SZ << " offset:" << offset % BLOCK_SZ; in ReadFromBaseDevice()
128 void* buffer = bufsink_.GetPayloadBuffer(BLOCK_SZ); in GetReadAheadPopulatedBuffer()
157 void* buffer = bufsink_.GetPayloadBuffer(BLOCK_SZ); in ProcessZeroOp()
163 memset(buffer, 0, BLOCK_SZ); in ProcessZeroOp()
214 if (skip_sector_size == BLOCK_SZ) { in ReadUnalignedSector()
[all …]
Dsnapuserd.cpp81 int ret = msync(mapped_addr_, BLOCK_SZ, MS_SYNC); in CommitMerge()
125 memcpy(buffer, it->second, BLOCK_SZ); in GetRABuffer()
237 ret = msync(mapped_addr_, BLOCK_SZ, MS_SYNC); in ReadAheadIOCompleted()
367 if (!(header.block_size == BLOCK_SZ)) { in ReadMetadata()
453 int num_ra_ops_per_iter = ((GetBufferDataSize()) / BLOCK_SZ); in ReadMetadata()
647 total_mapped_addr_length_ = BLOCK_SZ; in MmapMetadata()
700 size_t read_sz = 1024 * BLOCK_SZ; in ReadBlocksToCache()
854 size_t metadata_bytes = (header.buffer_size * sizeof(struct ScratchMetadata)) / BLOCK_SZ; in GetBufferMetadataSize()
Dcow_snapuserd_test.cpp263 total_base_size_ = BLOCK_SZ * 2; in ReadLastBlock()
271 std::unique_ptr<uint8_t[]> random_buffer = std::make_unique<uint8_t[]>(BLOCK_SZ); in ReadLastBlock()
273 for (size_t j = 0; j < ((total_base_size_) / BLOCK_SZ); j++) { in ReadLastBlock()
274 ASSERT_EQ(ReadFullyAtOffset(rnd_fd, (char*)random_buffer.get(), BLOCK_SZ, 0), true); in ReadLastBlock()
275 ASSERT_EQ(android::base::WriteFully(base_fd_, random_buffer.get(), BLOCK_SZ), true); in ReadLastBlock()
290 for (size_t j = 0; j < (total_base_size_ / BLOCK_SZ); j++) { in ReadLastBlock()
291 ASSERT_EQ(ReadFullyAtOffset(rnd_fd, (char*)random_buffer_1_.get() + offset, BLOCK_SZ, 0), in ReadLastBlock()
294 offset += BLOCK_SZ; in ReadLastBlock()
303 ASSERT_TRUE(writer.AddRawBlocks(0, random_buffer_1_.get(), BLOCK_SZ)); in ReadLastBlock()
304 ASSERT_TRUE(writer.AddRawBlocks(1, (char*)random_buffer_1_.get() + BLOCK_SZ, BLOCK_SZ)); in ReadLastBlock()
[all …]
Dsnapuserd.h55 static_assert(PAYLOAD_SIZE >= BLOCK_SZ);
282 bool IsBlockAligned(int read_size) { return ((read_size & (BLOCK_SZ - 1)) == 0); } in IsBlockAligned()
/system/core/fs_mgr/libsnapshot/libsnapshot_cow/
Dcow_format.cpp61 os << " (block:" << op.source / BLOCK_SZ << " offset:" << op.source % BLOCK_SZ << ")"; in operator <<()
Dcow_reader.cpp520 block = op.source / BLOCK_SZ; in VerifyMergeOps()
521 offset = (op.source % BLOCK_SZ) != 0; in VerifyMergeOps()
/system/core/fs_mgr/libsnapshot/include/libsnapshot/
Dcow_format.h29 static constexpr size_t BLOCK_SZ = 4096; variable
30 static constexpr size_t BLOCK_SHIFT = (__builtin_ffs(BLOCK_SZ) - 1);
/system/core/fs_mgr/libsnapshot/
Dsnapshot_reader.cpp224 char discard_[BLOCK_SZ];
288 char data[BLOCK_SZ]; in ReadBlock()