aboutsummaryrefslogtreecommitdiffstats
path: root/include/libzutil.h
diff options
context:
space:
mode:
authorRob N <[email protected]>2024-04-20 09:41:31 +1000
committerGitHub <[email protected]>2024-04-19 16:41:31 -0700
commitf4f156157de3f61e55db0429b10c63d02226e115 (patch)
tree7953263d50dd6c349b95d335cf37410f6fd27aa2 /include/libzutil.h
parent9f83eec03904b18e052fbe2c66542bd47254cf57 (diff)
abd_iter_page: rework to handle multipage scatterlists
Previously, abd_iter_page() would assume that every scatterlist would contain a single page (compound or no), because that's all we ever create in abd_alloc_chunks(). However, scatterlists can contain multiple pages of arbitrary provenance, and if we get one of those, we'd get all the math wrong. This reworks things to handle multiple pages in a scatterlist, by properly finding the right page within it for the given offset, and understanding better where the end of the page is and not crossing it. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reported-by: Brian Atkinson <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Brian Atkinson <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #16108
Diffstat (limited to 'include/libzutil.h')
0 files changed, 0 insertions, 0 deletions