linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christian Brauner <brauner@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [GIT PULL 04/17 for v6.19] vfs writeback
Date: Fri, 28 Nov 2025 17:48:15 +0100	[thread overview]
Message-ID: <20251128-vfs-writeback-v619-24e0f5ebe21f@brauner> (raw)
In-Reply-To: <20251128-vfs-v619-77cd88166806@brauner>

Hey Linus,

/* Summary */
This contains writeback changes for this cycle:

Features

- Allow file systems to increase the minimum writeback chunk size. The
  relatively low minimal writeback size of 4MiB means that written back
  inodes on rotational media are switched a lot. Besides introducing
  additional seeks, this also can lead to extreme file fragmentation on
  zoned devices when a lot of files are cached relative to the available
  writeback bandwidth. This adds a superblock field that allows the file
  system to override the default size, and sets it to the zone size for
  zoned XFS.

- Add logging for slow writeback when it exceeds sysctl_hung_task_timeout_secs.
  This helps identify tasks waiting for a long time and pinpoint potential
  issues. Recording the starting jiffies is also useful when debugging a
  crashed vmcore.

- Wake up waiting tasks when finishing the writeback of a chunk.

Cleanups

- filemap_* writeback interface cleanups. Adding filemap_fdatawrite_wbc
  ended up being a mistake, as all but the original btrfs caller should
  be using better high level interfaces instead. This series removes all
  these low-level interfaces, switches btrfs to a more specific interface,
  and cleans up other too low-level interfaces. With this the
  writeback_control that is passed to the writeback code is only
  initialized in three places.

- Remove __filemap_fdatawrite, __filemap_fdatawrite_range, and
  filemap_fdatawrite_wbc

- Add filemap_flush_nr helper for btrfs

- Push struct writeback_control into start_delalloc_inodes in btrfs

- Rename filemap_fdatawrite_range_kick to filemap_flush_range

- Stop opencoding filemap_fdatawrite_range in 9p, ocfs2, and mm

- Make wbc_to_tag() inline and use it in fs.

/* Testing */

gcc (Debian 14.2.0-19) 14.2.0
Debian clang version 19.1.7 (3+b1)

No build failures or warnings were observed.

/* Conflicts */

Merge conflicts with mainline
=============================

