aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/file.c
diff options
context:
space:
mode:
authorTaotao Chen <[email protected]>2025-07-16 09:36:09 +0000
committerChristian Brauner <[email protected]>2025-07-16 12:48:18 +0000
commitae21c0c0ac56aa734327e9c8b7dfef4270ab54d4 (patch)
tree0ec8d85041debe49759630d4124c2dd3c164dcab /fs/ext4/file.c
parentmm/pagemap: add write_begin_get_folio() helper function (diff)
downloadkernel-ae21c0c0ac56aa734327e9c8b7dfef4270ab54d4.tar.gz
kernel-ae21c0c0ac56aa734327e9c8b7dfef4270ab54d4.zip
ext4: support uncached buffered I/O
Set FOP_DONTCACHE in ext4_file_operations to declare support for uncached buffered I/O. To handle this flag, update ext4_write_begin() and ext4_da_write_begin() to use write_begin_get_folio(), which encapsulates FGP_DONTCACHE logic based on iocb->ki_flags. Part of a series refactoring address_space_operations write_begin and write_end callbacks to use struct kiocb for passing write context and flags. Signed-off-by: Taotao Chen <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'fs/ext4/file.c')
-rw-r--r--fs/ext4/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 21df81347147..274b41a476c8 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -977,7 +977,8 @@ const struct file_operations ext4_file_operations = {
.splice_write = iter_file_splice_write,
.fallocate = ext4_fallocate,
.fop_flags = FOP_MMAP_SYNC | FOP_BUFFER_RASYNC |
- FOP_DIO_PARALLEL_WRITE,
+ FOP_DIO_PARALLEL_WRITE |
+ FOP_DONTCACHE,
};
const struct inode_operations ext4_file_inode_operations = {