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

123

/system/core/libsparse/
H A Dsparse_file.h23 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 Doutput_file.h24 struct output_file *output_file_open_fd(int fd, unsigned int block_size, int64_t len,
27 void *priv, unsigned int block_size, int64_t len, int gz, int sparse,
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.c86 unsigned int block_size; member in struct:output_file
345 if (skip_len % out->block_size) {
347 skip_len, out->block_size);
354 chunk_header.chunk_sz = skip_len / out->block_size;
374 rnd_up_len = ALIGN(len, out->block_size);
379 chunk_header.chunk_sz = rnd_up_len / out->block_size;
390 count = out->block_size / sizeof(uint32_t);
409 rnd_up_len = ALIGN(len, out->block_size);
415 chunk_header.chunk_sz = rnd_up_len / out->block_size;
479 unsigned int rnd_up_len = ALIGN(len, out->block_size);
541 output_file_init(struct output_file *out, int block_size, int64_t len, bool sparse, int chunks, bool crc) argument
630 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
656 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
132 size_t block_size = 4096; local
[all...]
/system/update_engine/payload_consumer/
H A Dextent_writer.h44 uint32_t block_size) = 0;
70 uint32_t block_size) override {
72 block_size_ = block_size;
104 uint32_t block_size) override {
105 block_size_ = block_size;
106 return underlying_extent_writer_->Init(fd, extents, block_size);
/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 Dpayload_generation_config.cc42 int block_count, block_size; local
43 if (utils::GetFilesystemSize(path, &block_count, &block_size) &&
44 block_size != 4096) {
46 << " has a block size of " << block_size local
185 TEST_AND_RETURN_FALSE(part.size % block_size == 0);
202 TEST_AND_RETURN_FALSE(part.size % block_size == 0);
211 hard_chunk_size % block_size == 0);
212 TEST_AND_RETURN_FALSE(soft_chunk_size % block_size == 0);
214 TEST_AND_RETURN_FALSE(rootfs_partition_size % block_size == 0);
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.cc40 config_.block_size = 4096;
90 static_cast<uint64_t>(i * config_.hard_chunk_size / config_.block_size),
93 EXPECT_EQ(config_.hard_chunk_size / config_.block_size,
118 EXPECT_EQ(config_.hard_chunk_size / config_.block_size,
120 EXPECT_EQ((new_part.size() - config_.hard_chunk_size) / config_.block_size,
140 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/extras/ext4_utils/
H A Dext2simg.c64 block_bitmap = malloc(info.block_size);
70 info.block_size * aux_info.first_data_block, 0);
76 ret = lseek64(fd, (u64)info.block_size * aux_info.bg_desc[i].bg_block_bitmap,
81 ret = read(fd, block_bitmap, info.block_size);
84 if (ret != (int)info.block_size)
95 (u64)info.block_size * start_block,
96 info.block_size * len_blocks, start_block);
109 (u64)info.block_size * start_block,
110 info.block_size * len_blocks, start_block);
173 ext4_sparse_file = sparse_file_new(info.block_size, 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;
H A Dext4_sb.h34 uint32_t block_size; member in struct:fs_info
H A Dindirect.c31 if (DIV_ROUND_UP(backing_len, info.block_size) > EXT4_NDIR_BLOCKS)
45 len = min(region_len * info.block_size, backing_len);
123 u32 *ind_block_data = calloc(info.block_size, 1);
124 sparse_file_add_data(ext4_sparse_file, ind_block_data, info.block_size,
153 u32 *dind_block_data = calloc(info.block_size, 1);
154 sparse_file_add_data(ext4_sparse_file, dind_block_data, info.block_size,
202 u32 *ind_block_data = calloc(info.block_size, 1);
203 sparse_file_add_data(ext4_sparse_file, ind_block_data, info.block_size,
234 u32 *dind_block_data = calloc(info.block_size, 1);
235 sparse_file_add_data(ext4_sparse_file, dind_block_data, info.block_size,
[all...]
H A Dext4fixup.c175 inode_offset = ((unsigned long long)aux_info.bg_desc[bg_num].bg_inode_table * info.block_size) +
195 off = block_num * info.block_size;
201 len=read(fd, block, info.block_size);
202 if (len != info.block_size) {
218 off = block_num * info.block_size;
224 len=write(fd, block, info.block_size);
225 if (len != info.block_size) {
294 if (new_inodes_per_group % (info.block_size/info.inode_size)) {
325 * info.blocks_per_group * info.block_size
330 ret = lseek64(fd, ((unsigned long long)i * info.blocks_per_group * info.block_size)
[all...]
H A Dext4_utils.c180 offset = info.block_size * (aux_info.first_data_block
202 aux_info.first_data_block = (info.block_size > 1024) ? 0 : 1;
203 aux_info.len_blocks = info.len / info.block_size;
205 info.block_size);
208 aux_info.blocks_per_ind = info.block_size / sizeof(u32);
214 info.block_size);
231 aux_info.sb_zero = calloc(1, info.block_size);
240 aux_info.sb_block = calloc(1, info.block_size);
244 if (info.block_size > 1024)
255 aux_info.bg_desc = calloc(info.block_size, aux_inf
[all...]
H A Dextent.c43 len = min(region_len * info.block_size, backing_len);
65 len = min(region_len * info.block_size, backing_len);
77 u32 block_len = DIV_ROUND_UP(len, info.block_size), prealloc_block_len;
143 u8 *data = calloc(info.block_size, 1);
147 sparse_file_add_data(ext4_sparse_file, data, info.block_size,
150 if (((int)(info.block_size - sizeof(struct ext4_extent_header) /
160 hdr->eh_max = (info.block_size - sizeof(struct ext4_extent_header)) /
184 blocks = (u64)block_len * info.block_size / 512;
/system/update_engine/sample_images/
H A Dgenerate_images.sh37 # add_files_default <mntdir> <block_size>
41 local block_size="$2"
58 sudo truncate --size=$(( block_size * 2 )) "${mntdir}"/sparse_empty-2blocks
70 seek=$(( block_size * 10000 )) status=none
97 # add_files_ue_settings <mntdir> <block_size>
197 # generate_fs <filename> <kind> <size> [block_size] [block_groups]
202 local block_size="${4:-4096}"
205 local mkfs_opts=( -q -F -b "${block_size}" -L "ROOT-TEST" -t ext2 )
224 add_files_ue_settings "${mntdir}" "${block_size}"
225 add_files_postinstall "${mntdir}" "${block_size}"
[all...]

Completed in 268 milliseconds

123