diff --cc include/linux/writeback.h
index 102071ffedcb,2a81816f7507..000000000000
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@@ -189,6 -189,20 +189,13 @@@ void wakeup_flusher_threads_bdi(struct
  void inode_wait_for_writeback(struct inode *inode);
  void inode_io_list_del(struct inode *inode);

 -/* writeback.h requires fs.h; it, too, is not included from here. */
 -static inline void wait_on_inode(struct inode *inode)
 -{
 -      wait_var_event(inode_state_wait_address(inode, __I_NEW),
 -                     !(READ_ONCE(inode->i_state) & I_NEW));
 -}
 -
+ static inline xa_mark_t wbc_to_tag(struct writeback_control *wbc)
+ {
+       if (wbc->sync_mode == WB_SYNC_ALL || wbc->tagged_writepages)
+               return PAGECACHE_TAG_TOWRITE;
+       return PAGECACHE_TAG_DIRTY;
+ }
+
  #ifdef CONFIG_CGROUP_WRITEBACK

  #include <linux/cgroup.h>

Merge conflicts with other trees
================================

The following changes since commit 3a8660878839faadb4f1a6dd72c3179c1df56787:

  Linux 6.18-rc1 (2025-10-12 13:42:36 -0700)

are available in the Git repository at:

  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.19-rc1.writeback

for you to fetch changes up to 4952f35f0545f3b53dab8d5fd727c4827c2a2778:

  fs: Make wbc_to_tag() inline and use it in fs. (2025-10-29 23:33:48 +0100)

Please consider pulling these changes from the signed vfs-6.19-rc1.writeback tag.

Thanks!
Christian

----------------------------------------------------------------
vfs-6.19-rc1.writeback

----------------------------------------------------------------
Christian Brauner (2):
      Merge patch series "filemap_* writeback interface cleanups v2"
      Merge patch series "allow file systems to increase the minimum writeback chunk size v2"

Christoph Hellwig (13):
      mm: don't opencode filemap_fdatawrite_range in filemap_invalidate_inode
      9p: don't opencode filemap_fdatawrite_range in v9fs_mmap_vm_close
      ocfs2: don't opencode filemap_fdatawrite_range in ocfs2_journal_submit_inode_data_buffers
      btrfs: use the local tmp_inode variable in start_delalloc_inodes
      btrfs: push struct writeback_control into start_delalloc_inodes
      mm,btrfs: add a filemap_flush_nr helper
      mm: remove __filemap_fdatawrite
      mm: remove filemap_fdatawrite_wbc
      mm: remove __filemap_fdatawrite_range
      mm: rename filemap_fdatawrite_range_kick to filemap_flush_range
      writeback: cleanup writeback_chunk_size
      writeback: allow the file system to override MIN_WRITEBACK_PAGES
      xfs: set s_min_writeback_pages for zoned file systems

Julian Sun (3):
      writeback: Wake up waiting tasks when finishing the writeback of a chunk.
      writeback: Add logging for slow writeback (exceeds sysctl_hung_task_timeout_secs)
      fs: Make wbc_to_tag() inline and use it in fs.

 fs/9p/vfs_file.c                 |  17 ++----
 fs/btrfs/extent_io.c             |   5 +-
 fs/btrfs/inode.c                 |  46 +++++------------
 fs/ceph/addr.c                   |   6 +--
 fs/ext4/inode.c                  |   5 +-
 fs/f2fs/data.c                   |   5 +-
 fs/fs-writeback.c                |  55 ++++++++++++--------
 fs/gfs2/aops.c                   |   5 +-
 fs/ocfs2/journal.c               |  11 +---
 fs/super.c                       |   1 +
 fs/sync.c                        |  10 ++--
 fs/xfs/xfs_zone_alloc.c          |  28 +++++++++-
 include/linux/backing-dev-defs.h |   2 +
 include/linux/fs.h               |   7 +--
 include/linux/pagemap.h          |   5 +-
 include/linux/writeback.h        |  12 +++++
 mm/fadvise.c                     |   3 +-
 mm/filemap.c                     | 109 ++++++++++++++++-----------------------
 mm/page-writeback.c              |   6 ---
 19 files changed, 154 insertions(+), 184 deletions(-)

  parent reply	other threads:[~2025-11-28 16:51 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-28 16:48 [GIT PULL 00/17 for v6.19] v6.19 Christian Brauner
2025-11-28 16:48 ` [GIT PULL 01/17 for v6.19] vfs iomap Christian Brauner
2025-12-01 22:08   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 02/17 for v6.19] vfs misc Christian Brauner
2025-12-01 22:08   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 03/17 for v6.19] vfs inode Christian Brauner
2025-12-01 22:08   ` pr-tracker-bot
2025-11-28 16:48 ` Christian Brauner [this message]
2025-12-01 22:08   ` [GIT PULL 04/17 for v6.19] vfs writeback pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 05/17 for v6.19] namespaces Christian Brauner
2025-12-01 19:06   ` Eric W. Biederman
2025-12-02 17:00     ` Linus Torvalds
2025-12-03 10:07       ` Christian Brauner
2025-12-01 22:08   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 06/17 for v6.19] vfs coredump Christian Brauner
2025-12-01 22:08   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 07/17 for v6.19] vfs folio Christian Brauner
2025-12-01 22:08   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 08/17 for v6.19] cred guards Christian Brauner
2025-12-01 21:53   ` Linus Torvalds
2025-12-02  1:26     ` Sasha Levin
2025-12-02  1:36       ` [PATCH] nfs/localio: make do_nfs_local_call_write() return void Sasha Levin
2025-12-01 22:08   ` [GIT PULL 08/17 for v6.19] cred guards pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 09/17 for v6.19] vfs headers Christian Brauner
2025-12-01 23:22   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 10/17 for v6.19] vfs super guards Christian Brauner
2025-12-01 23:22   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 11/17 for v6.19] minix Christian Brauner
2025-12-01 23:22   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 12/17 for v6.19] vfs directory delegations Christian Brauner
2025-12-02  3:19   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 13/17 for v6.19] vfs directory locking Christian Brauner
2025-12-02  3:19   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 14/17 for v6.19] overlayfs cred guards Christian Brauner
2025-12-02  3:19   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 15/17 for v6.19] autofs Christian Brauner
2025-12-02  3:19   ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 16/17 for v6.19] vfs fd prepare Christian Brauner
2025-12-01 14:15   ` Al Viro
2025-12-01 18:41     ` Sean Christopherson
2025-11-28 16:48 ` [GIT PULL 17/17 for v6.19] vfs fd prepare minimal Christian Brauner
2025-12-02  1:35   ` Linus Torvalds
2025-12-02  9:42     ` Christian Brauner
2025-12-02  3:19   ` pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251128-vfs-writeback-v619-24e0f5ebe21f@brauner \
    --to=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).