/system/core/libsparse/ |
H A D | sparse_file.h | 23 unsigned int block_size; member in struct:sparse_file
|
H A D | img2simg.c | 43 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 D | sparse.c | 30 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 D | output_file.h | 24 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 D | output_file.c | 86 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 D | build_verity_tree.cpp | 26 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/scripts/update_payload/ |
H A D | applier.py | 72 def _ReadExtents(file_obj, extents, block_size, max_length=-1): 80 block_size: size of each block 92 read_length = min(max_length, ex.num_blocks * block_size) 98 file_obj.seek(ex.start_block * block_size) 106 def _WriteExtents(file_obj, data, extents, block_size, base_name): 115 block_size: size of each block 126 write_length = min(data_length, ex.num_blocks * block_size) 130 file_obj.seek(ex.start_block * block_size) 141 def _ExtentsToBspatchArg(extents, block_size, base_name, data_length=-1): 146 block_size [all...] |
H A D | checker_unittest.py | 397 fail_mismatched_block_size: Simulate a missing block_size field. 489 block_size = payload_checker.block_size 493 int(3.5 * block_size), 4, 'foo', 'bar')) 497 int(3.5 * block_size), 3, 'foo', 'bar') 501 int(3.5 * block_size), 5, 'foo', 'bar') 506 block_size = payload_checker.block_size 512 payload_checker._CheckExtents(extents, (1024 + 16) * block_size, 520 payload_checker._CheckExtents(extents, (1024 + 16) * block_size, [all...] |
/system/update_engine/payload_consumer/ |
H A D | extent_writer.h | 44 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 D | raw_filesystem.cc | 28 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 D | block_mapping.cc | 119 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 D | fake_filesystem.cc | 23 FakeFilesystem::FakeFilesystem(uint64_t block_size, uint64_t block_count) : argument 24 block_size_(block_size),
|
H A D | block_mapping.h | 31 // 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 D | full_update_generator.cc | 139 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 D | full_update_generator_unittest.cc | 40 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 D | raw_filesystem.h | 33 const std::string& filename, uint64_t block_size, uint64_t block_count);
|
/system/extras/squashfs_utils/ |
H A D | squashfs_utils.h | 28 uint32_t block_size; member in struct:squashfs_info
|
H A D | squashfs_utils.c | 50 info->block_size = sb->block_size;
|
/system/extras/ext4_utils/ |
H A D | ext4_sb.c | 28 info->block_size = 1024 << sb->s_log_block_size; 41 info->len = (uint64_t)info->block_size * len_blocks;
|
H A D | indirect.c | 33 if (DIV_ROUND_UP(backing_len, info.block_size) > EXT4_NDIR_BLOCKS) 47 len = min(region_len * info.block_size, backing_len); 125 u32 *ind_block_data = calloc(info.block_size, 1); 126 sparse_file_add_data(ext4_sparse_file, ind_block_data, info.block_size, 155 u32 *dind_block_data = calloc(info.block_size, 1); 156 sparse_file_add_data(ext4_sparse_file, dind_block_data, info.block_size, 204 u32 *ind_block_data = calloc(info.block_size, 1); 205 sparse_file_add_data(ext4_sparse_file, ind_block_data, info.block_size, 236 u32 *dind_block_data = calloc(info.block_size, 1); 237 sparse_file_add_data(ext4_sparse_file, dind_block_data, info.block_size, [all...] |
H A D | ext4_utils.c | 182 offset = (unsigned long long)info.block_size * (aux_info.first_data_block 204 aux_info.first_data_block = (info.block_size > 1024) ? 0 : 1; 205 aux_info.len_blocks = info.len / info.block_size; 207 info.block_size); 210 aux_info.blocks_per_ind = info.block_size / sizeof(u32); 216 info.block_size); 236 aux_info.sb_zero = calloc(1, info.block_size); 245 aux_info.sb_block = calloc(1, info.block_size); 249 if (info.block_size > 1024) 260 aux_info.bg_desc = calloc(info.block_size, aux_inf [all...] |
H A D | ext4fixup.c | 180 inode_offset = ((unsigned long long)aux_info.bg_desc[bg_num].bg_inode_table * info.block_size) + 200 off = block_num * info.block_size; 206 len=read(fd, block, info.block_size); 207 if (len != info.block_size) { 223 off = block_num * info.block_size; 229 len=write(fd, block, info.block_size); 230 if (len != info.block_size) { 299 if (new_inodes_per_group % (info.block_size/info.inode_size)) { 330 * info.blocks_per_group * info.block_size 335 ret = lseek64(fd, ((unsigned long long)i * info.blocks_per_group * info.block_size) [all...] |
H A D | extent.c | 44 len = min(region_len * info.block_size, backing_len); 66 len = min(region_len * info.block_size, backing_len); 78 u32 block_len = DIV_ROUND_UP(len, info.block_size), prealloc_block_len; 144 u8 *data = calloc(info.block_size, 1); 148 sparse_file_add_data(ext4_sparse_file, data, info.block_size, 151 if (((int)(info.block_size - sizeof(struct ext4_extent_header) / 161 hdr->eh_max = (info.block_size - sizeof(struct ext4_extent_header)) / 185 blocks = (u64)block_len * info.block_size / 512;
|
/system/extras/ext4_utils/include/ext4_utils/ |
H A D | ext4_sb.h | 34 uint32_t block_size; member in struct:fs_info
|
/system/update_engine/sample_images/ |
H A D | generate_images.sh | 37 # 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 103 # add_files_ue_settings <mntdir> <block_size> 203 # generate_fs <filename> <kind> <size> [block_size] [block_groups] 208 local block_size="${4:-4096}" 211 local mkfs_opts=( -q -F -b "${block_size}" -L "ROOT-TEST" -t ext2 ) 230 add_files_ue_settings "${mntdir}" "${block_size}" 231 add_files_postinstall "${mntdir}" "${block_size}" [all...] |