Hi,
Recently I'm trying to add bs > ps support for btrfs.
One thing I noticed is the bvec_* helpers, like
bvec_kmap_local()/memzero_bvec()/... are all for single page bio_vecs,
meaning bv_len and bv_offset must be inside a page.
This means those helpers will not be able to handle a large folio in one go.
On the other hand we also need to support HIGHMEM, which means we must
call kmap/kunmap helpers for each page.
I'm wondering will it be possible to handle multi-page bvecs in fs block
size incremental, without falling back to handle sub-blocks using sp bvecs.
(Of course, all the folios queued into bios will have proper minimal
order to cover at least one fs block)
Bcachefs is doing the separate handling for HIGHMEM (kmap + kunmap, sp
bvecs) and regular mp bves in one go for its checksum handling.
Btrfs for now is mixing sp bvecs (checksum verification in block size
unit), mp bvec (mostly to calculate bio size, so harmless) and folio
iter for filemap.
Can we have a proper mp bvec handlers? Or is there a way to exclude
HIGHMEM folios from filemaps completely so that we can just forget
HIGHMEM for fses?
Thanks,
Qu