Lines Matching refs:block_list

453 static int get_direct_blocks(struct ext4_inode *inode, unsigned long long *block_list,
462 block_list[i] = inode->i_block[i];
476 unsigned long long *block_list, unsigned int *count)
492 block_list[EXT4_NDIR_BLOCKS+i] = indirect_block[i];
502 static int get_block_list_indirect(int fd, struct ext4_inode *inode, unsigned long long *block_list)
506 if (get_direct_blocks(inode, block_list, &count)) {
507 get_indirect_blocks(fd, inode, block_list, &count);
513 static int get_extent_ents(int fd, struct ext4_extent_header *ext_hdr, unsigned long long *block_list)
531 block_list[extent->ee_block+j] = fs_block_num+j;
539 static int get_extent_idx(int fd, struct ext4_extent_header *ext_hdr, unsigned long long *block_list)
563 get_extent_ents(fd, tmp_ext_hdr, block_list); /* leaf node, fill in block_list */
565 get_extent_idx(fd, tmp_ext_hdr, block_list); /* recurse down the tree */
572 static int get_block_list_extents(int fd, struct ext4_inode *inode, unsigned long long *block_list)
584 get_extent_ents(fd, (struct ext4_extent_header *)inode->i_block, block_list);
588 get_extent_idx(fd, (struct ext4_extent_header *)inode->i_block, block_list);
623 unsigned long long *block_list;
648 block_list = malloc((num_blocks + 1) * sizeof(*block_list));
649 if (block_list == 0) {
650 critical_error("failed to allocate memory for block_list\n");
654 get_block_list_extents(fd, inode, block_list);
668 get_block_list_indirect(fd, inode, block_list);
673 read_block(fd, block_list[i], dirbuf + (i * info.block_size));
770 write_block(fd, block_list[i], dirbuf + (i * info.block_size));
776 free(block_list);