allow file systems to increase the minimum writeback chunk size v2

Christoph Hellwig
2025-10-17T03:46:22Z

Hi all,

The relatively low minimal writeback size of 4MiB leads 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.

Add a superblock field that allows the file system to override the
default size, and set it to the zone size for zoned XFS.

Changes since v1:
- covert the field to a long to match other related writeback code
- cap the zone XFS writeback size to the maximum extent size
- write an extensive comment about the tradeoffs of setting the value
- fix a commit message typo

Diffstat:
fs/fs-writeback.c | 26 +++++++++-----------------
fs/super.c | 1 +
fs/xfs/xfs_zone_alloc.c | 28 ++++++++++++++++++++++++++--
include/linux/fs.h | 1 +
include/linux/writeback.h | 5 +++++
5 files changed, 42 insertions(+), 19 deletions(-)