Thread (101 messages) 101 messages, 11 authors, 2022-11-11

Re: consolidate btrfs checksumming, repair and bio splitting

From: Johannes Thumshirn <hidden>
Date: 2022-09-02 15:34:46
Also in: linux-btrfs, linux-fsdevel

On 01.09.22 09:42, Christoph Hellwig wrote:
Hi all,

this series moves a large amount of duplicate code below btrfs_submit_bio
into what I call the 'storage' layer.  Instead of duplicating code to
checksum, check checksums and repair and split bios in all the caller
of btrfs_submit_bio (buffered I/O, direct I/O, compressed I/O, encoded
I/O), the work is done one in a central place, often more optiomal and
without slight changes in behavior.  Once that is done the upper layers
also don't need to split the bios for extent boundaries, as the storage
layer can do that itself, including splitting the bios for the zone
append limits for zoned I/O.

The split work is inspired by an earlier series from Qu, from which it
also reuses a few patches.

Note: this adds a fair amount of code to volumes.c, which already is
quite large.  It might make sense to add a prep patch to move
btrfs_submit_bio into a new bio.c file, but I only want to do that
if we have agreement on the move as the conflicts will be painful
when rebasing.
This series on top of misc-next passes my usual zoned null_blk fstests
setup without regressions.

Tested-by: Johannes Thumshirn <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help