Lines Matching defs:file
33 static int ext4_dx_readdir(struct file *, struct dir_context *);
67 struct inode *dir, struct file *filp,
110 static int ext4_readdir(struct file *file, struct dir_context *ctx)
116 struct inode *inode = file_inode(file);
128 err = ext4_dx_readdir(file, ctx);
144 err = ext4_read_inline_dir(file, ctx,
179 if (!ra_has_index(&file->f_ra, index))
182 &file->f_ra, file,
184 file->f_ra.prev_pos = (loff_t)index << PAGE_SHIFT;
204 EXT4_ERROR_FILE(file, 0, "directory fails checksum "
218 if (!inode_eq_iversion(inode, file->f_version)) {
237 file->f_version = inode_query_iversion(inode);
243 if (ext4_check_dir_entry(inode, file, de, bh,
317 static inline loff_t hash2pos(struct file *filp, __u32 major, __u32 minor)
326 static inline __u32 pos2maj_hash(struct file *filp, loff_t pos)
335 static inline __u32 pos2min_hash(struct file *filp, loff_t pos)
345 * Return 32- or 64-bit end-of-file for dx directories
347 static inline loff_t ext4_get_htree_eof(struct file *filp)
368 static loff_t ext4_dir_llseek(struct file *file, loff_t offset, int whence)
370 struct inode *inode = file->f_mapping->host;
372 loff_t ret, htree_max = ext4_get_htree_eof(file);
375 ret = generic_file_llseek_size(file, offset, whence,
378 ret = ext4_llseek(file, offset, whence);
379 file->f_version = inode_peek_iversion(inode) - 1;
417 static struct dir_private_info *ext4_htree_create_dir_info(struct file *filp,
443 int ext4_htree_store_dirent(struct file *dir_file, __u32 hash,
505 static int call_filldir(struct file *file, struct dir_context *ctx,
508 struct dir_private_info *info = file->private_data;
509 struct inode *inode = file_inode(file);
518 ctx->pos = hash2pos(file, fname->hash, fname->minor_hash);
532 static int ext4_dx_readdir(struct file *file, struct dir_context *ctx)
534 struct dir_private_info *info = file->private_data;
535 struct inode *inode = file_inode(file);
540 info = ext4_htree_create_dir_info(file, ctx->pos);
543 file->private_data = info;
546 if (ctx->pos == ext4_get_htree_eof(file))
554 info->curr_hash = pos2maj_hash(file, ctx->pos);
555 info->curr_minor_hash = pos2min_hash(file, ctx->pos);
563 if (call_filldir(file, ctx, info->extra_fname))
577 !inode_eq_iversion(inode, file->f_version)) {
580 file->f_version = inode_query_iversion(inode);
581 ret = ext4_htree_fill_tree(file, info->curr_hash,
587 ctx->pos = ext4_get_htree_eof(file);
596 if (call_filldir(file, ctx, fname))
607 ctx->pos = ext4_get_htree_eof(file);
619 static int ext4_dir_open(struct inode * inode, struct file * filp)
626 static int ext4_release_dir(struct inode *inode, struct file *filp)