* [f2fs-dev] [PATCH v3] f2fs: zone: wait for inflight dio completion, excluding pinned files read using dio
@ 2025-07-22 6:02 ` yohan.joung
0 siblings, 0 replies; 6+ messages in thread
From: yohan.joung @ 2025-07-22 6:02 UTC (permalink / raw)
To: jaegeuk, chao; +Cc: pilhyun.kim, linux-kernel, linux-f2fs-devel
read for the pinfile using Direct I/O do not wait for dio write.
Signed-off-by: yohan.joung <yohan.joung@sk.com>
---
fs/f2fs/file.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 4039ccb5022c..58a4d25eb08f 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -4834,6 +4834,7 @@ static ssize_t f2fs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
struct inode *inode = file_inode(iocb->ki_filp);
const loff_t pos = iocb->ki_pos;
ssize_t ret;
+ bool dio;
if (!f2fs_is_compress_backend_ready(inode))
return -EOPNOTSUPP;
@@ -4842,12 +4843,15 @@ static ssize_t f2fs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
f2fs_trace_rw_file_path(iocb->ki_filp, iocb->ki_pos,
iov_iter_count(to), READ);
+ dio = f2fs_should_use_dio(inode, iocb, 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) || !dio))
inode_dio_wait(inode);
- if (f2fs_should_use_dio(inode, iocb, to)) {
+ if (dio) {
ret = f2fs_dio_read_iter(iocb, to);
} else {
ret = filemap_read(iocb, to, 0);
--
2.33.0
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3] f2fs: zone: wait for inflight dio completion, excluding pinned files read using dio
@ 2025-07-22 6:02 ` yohan.joung
0 siblings, 0 replies; 6+ messages in thread
From: yohan.joung @ 2025-07-22 6:02 UTC (permalink / raw)
To: jaegeuk, chao; +Cc: linux-kernel, linux-f2fs-devel, pilhyun.kim, yohan.joung
read for the pinfile using Direct I/O do not wait for dio write.
Signed-off-by: yohan.joung <yohan.joung@sk.com>
---
fs/f2fs/file.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 4039ccb5022c..58a4d25eb08f 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -4834,6 +4834,7 @@ static ssize_t f2fs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
struct inode *inode = file_inode(iocb->ki_filp);
const loff_t pos = iocb->ki_pos;
ssize_t ret;
+ bool dio;
if (!f2fs_is_compress_backend_ready(inode))
return -EOPNOTSUPP;
@@ -4842,12 +4843,15 @@ static ssize_t f2fs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
f2fs_trace_rw_file_path(iocb->ki_filp, iocb->ki_pos,
iov_iter_count(to), READ);
+ dio = f2fs_should_use_dio(inode, iocb, 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) || !dio))
inode_dio_wait(inode);
- if (f2fs_should_use_dio(inode, iocb, to)) {
+ if (dio) {
ret = f2fs_dio_read_iter(iocb, to);
} else {
ret = filemap_read(iocb, to, 0);
--
2.33.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [f2fs-dev] [PATCH v3] f2fs: zone: wait for inflight dio completion, excluding pinned files read using dio
2025-07-22 6:02 ` yohan.joung
@ 2025-07-22 6:04 ` Chao Yu
-1 siblings, 0 replies; 6+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2025-07-22 6:04 UTC (permalink / raw)
To: yohan.joung, jaegeuk; +Cc: pilhyun.kim, linux-kernel, linux-f2fs-devel
On 7/22/25 14:02, yohan.joung wrote:
> read for the pinfile using Direct I/O do not wait for dio write.
>
> Signed-off-by: yohan.joung <yohan.joung@sk.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] f2fs: zone: wait for inflight dio completion, excluding pinned files read using dio
@ 2025-07-22 6:04 ` Chao Yu
0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu @ 2025-07-22 6:04 UTC (permalink / raw)
To: yohan.joung, jaegeuk; +Cc: chao, linux-kernel, linux-f2fs-devel, pilhyun.kim
On 7/22/25 14:02, yohan.joung wrote:
> read for the pinfile using Direct I/O do not wait for dio write.
>
> Signed-off-by: yohan.joung <yohan.joung@sk.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [f2fs-dev] [PATCH v3] f2fs: zone: wait for inflight dio completion, excluding pinned files read using dio
2025-07-22 6:02 ` yohan.joung
@ 2025-07-24 20:30 ` patchwork-bot+f2fs
-1 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+f2fs--- via Linux-f2fs-devel @ 2025-07-24 20:30 UTC (permalink / raw)
To: yohan.joung; +Cc: jaegeuk, linux-f2fs-devel, linux-kernel, pilhyun.kim
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Tue, 22 Jul 2025 15:02:40 +0900 you wrote:
> read for the pinfile using Direct I/O do not wait for dio write.
>
> Signed-off-by: yohan.joung <yohan.joung@sk.com>
> ---
> fs/f2fs/file.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
Here is the summary with links:
- [f2fs-dev,v3] f2fs: zone: wait for inflight dio completion, excluding pinned files read using dio
https://git.kernel.org/jaegeuk/f2fs/c/3bf1bab503a5
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [f2fs-dev] [PATCH v3] f2fs: zone: wait for inflight dio completion, excluding pinned files read using dio
@ 2025-07-24 20:30 ` patchwork-bot+f2fs
0 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+f2fs @ 2025-07-24 20:30 UTC (permalink / raw)
To: yohan.joung; +Cc: jaegeuk, chao, pilhyun.kim, linux-kernel, linux-f2fs-devel
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Tue, 22 Jul 2025 15:02:40 +0900 you wrote:
> read for the pinfile using Direct I/O do not wait for dio write.
>
> Signed-off-by: yohan.joung <yohan.joung@sk.com>
> ---
> fs/f2fs/file.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
Here is the summary with links:
- [f2fs-dev,v3] f2fs: zone: wait for inflight dio completion, excluding pinned files read using dio
https://git.kernel.org/jaegeuk/f2fs/c/3bf1bab503a5
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-07-24 20:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-22 6:02 [f2fs-dev] [PATCH v3] f2fs: zone: wait for inflight dio completion, excluding pinned files read using dio yohan.joung
2025-07-22 6:02 ` yohan.joung
2025-07-22 6:04 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2025-07-22 6:04 ` Chao Yu
2025-07-24 20:30 ` [f2fs-dev] " patchwork-bot+f2fs--- via Linux-f2fs-devel
2025-07-24 20:30 ` patchwork-bot+f2fs
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.