diff mbox series

[f2fs-dev,2/2] f2fs: allow direct io of pinned files for zoned storage

Message ID 20240411183753.2417792-1-daeho43@gmail.com (mailing list archive)
State Accepted
Commit b2cf5a1ff236fcd0eb9dcbb188df30b50bb1af0f
Headers show
Series None | expand

Commit Message

Daeho Jeong April 11, 2024, 6:37 p.m. UTC
From: Daeho Jeong <daehojeong@google.com>

Since the allocation happens in conventional LU for zoned storage, we
can allow direct io for that.

Signed-off-by: Daeho Jeong <daehojeong@google.com>
---
 fs/f2fs/file.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Chao Yu April 13, 2024, 9:52 a.m. UTC | #1
On 2024/4/12 2:37, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
> 
> Since the allocation happens in conventional LU for zoned storage, we
> can allow direct io for that.
> 
> Signed-off-by: Daeho Jeong <daehojeong@google.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,
patchwork-bot+f2fs@kernel.org April 14, 2024, 3:32 p.m. UTC | #2
Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

On Thu, 11 Apr 2024 11:37:53 -0700 you wrote:
> From: Daeho Jeong <daehojeong@google.com>
> 
> Since the allocation happens in conventional LU for zoned storage, we
> can allow direct io for that.
> 
> Signed-off-by: Daeho Jeong <daehojeong@google.com>
> 
> [...]

Here is the summary with links:
  - [f2fs-dev,2/2] f2fs: allow direct io of pinned files for zoned storage
    https://git.kernel.org/jaegeuk/f2fs/c/b2cf5a1ff236

You are awesome, thank you!
diff mbox series

Patch

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 3ee61bc82c6f..c8e086077a48 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -833,7 +833,8 @@  static bool f2fs_force_buffered_io(struct inode *inode, int rw)
 	 * for blkzoned device, fallback direct IO to buffered IO, so
 	 * all IOs can be serialized by log-structured write.
 	 */
-	if (f2fs_sb_has_blkzoned(sbi) && (rw == WRITE))
+	if (f2fs_sb_has_blkzoned(sbi) && (rw == WRITE) &&
+	    !f2fs_is_pinned_file(inode))
 		return true;
 	if (is_sbi_flag_set(sbi, SBI_CP_DISABLED))
 		return true;