Lines Matching full:file

33 static int ext4_dx_readdir(struct file *, struct dir_context *);
79 struct inode *dir, struct file *filp,
129 static int ext4_readdir(struct file *file, struct dir_context *ctx)
135 struct inode *inode = file_inode(file);
139 struct dir_private_info *info = file->private_data;
146 err = ext4_dx_readdir(file, ctx);
162 err = ext4_read_inline_dir(file, ctx,
197 if (!ra_has_index(&file->f_ra, index))
200 &file->f_ra, file,
202 file->f_ra.prev_pos = (loff_t)index << PAGE_SHIFT;
222 EXT4_ERROR_FILE(file, 0, "directory fails checksum "
262 if (ext4_check_dir_entry(inode, file, de, bh,
345 static inline loff_t hash2pos(struct file *filp, __u32 major, __u32 minor)
354 static inline __u32 pos2maj_hash(struct file *filp, loff_t pos)
363 static inline __u32 pos2min_hash(struct file *filp, loff_t pos)
373 * Return 32- or 64-bit end-of-file for dx directories
375 static inline loff_t ext4_get_htree_eof(struct file *filp)
396 static loff_t ext4_dir_llseek(struct file *file, loff_t offset, int whence)
398 struct inode *inode = file->f_mapping->host;
399 struct dir_private_info *info = file->private_data;
401 loff_t ret, htree_max = ext4_get_htree_eof(file);
404 ret = generic_file_llseek_size(file, offset, whence,
407 ret = ext4_llseek(file, offset, whence);
445 static void ext4_htree_init_dir_info(struct file *filp, loff_t pos)
469 int ext4_htree_store_dirent(struct file *dir_file, __u32 hash,
530 static int call_filldir(struct file *file, struct dir_context *ctx,
533 struct dir_private_info *info = file->private_data;
534 struct inode *inode = file_inode(file);
543 ctx->pos = hash2pos(file, fname->hash, fname->minor_hash);
557 static int ext4_dx_readdir(struct file *file, struct dir_context *ctx)
559 struct dir_private_info *info = file->private_data;
560 struct inode *inode = file_inode(file);
564 ext4_htree_init_dir_info(file, ctx->pos);
566 if (ctx->pos == ext4_get_htree_eof(file))
574 info->curr_hash = pos2maj_hash(file, ctx->pos);
575 info->curr_minor_hash = pos2min_hash(file, ctx->pos);
583 if (call_filldir(file, ctx, info->extra_fname))
601 ret = ext4_htree_fill_tree(file, info->curr_hash,
607 ctx->pos = ext4_get_htree_eof(file);
616 if (call_filldir(file, ctx, fname))
627 ctx->pos = ext4_get_htree_eof(file);
639 static int ext4_release_dir(struct inode *inode, struct file *filp)
671 static int ext4_dir_open(struct inode *inode, struct file *file)
678 file->private_data = info;