Re: [PATCH] f2fs: zone: wait for inflight dio completion, excluding pinned files

From: Chao Yu
Date: Mon Jul 21 2025 - 23:57:08 EST


On 7/21/25 13:41, yohan.joung wrote:
> pinfile is excluded as it operates with direct I/O

pinfile can use buffer IO as well?

Thanks,

>
> Signed-off-by: yohan.joung <yohan.joung@xxxxxx>
> ---
> fs/f2fs/file.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> index 4039ccb5022c..cac8c9650a7a 100644
> --- a/fs/f2fs/file.c
> +++ b/fs/f2fs/file.c
> @@ -4844,7 +4844,8 @@ static ssize_t f2fs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
>
> /* In LFS mode, if there is inflight dio, wait for its completion */
> if (f2fs_lfs_mode(F2FS_I_SB(inode)) &&
> - get_pages(F2FS_I_SB(inode), F2FS_DIO_WRITE))
> + get_pages(F2FS_I_SB(inode), F2FS_DIO_WRITE) &&
> + !f2fs_is_pinned_file(inode))
> inode_dio_wait(inode);
>
> if (f2fs_should_use_dio(inode, iocb, to)) {