diff options
| author | Christoph Hellwig <hch@lst.de> | 2025-10-17 05:45:48 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-10-29 15:54:31 +0100 |
| commit | 90db4d4441f58d433ecf74f7e3bd17e0a553c20c (patch) | |
| tree | 8e436c715c54452cb72e8daee40fdef8887ad46a /include/linux/writeback.h | |
| parent | 151d0922bf638a4e4235758d04b31f48bfcbb798 (diff) | |
writeback: allow the file system to override MIN_WRITEBACK_PAGES
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.
Add a superblock field that allows the file system to override the
default size.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20251017034611.651385-3-hch@lst.de
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux/writeback.h')
| -rw-r--r-- | include/linux/writeback.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 22dd4adc5667..49e1dd96f43e 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -374,4 +374,9 @@ bool redirty_page_for_writepage(struct writeback_control *, struct page *); void sb_mark_inode_writeback(struct inode *inode); void sb_clear_inode_writeback(struct inode *inode); +/* + * 4MB minimal write chunk size + */ +#define MIN_WRITEBACK_PAGES (4096UL >> (PAGE_SHIFT - 10)) + #endif /* WRITEBACK_H */ |
