Lines Matching refs:ctx
126 static int ext4_readdir(struct file *file, struct dir_context *ctx)
142 err = ext4_dx_readdir(file, ctx);
158 err = ext4_read_inline_dir(file, ctx,
170 while (ctx->pos < inode->i_size) {
178 offset = ctx->pos & (sb->s_blocksize - 1);
179 map.m_lblk = ctx->pos >> EXT4_BLOCK_SIZE_BITS(sb);
187 ctx->pos += map.m_len * sb->s_blocksize;
209 if (ctx->pos > inode->i_blocks << 9)
211 ctx->pos += sb->s_blocksize - offset;
220 (unsigned long long)ctx->pos);
221 ctx->pos += sb->s_blocksize - offset;
250 ctx->pos = (ctx->pos & ~(sb->s_blocksize - 1))
255 while (ctx->pos < inode->i_size
264 ctx->pos = (ctx->pos |
272 if (!dir_emit(ctx, de->name,
292 if (!dir_emit(ctx,
299 ctx->pos += ext4_rec_len_from_disk(de->rec_len,
302 if ((ctx->pos < inode->i_size) && !dir_relax_shared(inode))
521 static int call_filldir(struct file *file, struct dir_context *ctx,
534 ctx->pos = hash2pos(file, fname->hash, fname->minor_hash);
536 if (!dir_emit(ctx, fname->name,
548 static int ext4_dx_readdir(struct file *file, struct dir_context *ctx)
556 info = ext4_htree_create_dir_info(file, ctx->pos);
562 if (ctx->pos == ext4_get_htree_eof(file))
566 if (info->last_pos != ctx->pos) {
570 info->curr_hash = pos2maj_hash(file, ctx->pos);
571 info->curr_minor_hash = pos2min_hash(file, ctx->pos);
579 if (call_filldir(file, ctx, info->extra_fname))
603 ctx->pos = ext4_get_htree_eof(file);
612 if (call_filldir(file, ctx, fname))
623 ctx->pos = ext4_get_htree_eof(file);
631 info->last_pos = ctx->pos;