Skip to content

btrfs: do not poking into the implementation details of bio_vec

Qu Wenruo fstests linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest8 patches 4 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8btrfs: remove the alignment checks in end_bbio_data_readfs/btrfs/extent_io.c+3 -240 replies
2/8btrfs: track the next file offset in struct btrfs_bio_ctrlfs/btrfs/extent_io.c+13 -200 replies
3/8btrfs: pass a physical address to btrfs_repair_io_failurefs/btrfs/bio.c fs/btrfs/bio.h fs/btrfs/disk-io.c+9 -100 replies
4/8btrfs: move kmapping out of btrfs_check_sector_csumfs/btrfs/btrfs_inode.h fs/btrfs/inode.c fs/btrfs/raid56.c +1 more+27 -210 replies
5/8btrfs: simplify bvec iteration in index_one_biofs/btrfs/raid56.c+10 -120 replies
6/8btrfs: raid56: store a physical address in structure sector_ptrfs/btrfs/raid56.c+86 -723 replies
7/8btrfs: scrub: use virtual addresses directlyfs/btrfs/scrub.c+38 -560 replies
8/8btrfs: use bvec_kmap_local in btrfs_decompress_buf2pagefs/btrfs/compression.c+6 -30 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchQu WenruoChristoph HellwigJosef Bacik
SeriesR-b
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-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.

Read the v2 thread

Cover letter [PATCH v2 0/8] btrfs: do not poking into the implementation details of bio_vec

- Fix a crash caused by incorrectly index sector_ptrs
The 5th patch, caused by missing increasement of the @offset variable.

- Use physical addresses instead of virtual addresses to handle HIGHMEM The 6th patch, as we can still get sector_ptr from bio_sectors[] which is using pages from the bio, and that can be highmem.

However I can not do a proper test on this, as the latest kernel has already rejected HIGHMEM64G option, thus even if my VM has extra 3GB for HIGHMEM (total 6GB), I'm not sure if the kernel can really utilize those high memories.

Furthermore there seems to be other bugs in mm layer related to HIGHMEM + PAGE, resulting zswap crash when try compressing a page to be swapped out.
But at least several scrub/balance related test cases passed on x86 32bit with HIGHMEM and PAGE.

I have tested with x86_64 (64 bit, no HIGHMEM), aarch64 (64bit, 64K page size, no HIGHMEM) with no regression.

- Fix a incorrect __bio_add_page() usage in scrub_bio_add_sector() The 6th patch, as bio_add_page() do extra bvec merging before allocating a new bvec, but __bio_add_page() does not.

This triggers WARN_ON_ONCE() in __bio_add_page() checking if the bio is full.

Fixing it by do the old bio_add_page() and ASSERT(), with extra comment on we can not use __bio_add_page().

- Various minor commit message update
And full proper test runs.

Christoph Hellwig (8):
btrfs: remove the alignment checks in end_bbio_data_read
btrfs: track the next file offset in struct btrfs_bio_ctrl
btrfs: pass a physical address to btrfs_repair_io_failure
btrfs: move kmapping out of btrfs_check_sector_csum
btrfs: simplify bvec iteration in index_one_bio
btrfs: raid56: store a physical address in structure sector_ptr
btrfs: scrub: use virtual addresses directly
btrfs: use bvec_kmap_local in btrfs_decompress_buf2page

 fs/btrfs/bio.c         |   9 +-
 fs/btrfs/bio.h         |   3 +-
 fs/btrfs/btrfs_inode.h |   4 +-
 fs/btrfs/compression.c |   9 +-
 fs/btrfs/disk-io.c     |   7 +-
 fs/btrfs/extent_io.c   |  60 ++++---------
 fs/btrfs/inode.c       |  20 ++---
 fs/btrfs/raid56.c      | 189 ++++++++++++++++++++++-------------------
 fs/btrfs/scrub.c       |  93 +++++++++-----------
 9 files changed, 184 insertions(+), 210 deletions(-)
Signature · 1 line
2.49.0