diff options
author | Daeho Jeong <daehojeong@google.com> | 2024-04-11 11:37:53 -0700 |
---|---|---|
committer | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2024-04-26 23:07:15 +0000 |
commit | e1c0fd4e4964db2eb14c56a62e1a9cdb9d67445e (patch) | |
tree | 94784903a36bea5bf0263fa55a6af413de401be8 | |
parent | 14ff9c766a0c48ad4a5940fae3da038d385ef4aa (diff) | |
download | common-android15-6.6.tar.gz |
FROMGIT: f2fs: allow direct io of pinned files for zoned storageandroid15-6.6
Since the allocation happens in conventional LU for zoned storage, we
can allow direct io for that.
Change-Id: I9901a12936a6ae54103b57c99d5e829ce2f33b37
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit b2cf5a1ff236fcd0eb9dcbb188df30b50bb1af0f
https: //git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev)
-rw-r--r-- | fs/f2fs/file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 0586b660a106..310a184a8177 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; |