bcachefs: Fix page state when reading into !PageUptodate pages
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 23 Nov 2021 23:17:04 +0000 (18:17 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:17 +0000 (17:09 -0400)
commite6ec361f95fcbaffab65221cd4a56e0e10fdafc2
treed8ba8ba5ae45dd1e39385e2794e837568d3e4ea8
parent7279c1a24c3dd523b5824aaf24cee9e2a55c76f0
bcachefs: Fix page state when reading into !PageUptodate pages

This patch adds code to read page state before writing to pages that
aren't uptodate, which corrects i_sectors being tempororarily too large
and means we may not need to get a disk reservation.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
# Conflicts:
# fs/bcachefs/fs-io.c
fs/bcachefs/fs-io.c