linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs: small cleanups to buffered write path
@ 2024-09-30  1:50 Qu Wenruo
  2024-09-30  1:50 ` [PATCH 1/2] btrfs: remove the dirty_page local variable Qu Wenruo
  2024-09-30  1:50 ` [PATCH 2/2] btrfs: simplify the page uptodate preparation for prepare_pages() Qu Wenruo
  0 siblings, 2 replies; 7+ messages in thread
From: Qu Wenruo @ 2024-09-30  1:50 UTC (permalink / raw)
  To: linux-btrfs

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(-)

-- 
2.46.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-10-01 21:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30  1:50 [PATCH 0/2] btrfs: small cleanups to buffered write path Qu Wenruo
2024-09-30  1:50 ` [PATCH 1/2] btrfs: remove the dirty_page local variable Qu Wenruo
2024-09-30 18:01   ` Josef Bacik
2024-09-30  1:50 ` [PATCH 2/2] btrfs: simplify the page uptodate preparation for prepare_pages() Qu Wenruo
2024-09-30 18:04   ` Josef Bacik
2024-10-01 15:20   ` David Sterba
2024-10-01 21:09     ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).