[PATCH 1/2] erofs: allow readdir() to be interrupted
Gao Xiang
hsiangkao at linux.alibaba.com
Thu Jul 10 17:41:49 AEST 2025
On 2025/7/10 15:36, Chao Yu wrote:
> In a quick slow device, readdir() may loop for long time in large
> directory, let's give a chance to allow it to be interrupted by
> userspace.
>
> Signed-off-by: Chao Yu <chao at kernel.org>
Reviewed-by: Gao Xiang <hsiangkao at linux.alibaba.com>
> ---
> fs/erofs/dir.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/fs/erofs/dir.c b/fs/erofs/dir.c
> index 2fae209d0274..cff61c5a172b 100644
> --- a/fs/erofs/dir.c
> +++ b/fs/erofs/dir.c
> @@ -58,6 +58,13 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx)
> struct erofs_dirent *de;
> unsigned int nameoff, maxsize;
>
> + /* allow readdir() to be interrupted */
Hi Chao,
It seems that comment is unnecessary since the following code
is obvious, if you have no objection I will remove this
comment when applying.
Thanks,
Gao Xiang
More information about the Linux-erofs
mailing list