summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-11-27 11:11:03 -0800
committerBrian Behlendorf <[email protected]>2019-11-27 11:11:03 -0800
commitd6f67df63c58a5460b5b78f653dd09ad3f7f610e (patch)
tree84f736970f4c0e675c4609aa2c99ff60808a62d4 /include
parentc940bf0c37dd4b644618e13631c74b67f68d7002 (diff)
Minor diff reduction with ZoF in include/sys
- move linux/ includes to platform headers - add void * io_bio to zio for tracking the underlying bio - add freebsd specific fields to abd_scatter Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Kjeld Schouten <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #9615
Diffstat (limited to 'include')
-rw-r--r--include/os/linux/spl/sys/uio.h4
-rw-r--r--include/sys/abd.h9
-rw-r--r--include/sys/dmu.h1
-rw-r--r--include/sys/zfs_project.h2
-rw-r--r--include/sys/zio.h1
5 files changed, 11 insertions, 6 deletions
diff --git a/include/os/linux/spl/sys/uio.h b/include/os/linux/spl/sys/uio.h
index fac26079d..e51152b88 100644
--- a/include/os/linux/spl/sys/uio.h
+++ b/include/os/linux/spl/sys/uio.h
@@ -26,8 +26,12 @@
#ifndef _SPL_UIO_H
#define _SPL_UIO_H
+#include <sys/debug.h>
#include <linux/uio.h>
#include <linux/blkdev.h>
+#include <linux/blkdev_compat.h>
+#include <linux/mm.h>
+#include <linux/bio.h>
#include <asm/uaccess.h>
#include <sys/types.h>
diff --git a/include/sys/abd.h b/include/sys/abd.h
index b781be4da..82b73589b 100644
--- a/include/sys/abd.h
+++ b/include/sys/abd.h
@@ -29,11 +29,7 @@
#include <sys/isa_defs.h>
#include <sys/debug.h>
#include <sys/refcount.h>
-#ifdef _KERNEL
-#include <linux/mm.h>
-#include <linux/bio.h>
#include <sys/uio.h>
-#endif
#ifdef __cplusplus
extern "C" {
@@ -56,8 +52,13 @@ typedef struct abd {
union {
struct abd_scatter {
uint_t abd_offset;
+#if defined(__FreeBSD__) && defined(_KERNEL)
+ uint_t abd_chunk_size;
+ void *abd_chunks[];
+#else
uint_t abd_nents;
struct scatterlist *abd_sgl;
+#endif
} abd_scatter;
struct abd_linear {
void *abd_buf;
diff --git a/include/sys/dmu.h b/include/sys/dmu.h
index 24cbb2f7a..e497d21c9 100644
--- a/include/sys/dmu.h
+++ b/include/sys/dmu.h
@@ -847,7 +847,6 @@ void dmu_write_by_dnode(dnode_t *dn, uint64_t offset, uint64_t size,
void dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
dmu_tx_t *tx);
#ifdef _KERNEL
-#include <linux/blkdev_compat.h>
int dmu_read_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size);
int dmu_read_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size);
int dmu_read_uio_dnode(dnode_t *dn, struct uio *uio, uint64_t size);
diff --git a/include/sys/zfs_project.h b/include/sys/zfs_project.h
index 52d5204a6..81a238905 100644
--- a/include/sys/zfs_project.h
+++ b/include/sys/zfs_project.h
@@ -32,7 +32,7 @@
#endif
#endif
-#include <linux/fs.h>
+#include <sys/vfs.h>
#ifdef FS_PROJINHERIT_FL
#define ZFS_PROJINHERIT_FL FS_PROJINHERIT_FL
diff --git a/include/sys/zio.h b/include/sys/zio.h
index 23a4a6ea9..9326030d0 100644
--- a/include/sys/zio.h
+++ b/include/sys/zio.h
@@ -500,6 +500,7 @@ struct zio {
zio_gang_node_t *io_gang_tree;
void *io_executor;
void *io_waiter;
+ void *io_bio;
kmutex_t io_lock;
kcondvar_t io_cv;
int io_allocator;