btrfs: two small and safe fixes for large folios
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 4 repliesIn review
- v12 patches 2 repliesSuperseded
Changes in v2 from the cover letter
- Fix a bug that page_pgoff() usage lacks left page shift
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs: fix the ASSERT() inside GET_SUBPAGE_BITMAP()fs/ | +1 | 1 reply | |
| 2/2 | btrfs: fix the file offset calculation inside btrfs_decompress_buf2page()fs/ | +17 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Filipe Manana | Boris Burkov | Sweet Tea Dorminy |
|---|---|---|---|
| Series | R-b | R-b | |
| 1/2 | R-b | ||
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v2 0/2] btrfs: two small and safe fixes for large folios
[CHANGELOG]
v2:
- Fix a bug that page_pgoff() usage lacks left page shift
Two small and simple fixes.
The first one is that with large folios, we can have order 6 folios which reached our current BITS_PER_LONG limit, triggering a previously impossible ASSERT(), which is based on the fact that our largest page size (64K) can not reach BITS_PER_LONG blocks per page.
An easily fix by extending the ASSERT() condition to cover blocks_per_folio == BITS_PER_LONG cases.
The second one is a little more complex, that with large folios, if we still go through the single page bio vec iteration, we can not call page_offset(), as non-head pages of a large folio do not have their page::index initialized properly.
Fix that by going a helper using page_pgoff() to calculate the file offset, which handles both head and non-head pages of a large folio.
Qu Wenruo (2):
btrfs: fix the ASSERT() inside GET_SUBPAGE_BITMAP()
btrfs: fix the file offset calculation inside
btrfs_decompress_buf2page()
fs/btrfs/compression.c | 18 +++++++++++++++++- fs/btrfs/subpage.c | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-)
Signature · 1 line
2.49.0