Lines Matching refs:ctx
110 static int ext4_readdir(struct file *file, struct dir_context *ctx)
128 err = ext4_dx_readdir(file, ctx);
144 err = ext4_read_inline_dir(file, ctx,
156 while (ctx->pos < inode->i_size) {
164 offset = ctx->pos & (sb->s_blocksize - 1);
165 map.m_lblk = ctx->pos >> EXT4_BLOCK_SIZE_BITS(sb);
173 ctx->pos += map.m_len * sb->s_blocksize;
195 if (ctx->pos > inode->i_blocks << 9)
197 ctx->pos += sb->s_blocksize - offset;
206 (unsigned long long)ctx->pos);
207 ctx->pos += sb->s_blocksize - offset;
235 ctx->pos = (ctx->pos & ~(sb->s_blocksize - 1))
240 while (ctx->pos < inode->i_size
249 ctx->pos = (ctx->pos |
257 if (!dir_emit(ctx, de->name,
275 if (!dir_emit(ctx,
282 ctx->pos += ext4_rec_len_from_disk(de->rec_len,
285 if ((ctx->pos < inode->i_size) && !dir_relax_shared(inode))
505 static int call_filldir(struct file *file, struct dir_context *ctx,
518 ctx->pos = hash2pos(file, fname->hash, fname->minor_hash);
520 if (!dir_emit(ctx, fname->name,
532 static int ext4_dx_readdir(struct file *file, struct dir_context *ctx)
540 info = ext4_htree_create_dir_info(file, ctx->pos);
546 if (ctx->pos == ext4_get_htree_eof(file))
550 if (info->last_pos != ctx->pos) {
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))
587 ctx->pos = ext4_get_htree_eof(file);
596 if (call_filldir(file, ctx, fname))
607 ctx->pos = ext4_get_htree_eof(file);
615 info->last_pos = ctx->pos;