Home
last modified time | relevance | path

Searched refs:kBlockSize (Results 1 – 5 of 5) sorted by relevance

/bootable/recovery/tests/unit/
Dcommands_test.cpp436 constexpr size_t kBlockSize = 4096; variable
443 std::fill_n(block_buffer->begin(), src.blocks() * kBlockSize, 'a'); in TEST()
447 std::vector<uint8_t> buffer(source.blocks() * kBlockSize); in TEST()
448 ASSERT_TRUE(source.ReadAll(&buffer, kBlockSize, block_reader, stash_reader)); in TEST()
449 ASSERT_EQ(source.blocks() * kBlockSize, buffer.size()); in TEST()
462 std::fill_n(block_buffer->begin(), src.blocks() * kBlockSize, 'a'); in TEST()
466 std::fill_n(stash_buffer->begin(), kBlockSize, 'b'); in TEST()
469 std::vector<uint8_t> buffer(source.blocks() * kBlockSize); in TEST()
470 ASSERT_TRUE(source.ReadAll(&buffer, kBlockSize, block_reader, stash_reader)); in TEST()
471 ASSERT_EQ(source.blocks() * kBlockSize, buffer.size()); in TEST()
[all …]
/bootable/recovery/otautil/
Drangeset.cpp225 Range to_insert{ start / kBlockSize, (start + len - 1) / kBlockSize + 1 }; in Insert()
230 RangeSet rs({ { start / kBlockSize, (start + len - 1) / kBlockSize + 1 } }); in Overlaps()
245 size_t old_block_start = old_offset / kBlockSize; in GetOffsetInRangeSet()
253 return (new_block_start * kBlockSize + old_offset % kBlockSize); in GetOffsetInRangeSet()
Droots.cpp185 static constexpr int kBlockSize = 4096; in format_volume() local
187 "/system/bin/mke2fs", "-F", "-t", "ext4", "-b", std::to_string(kBlockSize), in format_volume()
190 int raid_stride = v->logical_blk_size / kBlockSize; in format_volume()
191 int raid_stripe_width = v->erase_blk_size / kBlockSize; in format_volume()
194 raid_stride = 8192 / kBlockSize; in format_volume()
203 mke2fs_args.push_back(std::to_string(length / kBlockSize)); in format_volume()
/bootable/recovery/update_verifier/
Dupdate_verifier.cpp154 static constexpr size_t kBlockSize = 4096; in ReadBlocks() local
155 std::vector<uint8_t> buf(1024 * kBlockSize); in ReadBlocks()
159 if (lseek64(fd.get(), static_cast<off64_t>(range_start) * kBlockSize, SEEK_SET) == -1) { in ReadBlocks()
164 size_t remain = (range_end - range_start) * kBlockSize; in ReadBlocks()
166 size_t to_read = std::min(remain, 1024 * kBlockSize); in ReadBlocks()
/bootable/recovery/otautil/include/otautil/
Drangeset.h140 static constexpr size_t kBlockSize = 4096;