Lines Matching refs:file

31 static int ext3_dx_readdir(struct file *, struct dir_context *);
93 static int ext3_readdir(struct file *file, struct dir_context *ctx) in ext3_readdir() argument
99 struct inode *inode = file_inode(file); in ext3_readdir()
104 err = ext3_dx_readdir(file, ctx); in ext3_readdir()
125 if (!ra_has_index(&file->f_ra, index)) in ext3_readdir()
128 &file->f_ra, file, in ext3_readdir()
130 file->f_ra.prev_pos = (loff_t)index << PAGE_CACHE_SHIFT; in ext3_readdir()
156 if (offset && file->f_version != inode->i_version) { in ext3_readdir()
174 file->f_version = inode->i_version; in ext3_readdir()
226 static inline loff_t hash2pos(struct file *filp, __u32 major, __u32 minor) in hash2pos()
235 static inline __u32 pos2maj_hash(struct file *filp, loff_t pos) in pos2maj_hash()
244 static inline __u32 pos2min_hash(struct file *filp, loff_t pos) in pos2min_hash()
256 static inline loff_t ext3_get_htree_eof(struct file *filp) in ext3_get_htree_eof()
278 static loff_t ext3_dir_llseek(struct file *file, loff_t offset, int whence) in ext3_dir_llseek() argument
280 struct inode *inode = file->f_mapping->host; in ext3_dir_llseek()
282 loff_t htree_max = ext3_get_htree_eof(file); in ext3_dir_llseek()
285 return generic_file_llseek_size(file, offset, whence, in ext3_dir_llseek()
288 return generic_file_llseek(file, offset, whence); in ext3_dir_llseek()
324 static struct dir_private_info *ext3_htree_create_dir_info(struct file *filp, in ext3_htree_create_dir_info()
346 int ext3_htree_store_dirent(struct file *dir_file, __u32 hash, in ext3_htree_store_dirent()
408 static bool call_filldir(struct file *file, struct dir_context *ctx, in call_filldir() argument
411 struct dir_private_info *info = file->private_data; in call_filldir()
412 struct inode *inode = file_inode(file); in call_filldir()
419 ctx->pos = hash2pos(file, fname->hash, fname->minor_hash); in call_filldir()
432 static int ext3_dx_readdir(struct file *file, struct dir_context *ctx) in ext3_dx_readdir() argument
434 struct dir_private_info *info = file->private_data; in ext3_dx_readdir()
435 struct inode *inode = file_inode(file); in ext3_dx_readdir()
440 info = ext3_htree_create_dir_info(file, ctx->pos); in ext3_dx_readdir()
443 file->private_data = info; in ext3_dx_readdir()
446 if (ctx->pos == ext3_get_htree_eof(file)) in ext3_dx_readdir()
454 info->curr_hash = pos2maj_hash(file, ctx->pos); in ext3_dx_readdir()
455 info->curr_minor_hash = pos2min_hash(file, ctx->pos); in ext3_dx_readdir()
463 if (!call_filldir(file, ctx, info->extra_fname)) in ext3_dx_readdir()
477 (file->f_version != inode->i_version)) { in ext3_dx_readdir()
480 file->f_version = inode->i_version; in ext3_dx_readdir()
481 ret = ext3_htree_fill_tree(file, info->curr_hash, in ext3_dx_readdir()
487 ctx->pos = ext3_get_htree_eof(file); in ext3_dx_readdir()
496 if (!call_filldir(file, ctx, fname)) in ext3_dx_readdir()
507 ctx->pos = ext3_get_htree_eof(file); in ext3_dx_readdir()
519 static int ext3_release_dir (struct inode * inode, struct file * filp) in ext3_release_dir()