]> git.proxmox.com Git - mirror_zfs.git/commit
abd: add page iterator
authorRob Norris <rob.norris@klarasystems.com>
Mon, 11 Dec 2023 05:05:54 +0000 (16:05 +1100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 25 Mar 2024 23:50:35 +0000 (16:50 -0700)
commit390b448726c580999dd337be7a40b0e95cf1d50b
tree54547ea19f3e5d742aec9c5da9450a0aa2db6bc6
parentdf04efe321a49c650f1fbaa6fd701fa2928cbe21
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 <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Closes #15533
Closes #15588
include/sys/abd.h
include/sys/abd_impl.h
module/os/freebsd/zfs/abd_os.c
module/os/linux/zfs/abd_os.c
module/zfs/abd.c