bcachefs: mkwrite() now only dirties one page
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 15 May 2025 01:32:40 +0000 (21:32 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 19 May 2025 12:28:41 +0000 (08:28 -0400)
commitcbed8287e5789558cf947a7b4d47fdf3e25c29bf
tree8bea593146de8fd79ba66a690665aebcd3f9b15a
parent494d458cfa70d8c107de5a6b6fc941f31c886b12
bcachefs: mkwrite() now only dirties one page

Don't dirty the whole folio - fixes write amplification with
applications doing mmaped writes.

https://www.reddit.com/r/bcachefs/comments/1klzcg1/incredible_amounts_of_write_amplification_when/

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs-io-pagecache.c