lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250627110257.1870826-1-chentaotao@didiglobal.com>
Date: Fri, 27 Jun 2025 11:02:59 +0000
From: 陈涛涛 Taotao Chen <chentaotao@...iglobal.com>
To: "tytso@....edu" <tytso@....edu>, "hch@...radead.org" <hch@...radead.org>,
	"adilger.kernel@...ger.ca" <adilger.kernel@...ger.ca>, "willy@...radead.org"
	<willy@...radead.org>, "brauner@...nel.org" <brauner@...nel.org>,
	"jani.nikula@...ux.intel.com" <jani.nikula@...ux.intel.com>,
	"rodrigo.vivi@...el.com" <rodrigo.vivi@...el.com>, "tursulin@...ulin.net"
	<tursulin@...ulin.net>, "airlied@...il.com" <airlied@...il.com>
CC: "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>,
	"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
	"intel-gfx@...ts.freedesktop.org" <intel-gfx@...ts.freedesktop.org>,
	"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>, "linux-doc@...r.kernel.org"
	<linux-doc@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "chentao325@...com" <chentao325@...com>,
	"frank.li@...o.com" <frank.li@...o.com>,
	陈涛涛 Taotao Chen <chentaotao@...iglobal.com>
Subject: [PATCH v3 0/4] fs: refactor write_begin/write_end and add ext4
 IOCB_DONTCACHE support

From: Taotao Chen <chentaotao@...iglobal.com>

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.

This patch series is based on the vfs-6.17.misc branch.

Changes since v2:
- Changed all write_begin/write_end function signatures to take
  const struct kiocb * instead of struct kiocb *.
- Merged the two ext4 patches into one for clarity.
- Updated return type from int to ssize_t for kernel_write.
- Minor formatting and comment improvements.


Thanks to Matthew Wilcox for early feedback, and to all reviewers for
detailed comments.

Taotao Chen (4):
  drm/i915: Use kernel_write() in shmem object create
  drm/i915: Refactor shmem_pwrite() to use kiocb and write_iter
  fs: change write_begin/write_end interface to take struct kiocb *
  ext4: support uncached buffered I/O

 Documentation/filesystems/locking.rst     |   4 +-
 Documentation/filesystems/vfs.rst         |   6 +-
 block/fops.c                              |  13 ++-
 drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 114 ++++++----------------
 fs/adfs/inode.c                           |   9 +-
 fs/affs/file.c                            |  26 ++---
 fs/bcachefs/fs-io-buffered.c              |   4 +-
 fs/bcachefs/fs-io-buffered.h              |   4 +-
 fs/bfs/file.c                             |   7 +-
 fs/buffer.c                               |  26 ++---
 fs/ceph/addr.c                            |  10 +-
 fs/ecryptfs/mmap.c                        |  10 +-
 fs/exfat/file.c                           |  15 ++-
 fs/exfat/inode.c                          |  16 +--
 fs/ext2/inode.c                           |  11 ++-
 fs/ext4/file.c                            |   3 +-
 fs/ext4/inode.c                           |  25 +++--
 fs/f2fs/data.c                            |   8 +-
 fs/fat/inode.c                            |  18 ++--
 fs/fuse/file.c                            |  14 ++-
 fs/hfs/hfs_fs.h                           |   2 +-
 fs/hfs/inode.c                            |   4 +-
 fs/hfsplus/hfsplus_fs.h                   |   6 +-
 fs/hfsplus/inode.c                        |   8 +-
 fs/hostfs/hostfs_kern.c                   |   8 +-
 fs/hpfs/file.c                            |  18 ++--
 fs/hugetlbfs/inode.c                      |   9 +-
 fs/jffs2/file.c                           |  28 +++---
 fs/jfs/inode.c                            |  16 +--
 fs/libfs.c                                |  11 ++-
 fs/minix/inode.c                          |   7 +-
 fs/nfs/file.c                             |   8 +-
 fs/nilfs2/inode.c                         |   8 +-
 fs/ntfs3/file.c                           |   7 +-
 fs/ntfs3/inode.c                          |   7 +-
 fs/ntfs3/ntfs_fs.h                        |  10 +-
 fs/ocfs2/aops.c                           |   6 +-
 fs/omfs/file.c                            |   7 +-
 fs/orangefs/inode.c                       |  16 +--
 fs/ubifs/file.c                           |   5 +-
 fs/udf/inode.c                            |  11 ++-
 fs/ufs/inode.c                            |  16 +--
 fs/vboxsf/file.c                          |   5 +-
 include/linux/buffer_head.h               |   4 +-
 include/linux/fs.h                        |  11 ++-
 mm/filemap.c                              |   4 +-
 mm/shmem.c                                |  12 +--
 47 files changed, 310 insertions(+), 287 deletions(-)

-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