Skip to content

btrfs: small cleanups to buffered write path

Qu Wenruo linux-btrfs 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 1 replyIn review
  2. v22 patches 3 repliesSuperseded
  3. v12 patches 4 repliesSuperseded

Changes in v3 from the cover letter

- Remove the read: tag of the second patch
By merging the alignment and force_uptodate checks into one check.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: remove the dirty_page local variablefs/btrfs/file.c fs/btrfs/file.h fs/btrfs/free-space-cache.c+9 -140 replies
2/2btrfs: simplify the page uptodate preparation for prepare_pages()fs/btrfs/file.c+34 -310 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJosef BacikJohannes Thumshirn
SeriesR-b
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] btrfs: small cleanups to buffered write path

[CHANGELOG]
v3:
- Remove the read: tag of the second patch
By merging the alignment and force_uptodate checks into one check.

v2:
- Utilize folio APIs instead of the old page APIs for the 2nd patch

These two are small cleanups to the buffered write path, inspired by the btrfs test 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             | 84 ++++++++++++++++++-------------------
 fs/btrfs/file.h             |  2 +-
 fs/btrfs/free-space-cache.c |  2 +-
 3 files changed, 43 insertions(+), 45 deletions(-)
Signature · 1 line
2.46.2