diff options
author | Christian Brauner <brauner@kernel.org> | 2025-07-16 14:48:24 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-07-16 14:48:24 +0200 |
commit | 981569a06f704ac9c4eed249f47426e1be1a5636 (patch) | |
tree | 0ec8d85041debe49759630d4124c2dd3c164dcab /mm/filemap.c | |
parent | f2e467a48287c868818085aa35389a224d226732 (diff) | |
parent | ae21c0c0ac56aa734327e9c8b7dfef4270ab54d4 (diff) |
Merge patch series "fs: refactor write_begin/write_end and add ext4 IOCB_DONTCACHE support"
陈涛涛 Taotao Chen <chentaotao@didiglobal.com> says:
This patch series refactors the address_space_operations write_begin()
and write_end() callbacks to take const struct kiocb * as their first
argument, allowing IOCB flags such as IOCB_DONTCACHE to propagate to the
filesystem's buffered I/O path.
Ext4 is updated to implement handling of the IOCB_DONTCACHE flag and
advertises support via the FOP_DONTCACHE file operation flag.
Additionally, the i915 driver's shmem write paths are updated to bypass
the legacy write_begin/write_end interface in favor of directly
calling write_iter() with a constructed synchronous kiocb. Another i915
change replaces a manual write loop with kernel_write() during GEM shmem
object creation.
Tested with ext4 and i915 GEM workloads.
* patches from https://lore.kernel.org/20250716093559.217344-1-chentaotao@didiglobal.com:
ext4: support uncached buffered I/O
mm/pagemap: add write_begin_get_folio() helper function
fs: change write_begin/write_end interface to take struct kiocb *
drm/i915: Refactor shmem_pwrite() to use kiocb and write_iter
drm/i915: Use kernel_write() in shmem object create
Link: https://lore.kernel.org/20250716093559.217344-1-chentaotao@didiglobal.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index bada249b9fb7..ba089d75fc86 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -4109,7 +4109,7 @@ retry: break; } - status = a_ops->write_begin(file, mapping, pos, bytes, + status = a_ops->write_begin(iocb, mapping, pos, bytes, &folio, &fsdata); if (unlikely(status < 0)) break; @@ -4130,7 +4130,7 @@ retry: copied = copy_folio_from_iter_atomic(folio, offset, bytes, i); flush_dcache_folio(folio); - status = a_ops->write_end(file, mapping, pos, bytes, copied, + status = a_ops->write_end(iocb, mapping, pos, bytes, copied, folio, fsdata); if (unlikely(status != copied)) { iov_iter_revert(i, copied - max(status, 0L)); |