Lines Matching refs:block_list
357 static int get_direct_blocks(struct ext4_inode *inode, unsigned long long *block_list, in get_direct_blocks() argument
366 block_list[i] = inode->i_block[i]; in get_direct_blocks()
380 unsigned long long *block_list, unsigned int *count) in get_indirect_blocks() argument
396 block_list[EXT4_NDIR_BLOCKS+i] = indirect_block[i]; in get_indirect_blocks()
406 static int get_block_list_indirect(int fd, struct ext4_inode *inode, unsigned long long *block_list) in get_block_list_indirect() argument
410 if (get_direct_blocks(inode, block_list, &count)) { in get_block_list_indirect()
411 get_indirect_blocks(fd, inode, block_list, &count); in get_block_list_indirect()
417 static int get_extent_ents(struct ext4_extent_header *ext_hdr, unsigned long long *block_list) in get_extent_ents() argument
435 block_list[extent->ee_block+j] = fs_block_num+j; in get_extent_ents()
443 …atic int get_extent_idx(int fd, struct ext4_extent_header *ext_hdr, unsigned long long *block_list) in get_extent_idx() argument
467 get_extent_ents(tmp_ext_hdr, block_list); /* leaf node, fill in block_list */ in get_extent_idx()
469 get_extent_idx(fd, tmp_ext_hdr, block_list); /* recurse down the tree */ in get_extent_idx()
476 static int get_block_list_extents(int fd, struct ext4_inode *inode, unsigned long long *block_list) in get_block_list_extents() argument
488 get_extent_ents((struct ext4_extent_header *)inode->i_block, block_list); in get_block_list_extents()
492 get_extent_idx(fd, (struct ext4_extent_header *)inode->i_block, block_list); in get_block_list_extents()
527 unsigned long long *block_list; in recurse_dir() local
552 block_list = malloc((num_blocks + 1) * sizeof(*block_list)); in recurse_dir()
553 if (block_list == 0) { in recurse_dir()
558 get_block_list_extents(fd, inode, block_list); in recurse_dir()
572 get_block_list_indirect(fd, inode, block_list); in recurse_dir()
577 read_block(fd, block_list[i], dirbuf + (i * info.block_size)); in recurse_dir()
674 write_block(fd, block_list[i], dirbuf + (i * info.block_size)); in recurse_dir()
680 free(block_list); in recurse_dir()