btrfs: make subpage handling be feature full
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest8 patches 3 repliesIn review
- v28 patches 7 repliesSuperseded
- v17 patches 14 repliesSuperseded
Changes in v3 from the cover letter
- Drop the btrfs uncached write support
It turns out that we can not move the folio_end_writeback() call out of the spinlock for now.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | btrfs: disable uncached writes for nowfs/ | +11 | 1 reply | |
| 2/8 | btrfs: prevent inline data extents read from touching blocks beyond its rangefs/ | +8 | 0 replies | |
| 3/8 | btrfs: fix the qgroup data free range for inline data extentsfs/ | +1 | 0 replies | |
| 4/8 | btrfs: introduce a read path dedicated extent lock helperfs/ fs/ fs/ | +209 | 0 replies | |
| 5/8 | btrfs: make btrfs_do_readpage() to do block-by-block readfs/ | +12 | 0 replies | |
| 6/8 | btrfs: allow buffered write to avoid full page read if it's block alignedfs/ fs/ | +7 | 0 replies | |
| 7/8 | btrfs: allow inline data extents creation if block size < page sizefs/ | +0 | 0 replies | |
| 8/8 | btrfs: remove the subpage related warning messagefs/ | +0 | 0 replies |
Reviews trailers per patch
7 of 8 patches have a Reviewed-by or Acked-by.
| Patch | Filipe Manana |
|---|---|
| 1/8 | |
| 2/8 | R-b |
| 3/8 | R-b |
| 4/8 | R-b |
| 5/8 | R-b |
| 6/8 | R-b |
| 7/8 | R-b |
| 8/8 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/8] btrfs: make subpage handling be feature full
[CHANGLOG]
v3:
- Drop the btrfs uncached write support
It turns out that we can not move the folio_end_writeback() call out of the spinlock for now.
Two or more async extents can race on the same folio to call folio_end_writeback() if not protected by a spinlock, can be reproduced by generic/127 run loops with experimental 2k block size patchset.
Thus disabling uncached write is the smallest fix for now, and drop the previous calling-folio_end_writeback()-out-of-spinlock fix.
Not sure if a full revert is better or not, there is still some valid FGP flag related cleanup in that commit.
v2:
- Add a new bug fix which is exposed by recent 2K block size tests on x86_64
It's a self deadlock where the folio_end_writeback() is called with subpage lock hold, and folio_end_writeback() will eventually call btrfs_release_folio() and try to lock the same spin lock.
- Various grammar fixes and commit message/comments updates
- Address comments from Filipe and adds his tags
v1:
- Merge previous two patches into one
- Re-order the patches so preparation/fixes are always before feature enablement
- Update the commit message of the first patch
So that we do not focus on the out-of-tree part, but explain why it's not ideal in the first place (double page zeroing), and just mention the behavior change in the future.
Since the introduction of btrfs subapge support in v5.15, there are quite some limitations:
- No RAID56 support
Added in v5.19.
- No memory efficient scrub support
Added in v6.4.
- No block perfect compressed write support
Previously btrfs requires the dirty range to be fully page aligned, or it will skip compression completely.
Added in v6.13.
- Various subpage related error handling fixes
Added in v6.14.
- No support to create inline data extent
- No partial uptodate page support
This is a long existing optimization supported by EXT4/XFS and is required to pass generic/563 with subpage block size.
The last two are addressed in this patchset.
And since all features are implemented for subpage cases, the long existing experimental warning message can be dropped, as it is already causing a lot of concerns for users who checks the dmesg carefully.
Qu Wenruo (8):
btrfs: disable uncached writes for now
btrfs: prevent inline data extents read from touching blocks beyond
its range
btrfs: fix the qgroup data free range for inline data extents
btrfs: introduce a read path dedicated extent lock helper
btrfs: make btrfs_do_readpage() to do block-by-block read
btrfs: allow buffered write to avoid full page read if it's block
aligned
btrfs: allow inline data extents creation if block size < page size
btrfs: remove the subpage related warning message
fs/btrfs/disk-io.c | 5 - fs/btrfs/extent_io.c | 228 +++++++++++++++++++++++++++++++++++----- fs/btrfs/file.c | 18 +++- fs/btrfs/inode.c | 29 ++--- fs/btrfs/ordered-data.c | 23 +++- fs/btrfs/ordered-data.h | 8 +- 6 files changed, 248 insertions(+), 63 deletions(-)
Signature · 1 line
2.48.1