diff options
| author | Christoph Hellwig <[email protected]> | 2025-01-13 14:12:13 +0000 |
|---|---|---|
| committer | Carlos Maiolino <[email protected]> | 2025-01-14 10:38:15 +0000 |
| commit | fac69ec8cd743f509129deb5feae9e3f9ebc2cc8 (patch) | |
| tree | ec4d37727a6e88715b95bca502f1745b1d0db353 /fs/xfs/xfs_exchrange.c | |
| parent | xfs: move in-memory buftarg handling out of _xfs_buf_ioapply (diff) | |
| download | kernel-fac69ec8cd743f509129deb5feae9e3f9ebc2cc8.tar.gz kernel-fac69ec8cd743f509129deb5feae9e3f9ebc2cc8.zip | |
xfs: simplify buffer I/O submission
The code in _xfs_buf_ioapply is unnecessarily complicated because it
doesn't take advantage of modern bio features.
Simplify it by making use of bio splitting and chaining, that is build
a single bio for the pages in the buffer using a simple loop, and then
split that bio on the map boundaries for discontiguous multi-FSB buffers
and chain the split bios to the main one so that there is only a single
I/O completion.
This not only simplifies the code to build the buffer, but also removes
the need for the b_io_remaining field as buffer ownership is granted
to the bio on submit of the final bio with no chance for a completion
before that as well as the b_io_error field that is now superfluous
because there always is exactly one completion.
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Acked-by: Dave Chinner <[email protected]>
Signed-off-by: Carlos Maiolino <[email protected]>
Diffstat (limited to 'fs/xfs/xfs_exchrange.c')
0 files changed, 0 insertions, 0 deletions
