diff options
author | Rob Norris <[email protected]> | 2023-12-11 16:05:54 +1100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2024-03-25 16:50:35 -0700 |
commit | 390b448726c580999dd337be7a40b0e95cf1d50b (patch) | |
tree | 54547ea19f3e5d742aec9c5da9450a0aa2db6bc6 /module/os/freebsd/zfs/abd_os.c | |
parent | df04efe321a49c650f1fbaa6fd701fa2928cbe21 (diff) |
abd: add page iterator
The regular ABD iterators yield data buffers, so they have to map and
unmap pages into kernel memory. If the caller only wants to count
chunks, or can use page pointers directly, then the map/unmap is just
unnecessary overhead.
This adds adb_iterate_page_func, which yields unmapped struct page
instead.
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Closes #15533
Closes #15588
Diffstat (limited to 'module/os/freebsd/zfs/abd_os.c')
-rw-r--r-- | module/os/freebsd/zfs/abd_os.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/module/os/freebsd/zfs/abd_os.c b/module/os/freebsd/zfs/abd_os.c index 58a37df62..3b812271f 100644 --- a/module/os/freebsd/zfs/abd_os.c +++ b/module/os/freebsd/zfs/abd_os.c @@ -417,10 +417,8 @@ abd_iter_init(struct abd_iter *aiter, abd_t *abd) { ASSERT(!abd_is_gang(abd)); abd_verify(abd); + memset(aiter, 0, sizeof (struct abd_iter)); aiter->iter_abd = abd; - aiter->iter_pos = 0; - aiter->iter_mapaddr = NULL; - aiter->iter_mapsize = 0; } /* |