mbox series

[0/2] btrfs: small cleanups to buffered write path

Message ID cover.1727660754.git.wqu@suse.com (mailing list archive)
Headers show
Series btrfs: small cleanups to buffered write path | expand

Message

Qu Wenruo Sept. 30, 2024, 1:50 a.m. UTC
These two are small cleanups to the buffered write path, inspired by the
test btrfs failure of generic/563 with 4K sector size and 64K page size.

The root cause of that failure is, btrfs can't avoid full page read when
the dirty range covers sectors, but not yet the full page.

This is only the preparation part, we can not yet switch to the skip the
full page read, or it will still lead to incorrect data.

The full fix needs extra co-operation between the subpage read and
write, until then prepare_uptodate_page() still needs to read the full
page.

Qu Wenruo (2):
  btrfs: remove the dirty_page local variable
  btrfs: simplify the page uptodate preparation for prepare_pages()

 fs/btrfs/file.c             | 87 +++++++++++++++++++------------------
 fs/btrfs/file.h             |  2 +-
 fs/btrfs/free-space-cache.c |  2 +-
 3 files changed, 46 insertions(+), 45 deletions(-)