Searched refs:block_size (Results 1 - 25 of 78) sorted by relevance

1234

/system/update_engine/payload_consumer/
H A Dfile_descriptor_utils.cc41 uint64_t block_size,
44 auto buffer_blocks = kMaxCopyBufferSize / block_size;
48 brillo::Blob buf(buffer_blocks * block_size);
51 TEST_AND_RETURN_FALSE(reader.Init(source, src_extents, block_size));
56 TEST_AND_RETURN_FALSE(reader.Read(buf.data(), read_blocks * block_size));
59 source_hasher.Update(buf.data(), read_blocks * block_size));
63 writer->Write(buf.data(), read_blocks * block_size));
83 uint64_t block_size,
86 TEST_AND_RETURN_FALSE(writer.Init(target, tgt_extents, block_size));
90 CommonHashExtents(source, src_extents, &writer, block_size, hash_ou
38 CommonHashExtents(FileDescriptorPtr source, const RepeatedPtrField<Extent>& src_extents, DirectExtentWriter* writer, uint64_t block_size, brillo::Blob* hash_out) argument
79 CopyAndHashExtents(FileDescriptorPtr source, const RepeatedPtrField<Extent>& src_extents, FileDescriptorPtr target, const RepeatedPtrField<Extent>& tgt_extents, uint64_t block_size, brillo::Blob* hash_out) argument
95 ReadAndHashExtents(FileDescriptorPtr source, const RepeatedPtrField<Extent>& extents, uint64_t block_size, brillo::Blob* hash_out) argument
[all...]
H A Dfile_descriptor_utils.h33 // is passed as |block_size|. In case of error reading or writing, returns
42 uint64_t block_size,
47 // block sizes are passed as |block_size|. In case of error reading, it returns
52 uint64_t block_size,
H A Dextent_writer.h45 uint32_t block_size) = 0;
71 uint32_t block_size) override {
73 block_size_ = block_size;
106 uint32_t block_size) override {
107 block_size_ = block_size;
108 return underlying_extent_writer_->Init(fd, extents, block_size);
H A Dextent_reader.h36 uint32_t block_size) = 0;
54 uint32_t block_size) override;
/system/core/libsparse/
H A Dsparse_file.h27 unsigned int block_size; member in struct:sparse_file
H A Dimg2simg.c43 fprintf(stderr, "Usage: img2simg <raw_image_file> <sparse_image_file> [<block_size>]\n");
52 unsigned int block_size = 4096; local
61 block_size = atoi(argv[3]);
64 if (block_size < 1024 || block_size % 4 != 0) {
92 s = sparse_file_new(block_size, len);
H A Dsparse.c30 struct sparse_file *sparse_file_new(unsigned int block_size, int64_t len) argument
37 s->backed_block_list = backed_block_list_new(block_size);
43 s->block_size = block_size;
95 DIV_ROUND_UP(backed_block_len(bb), s->block_size);
97 if (last_block < DIV_ROUND_UP(s->len, s->block_size)) {
143 write_skip_chunk(out, (int64_t)blocks * s->block_size);
149 DIV_ROUND_UP(backed_block_len(bb), s->block_size);
152 pad = s->len - (int64_t)last_block * s->block_size;
169 out = output_file_open_fd(fd, s->block_size,
[all...]
H A Doutput_file.h28 struct output_file *output_file_open_fd(int fd, unsigned int block_size, int64_t len,
31 void *priv, unsigned int block_size, int64_t len, int gz, int sparse,
H A Doutput_file.c86 unsigned int block_size; member in struct:output_file
352 if (skip_len % out->block_size) {
354 skip_len, out->block_size);
361 chunk_header.chunk_sz = skip_len / out->block_size;
381 rnd_up_len = ALIGN(len, out->block_size);
386 chunk_header.chunk_sz = rnd_up_len / out->block_size;
397 count = out->block_size / sizeof(uint32_t);
416 rnd_up_len = ALIGN(len, out->block_size);
422 chunk_header.chunk_sz = rnd_up_len / out->block_size;
486 unsigned int rnd_up_len = ALIGN(len, out->block_size);
548 output_file_init(struct output_file *out, int block_size, int64_t len, bool sparse, int chunks, bool crc) argument
637 output_file_open_callback(int (*write)(void *, const void *, int), void *priv, unsigned int block_size, int64_t len, int gz __unused, int sparse, int chunks, int crc) argument
663 output_file_open_fd(int fd, unsigned int block_size, int64_t len, int gz, int sparse, int chunks, int crc) argument
[all...]
/system/extras/verity/
H A Dbuild_verity_tree.cpp26 uint64_t block_size; member in struct:sparse_hash_ctx
40 size_t verity_tree_blocks(uint64_t data_size, size_t block_size, size_t hash_size, argument
43 size_t level_blocks = div_round_up(data_size, block_size);
44 int hashes_per_block = div_round_up(block_size, hash_size);
80 size_t block_size)
84 for (size_t i = 0; i < in_size; i += block_size) {
85 hash_block(md, in + i, block_size, salt, salt_size, out, &s);
96 assert(len % ctx->block_size == 0);
101 ctx->salt, ctx->salt_size, ctx->block_size);
104 for (size_t i = 0; i < (size_t)len; i += ctx->block_size) {
76 hash_blocks(const EVP_MD *md, const unsigned char *in, size_t in_size, unsigned char *out, size_t *out_size, const unsigned char *salt, size_t salt_size, size_t block_size) argument
131 size_t block_size = 4096; local
[all...]
/system/update_engine/payload_generator/
H A Draw_filesystem.cc28 const std::string& filename, uint64_t block_size, uint64_t block_count) {
31 result->block_size_ = block_size;
27 Create( const std::string& filename, uint64_t block_size, uint64_t block_count) argument
H A Dblock_mapping.cc119 const size_t block_size = other_block.size(); local
120 brillo::Blob blob(block_size);
122 if (!utils::PReadAll(fd, blob.data(), block_size, byte_offset, &bytes_read))
124 if (static_cast<size_t>(bytes_read) != block_size)
143 size_t block_size,
146 BlockMapping mapping(block_size);
147 if (mapping.AddBlock(brillo::Blob(block_size, '\0')) != 0)
155 old_fd, 0, old_size / block_size, old_block_ids));
157 new_fd, 0, new_size / block_size, new_block_ids));
139 MapPartitionBlocks(const string& old_part, const string& new_part, size_t old_size, size_t new_size, size_t block_size, vector<BlockMapping::BlockId>* old_block_ids, vector<BlockMapping::BlockId>* new_block_ids) argument
H A Dfake_filesystem.cc23 FakeFilesystem::FakeFilesystem(uint64_t block_size, uint64_t block_count) : argument
24 block_size_(block_size),
H A Dblock_mapping.h31 // BlockMapping allows to map data blocks (brillo::Blobs of block_size size)
40 explicit BlockMapping(size_t block_size) : block_size_(block_size) {} argument
106 size_t block_size,
H A Dfull_update_generator.cc139 TEST_AND_RETURN_FALSE(full_chunk_size % config.block_size == 0);
141 size_t chunk_blocks = full_chunk_size / config.block_size;
145 << chunk_blocks << " blocks (" << config.block_size
154 size_t partition_blocks = new_part.size / config.block_size;
179 static_cast<off_t>(start_block) * config.block_size,
180 num_blocks * config.block_size,
H A Dfull_update_generator_unittest.cc41 config_.block_size = 4096;
91 static_cast<uint64_t>(i * config_.hard_chunk_size / config_.block_size),
94 EXPECT_EQ(config_.hard_chunk_size / config_.block_size,
119 EXPECT_EQ(config_.hard_chunk_size / config_.block_size,
121 EXPECT_EQ((new_part.size() - config_.hard_chunk_size) / config_.block_size,
141 EXPECT_EQ(new_part.size() / config_.block_size,
H A Draw_filesystem.h33 const std::string& filename, uint64_t block_size, uint64_t block_count);
/system/extras/squashfs_utils/
H A Dsquashfs_utils.h28 uint32_t block_size; member in struct:squashfs_info
H A Dsquashfs_utils.c50 info->block_size = sb->block_size;
/system/update_engine/scripts/update_payload/
H A Dapplier.py71 def _ReadExtents(file_obj, extents, block_size, max_length=-1):
79 block_size: size of each block
91 read_length = min(max_length, ex.num_blocks * block_size)
97 file_obj.seek(ex.start_block * block_size)
105 def _WriteExtents(file_obj, data, extents, block_size, base_name):
114 block_size: size of each block
125 write_length = min(data_length, ex.num_blocks * block_size)
129 file_obj.seek(ex.start_block * block_size)
140 def _ExtentsToBspatchArg(extents, block_size, base_name, data_length=-1):
145 block_size
[all...]
H A Dchecker_unittest.py397 fail_mismatched_block_size: Simulate a missing block_size field.
488 block_size = payload_checker.block_size
492 int(3.5 * block_size), 4, 'foo', 'bar'))
495 int(3.5 * block_size), 3, 'foo', 'bar')
498 int(3.5 * block_size), 5, 'foo', 'bar')
503 block_size = payload_checker.block_size
509 payload_checker._CheckExtents(extents, (1024 + 16) * block_size,
517 payload_checker._CheckExtents(extents, (1024 + 16) * block_size,
[all...]
/system/extras/ext4_utils/
H A Dext4_utils.c110 aux_info.first_data_block = (info.block_size > 1024) ? 0 : 1;
111 aux_info.len_blocks = info.len / info.block_size;
113 info.block_size);
116 aux_info.blocks_per_ind = info.block_size / sizeof(u32);
122 info.block_size);
142 aux_info.sb_zero = calloc(1, info.block_size);
151 aux_info.sb_block = calloc(1, info.block_size);
155 if (info.block_size > 1024)
166 aux_info.bg_desc = calloc(info.block_size, aux_info.bg_desc_blocks);
279 ret = lseek64(fd, info.block_size * (aux_inf
[all...]
H A Dext4_sb.c28 info->block_size = 1024 << sb->s_log_block_size;
41 info->len = (uint64_t)info->block_size * len_blocks;
/system/update_engine/scripts/
H A Dblockdiff.py19 def BlockDiff(block_size, file1, file2, name1, name2, max_length=-1):
23 block_size: the size of a block to diff by
41 read_length = min(max_length, block_size)
94 diff_list = BlockDiff(opts.block_size, file1, file2, name1, name2,
/system/extras/ext4_utils/include/ext4_utils/
H A Dext4_sb.h34 uint32_t block_size; member in struct:fs_info

Completed in 2265 milliseconds

1234