abd_os: split userspace and Linux kernel code

The Linux abd_os.c serves double-duty as the userspace scatter abd
implementation, by carrying an emulation of kernel scatterlists. This
commit lifts common and userspace-specific parts out into a separate
abd_os.c for libzpool.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #16253
This commit is contained in:
Rob Norris
2023-12-25 22:25:48 +11:00
committed by Brian Behlendorf
parent 2b7d9a7863
commit 7a5b4355e2
4 changed files with 498 additions and 149 deletions
+1 -1
View File
@@ -9,6 +9,7 @@ lib_LTLIBRARIES += libzpool.la
CPPCHECKTARGETS += libzpool.la
dist_libzpool_la_SOURCES = \
%D%/abd_os.c \
%D%/kernel.c \
%D%/taskq.c \
%D%/util.c
@@ -39,7 +40,6 @@ nodist_libzpool_la_SOURCES = \
module/lua/lvm.c \
module/lua/lzio.c \
\
module/os/linux/zfs/abd_os.c \
module/os/linux/zfs/arc_os.c \
module/os/linux/zfs/trace.c \
module/os/linux/zfs/vdev_file.c \