[PATCH v2 5/5] ext4: declare support for FOP_DONTCACHE

陈涛涛 Taotao Chen chentaotao at didiglobal.com
Tue Jun 24 12:12:10 UTC 2025


From: Taotao Chen <chentaotao at didiglobal.com>

Set the FOP_DONTCACHE flag in ext4_file_operations to indicate that
ext4 supports IOCB_DONTCACHE handling in buffered write paths.

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 <chentaotao at didiglobal.com>
---
 fs/ext4/file.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 = {
-- 
2.34.1


More information about the Intel-gfx mailing list