Lines Matching refs:file

30 static int ext4_dx_readdir(struct file *, struct dir_context *);
61 struct inode *dir, struct file *filp, in __ext4_check_dir_entry()
102 static int ext4_readdir(struct file *file, struct dir_context *ctx) in ext4_readdir() argument
108 struct inode *inode = file_inode(file); in ext4_readdir()
115 err = ext4_dx_readdir(file, ctx); in ext4_readdir()
123 ext4_clear_inode_flag(file_inode(file), in ext4_readdir()
129 err = ext4_read_inline_dir(file, ctx, in ext4_readdir()
153 if (!ra_has_index(&file->f_ra, index)) in ext4_readdir()
156 &file->f_ra, file, in ext4_readdir()
158 file->f_ra.prev_pos = (loff_t)index << PAGE_CACHE_SHIFT; in ext4_readdir()
166 EXT4_ERROR_FILE(file, 0, in ext4_readdir()
183 EXT4_ERROR_FILE(file, 0, "directory fails checksum " in ext4_readdir()
197 if (file->f_version != inode->i_version) { in ext4_readdir()
216 file->f_version = inode->i_version; in ext4_readdir()
222 if (ext4_check_dir_entry(inode, file, de, bh, in ext4_readdir()
294 static inline loff_t hash2pos(struct file *filp, __u32 major, __u32 minor) in hash2pos()
303 static inline __u32 pos2maj_hash(struct file *filp, loff_t pos) in pos2maj_hash()
312 static inline __u32 pos2min_hash(struct file *filp, loff_t pos) in pos2min_hash()
324 static inline loff_t ext4_get_htree_eof(struct file *filp) in ext4_get_htree_eof()
345 static loff_t ext4_dir_llseek(struct file *file, loff_t offset, int whence) in ext4_dir_llseek() argument
347 struct inode *inode = file->f_mapping->host; in ext4_dir_llseek()
349 loff_t htree_max = ext4_get_htree_eof(file); in ext4_dir_llseek()
352 return generic_file_llseek_size(file, offset, whence, in ext4_dir_llseek()
355 return ext4_llseek(file, offset, whence); in ext4_dir_llseek()
392 static struct dir_private_info *ext4_htree_create_dir_info(struct file *filp, in ext4_htree_create_dir_info()
418 int ext4_htree_store_dirent(struct file *dir_file, __u32 hash, in ext4_htree_store_dirent()
481 static int call_filldir(struct file *file, struct dir_context *ctx, in call_filldir() argument
484 struct dir_private_info *info = file->private_data; in call_filldir()
485 struct inode *inode = file_inode(file); in call_filldir()
494 ctx->pos = hash2pos(file, fname->hash, fname->minor_hash); in call_filldir()
508 static int ext4_dx_readdir(struct file *file, struct dir_context *ctx) in ext4_dx_readdir() argument
510 struct dir_private_info *info = file->private_data; in ext4_dx_readdir()
511 struct inode *inode = file_inode(file); in ext4_dx_readdir()
516 info = ext4_htree_create_dir_info(file, ctx->pos); in ext4_dx_readdir()
519 file->private_data = info; in ext4_dx_readdir()
522 if (ctx->pos == ext4_get_htree_eof(file)) in ext4_dx_readdir()
530 info->curr_hash = pos2maj_hash(file, ctx->pos); in ext4_dx_readdir()
531 info->curr_minor_hash = pos2min_hash(file, ctx->pos); in ext4_dx_readdir()
539 if (call_filldir(file, ctx, info->extra_fname)) in ext4_dx_readdir()
553 (file->f_version != inode->i_version)) { in ext4_dx_readdir()
556 file->f_version = inode->i_version; in ext4_dx_readdir()
557 ret = ext4_htree_fill_tree(file, info->curr_hash, in ext4_dx_readdir()
563 ctx->pos = ext4_get_htree_eof(file); in ext4_dx_readdir()
572 if (call_filldir(file, ctx, fname)) in ext4_dx_readdir()
583 ctx->pos = ext4_get_htree_eof(file); in ext4_dx_readdir()
595 static int ext4_dir_open(struct inode * inode, struct file * filp) in ext4_dir_open()
602 static int ext4_release_dir(struct inode *inode, struct file *filp) in ext4_release_dir()