aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2020-07-29 16:35:33 -0700
committerGitHub <[email protected]>2020-07-29 16:35:33 -0700
commit27d96d22542282b81a055e2108268dc78d08eda8 (patch)
tree56926ce22cb377e4de917dae56022faca7c080e7
parent843e9ca2e1ef347cf6b0271ed84438afc145dfd4 (diff)
Rename refcount.h to zfs_refcount.h
Renamed to avoid conflicting with refcount.h when a different implementation is already provided by the platform. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #10620
-rw-r--r--cmd/ztest/ztest.c2
-rw-r--r--include/os/freebsd/spl/sys/ccompile.h2
-rw-r--r--include/os/freebsd/spl/sys/file.h1
-rw-r--r--include/os/freebsd/spl/sys/vnode.h2
-rw-r--r--include/sys/Makefile.am2
-rw-r--r--include/sys/abd.h2
-rw-r--r--include/sys/arc.h2
-rw-r--r--include/sys/dbuf.h2
-rw-r--r--include/sys/dmu_tx.h2
-rw-r--r--include/sys/dnode.h2
-rw-r--r--include/sys/dsl_bookmark.h2
-rw-r--r--include/sys/dsl_dataset.h2
-rw-r--r--include/sys/dsl_dir.h2
-rw-r--r--include/sys/rrwlock.h2
-rw-r--r--include/sys/sa_impl.h2
-rw-r--r--include/sys/spa_impl.h2
-rw-r--r--include/sys/zfs_refcount.h (renamed from include/sys/refcount.h)4
-rw-r--r--include/sys/zio_crypt.h2
-rw-r--r--lib/libzpool/util.c2
-rw-r--r--module/os/freebsd/spl/spl_vfs.c1
-rw-r--r--module/os/freebsd/zfs/arc_os.c2
-rw-r--r--module/os/freebsd/zfs/zfs_fuid_os.c1
-rw-r--r--module/os/freebsd/zfs/zfs_vnops.c1
-rw-r--r--module/os/freebsd/zfs/zfs_znode.c3
-rw-r--r--module/os/freebsd/zfs/zvol_os.c1
-rw-r--r--module/os/linux/zfs/arc_os.c2
-rw-r--r--module/os/linux/zfs/zfs_znode.c2
-rw-r--r--module/zfs/arc.c2
-rw-r--r--module/zfs/bpobj.c2
-rw-r--r--module/zfs/bptree.c1
-rw-r--r--module/zfs/dsl_deadlist.c1
-rw-r--r--module/zfs/refcount.c2
-rw-r--r--module/zfs/rrwlock.c1
-rw-r--r--module/zfs/space_map.c1
-rw-r--r--module/zfs/vdev_indirect.c1
-rw-r--r--module/zfs/vdev_initialize.c1
-rw-r--r--module/zfs/vdev_trim.c1
-rw-r--r--module/zfs/zap.c1
-rw-r--r--module/zfs/zap_micro.c1
-rw-r--r--module/zfs/zfs_fuid.c1
40 files changed, 28 insertions, 40 deletions
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index 0a3653f7f..31205a5bf 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -116,7 +116,7 @@
#include <sys/dsl_destroy.h>
#include <sys/dsl_scan.h>
#include <sys/zio_checksum.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/zfeature.h>
#include <sys/dsl_userhold.h>
#include <sys/abd.h>
diff --git a/include/os/freebsd/spl/sys/ccompile.h b/include/os/freebsd/spl/sys/ccompile.h
index cfb94268b..c594c928f 100644
--- a/include/os/freebsd/spl/sys/ccompile.h
+++ b/include/os/freebsd/spl/sys/ccompile.h
@@ -119,7 +119,7 @@ extern "C" {
#define __CONST __sun_attr__((__const__))
#define __PURE __sun_attr__((__pure__))
-#ifdef INVARIANTS
+#if defined(INVARIANTS) && !defined(ZFS_DEBUG)
#define ZFS_DEBUG
#undef NDEBUG
#endif
diff --git a/include/os/freebsd/spl/sys/file.h b/include/os/freebsd/spl/sys/file.h
index 0d0be44f8..51e59b113 100644
--- a/include/os/freebsd/spl/sys/file.h
+++ b/include/os/freebsd/spl/sys/file.h
@@ -30,7 +30,6 @@
#define _OPENSOLARIS_SYS_FILE_H_
#include <sys/refcount.h>
-#include_next <sys/refcount.h>
#include_next <sys/file.h>
#define FKIOCTL 0x80000000 /* ioctl addresses are from kernel */
diff --git a/include/os/freebsd/spl/sys/vnode.h b/include/os/freebsd/spl/sys/vnode.h
index e330bc079..b9fae99ad 100644
--- a/include/os/freebsd/spl/sys/vnode.h
+++ b/include/os/freebsd/spl/sys/vnode.h
@@ -53,7 +53,7 @@ enum symfollow { NO_FOLLOW = NOFOLLOW };
#include <sys/mount.h>
#include <sys/cred.h>
#include <sys/fcntl.h>
-#include_next <sys/refcount.h>
+#include <sys/refcount.h>
#include <sys/file.h>
#include <sys/filedesc.h>
#include <sys/syscallsubr.h>
diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am
index 0659c6419..cbe21b791 100644
--- a/include/sys/Makefile.am
+++ b/include/sys/Makefile.am
@@ -57,7 +57,6 @@ COMMON_H = \
pathname.h \
qat.h \
range_tree.h \
- refcount.h \
rrwlock.h \
sa.h \
sa_impl.h \
@@ -111,6 +110,7 @@ COMMON_H = \
zfs_project.h \
zfs_quota.h \
zfs_ratelimit.h \
+ zfs_refcount.h \
zfs_rlock.h \
zfs_sa.h \
zfs_stat.h \
diff --git a/include/sys/abd.h b/include/sys/abd.h
index e9bd0e96f..735a13147 100644
--- a/include/sys/abd.h
+++ b/include/sys/abd.h
@@ -28,7 +28,7 @@
#include <sys/isa_defs.h>
#include <sys/debug.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/uio.h>
#ifdef __cplusplus
diff --git a/include/sys/arc.h b/include/sys/arc.h
index f358bc9ae..f322d6328 100644
--- a/include/sys/arc.h
+++ b/include/sys/arc.h
@@ -36,7 +36,7 @@ extern "C" {
#include <sys/zio.h>
#include <sys/dmu.h>
#include <sys/spa.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
/*
* Used by arc_flush() to inform arc_evict_state() that it should evict
diff --git a/include/sys/dbuf.h b/include/sys/dbuf.h
index d04e08baa..04338b2c4 100644
--- a/include/sys/dbuf.h
+++ b/include/sys/dbuf.h
@@ -34,7 +34,7 @@
#include <sys/zio.h>
#include <sys/arc.h>
#include <sys/zfs_context.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/zrlock.h>
#include <sys/multilist.h>
diff --git a/include/sys/dmu_tx.h b/include/sys/dmu_tx.h
index 36d205e95..60e9ed6e2 100644
--- a/include/sys/dmu_tx.h
+++ b/include/sys/dmu_tx.h
@@ -32,7 +32,7 @@
#include <sys/inttypes.h>
#include <sys/dmu.h>
#include <sys/txg.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#ifdef __cplusplus
extern "C" {
diff --git a/include/sys/dnode.h b/include/sys/dnode.h
index 14821bab2..3208b60f0 100644
--- a/include/sys/dnode.h
+++ b/include/sys/dnode.h
@@ -32,7 +32,7 @@
#include <sys/spa.h>
#include <sys/txg.h>
#include <sys/zio.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/dmu_zfetch.h>
#include <sys/zrlock.h>
#include <sys/multilist.h>
diff --git a/include/sys/dsl_bookmark.h b/include/sys/dsl_bookmark.h
index 73424e5a8..70f481344 100644
--- a/include/sys/dsl_bookmark.h
+++ b/include/sys/dsl_bookmark.h
@@ -20,7 +20,7 @@
#define _SYS_DSL_BOOKMARK_H
#include <sys/zfs_context.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/dsl_dataset.h>
#include <sys/dsl_pool.h>
diff --git a/include/sys/dsl_dataset.h b/include/sys/dsl_dataset.h
index 77fa440f2..90cb68927 100644
--- a/include/sys/dsl_dataset.h
+++ b/include/sys/dsl_dataset.h
@@ -36,7 +36,7 @@
#include <sys/dsl_synctask.h>
#include <sys/zfs_context.h>
#include <sys/dsl_deadlist.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/rrwlock.h>
#include <sys/dsl_crypt.h>
#include <zfeature_common.h>
diff --git a/include/sys/dsl_dir.h b/include/sys/dsl_dir.h
index b894bcfff..7cf5093c2 100644
--- a/include/sys/dsl_dir.h
+++ b/include/sys/dsl_dir.h
@@ -32,7 +32,7 @@
#include <sys/dsl_deadlist.h>
#include <sys/dsl_pool.h>
#include <sys/dsl_synctask.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/zfs_context.h>
#include <sys/dsl_crypt.h>
#include <sys/bplist.h>
diff --git a/include/sys/rrwlock.h b/include/sys/rrwlock.h
index 935a7ee94..8d296ef28 100644
--- a/include/sys/rrwlock.h
+++ b/include/sys/rrwlock.h
@@ -37,7 +37,7 @@ extern "C" {
#include <sys/inttypes.h>
#include <sys/zfs_context.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
extern uint_t rrw_tsd_key;
diff --git a/include/sys/sa_impl.h b/include/sys/sa_impl.h
index 7eddd8750..fa10aff8a 100644
--- a/include/sys/sa_impl.h
+++ b/include/sys/sa_impl.h
@@ -28,7 +28,7 @@
#define _SYS_SA_IMPL_H
#include <sys/dmu.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/list.h>
/*
diff --git a/include/sys/spa_impl.h b/include/sys/spa_impl.h
index 2c52cb666..69de75fb6 100644
--- a/include/sys/spa_impl.h
+++ b/include/sys/spa_impl.h
@@ -44,7 +44,7 @@
#include <sys/uberblock_impl.h>
#include <sys/zfs_context.h>
#include <sys/avl.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/bplist.h>
#include <sys/bpobj.h>
#include <sys/dsl_crypt.h>
diff --git a/include/sys/refcount.h b/include/sys/zfs_refcount.h
index c8f586230..fc0cbea1c 100644
--- a/include/sys/refcount.h
+++ b/include/sys/zfs_refcount.h
@@ -23,8 +23,8 @@
* Copyright (c) 2012, 2015 by Delphix. All rights reserved.
*/
-#ifndef _SYS_REFCOUNT_H
-#define _SYS_REFCOUNT_H
+#ifndef _SYS_ZFS_REFCOUNT_H
+#define _SYS_ZFS_REFCOUNT_H
#include <sys/inttypes.h>
#include <sys/list.h>
diff --git a/include/sys/zio_crypt.h b/include/sys/zio_crypt.h
index 6b7bf719e..d7a63d695 100644
--- a/include/sys/zio_crypt.h
+++ b/include/sys/zio_crypt.h
@@ -21,7 +21,7 @@
#define _SYS_ZIO_CRYPT_H
#include <sys/dmu.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#if defined(__FreeBSD__) && defined(_KERNEL)
#include <sys/freebsd_crypto.h>
#else
diff --git a/lib/libzpool/util.c b/lib/libzpool/util.c
index df1084cb6..ebfaa9b41 100644
--- a/lib/libzpool/util.c
+++ b/lib/libzpool/util.c
@@ -33,7 +33,7 @@
#include <stdlib.h>
#include <sys/spa.h>
#include <sys/fs/zfs.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/zfs_ioctl.h>
#include <dlfcn.h>
#include <libzutil.h>
diff --git a/module/os/freebsd/spl/spl_vfs.c b/module/os/freebsd/spl/spl_vfs.c
index d42835c20..6d308adb4 100644
--- a/module/os/freebsd/spl/spl_vfs.c
+++ b/module/os/freebsd/spl/spl_vfs.c
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
#include <sys/mutex.h>
#include <sys/vnode.h>
+#include <sys/taskq.h>
#include <sys/ccompat.h>
diff --git a/module/os/freebsd/zfs/arc_os.c b/module/os/freebsd/zfs/arc_os.c
index b3deff0f0..554896d85 100644
--- a/module/os/freebsd/zfs/arc_os.c
+++ b/module/os/freebsd/zfs/arc_os.c
@@ -26,7 +26,7 @@
#include <sys/zio_checksum.h>
#include <sys/zfs_context.h>
#include <sys/arc.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/vdev.h>
#include <sys/vdev_trim.h>
#include <sys/vdev_impl.h>
diff --git a/module/os/freebsd/zfs/zfs_fuid_os.c b/module/os/freebsd/zfs/zfs_fuid_os.c
index ebd09abd6..72655d7ff 100644
--- a/module/os/freebsd/zfs/zfs_fuid_os.c
+++ b/module/os/freebsd/zfs/zfs_fuid_os.c
@@ -26,7 +26,6 @@
#include <sys/dmu.h>
#include <sys/avl.h>
#include <sys/zap.h>
-#include <sys/refcount.h>
#include <sys/nvpair.h>
#ifdef _KERNEL
#include <sys/sid.h>
diff --git a/module/os/freebsd/zfs/zfs_vnops.c b/module/os/freebsd/zfs/zfs_vnops.c
index 14ad71d11..742b29506 100644
--- a/module/os/freebsd/zfs/zfs_vnops.c
+++ b/module/os/freebsd/zfs/zfs_vnops.c
@@ -36,6 +36,7 @@
#include <sys/sysmacros.h>
#include <sys/resource.h>
#include <sys/vfs.h>
+#include <sys/endian.h>
#include <sys/vm.h>
#include <sys/vnode.h>
#include <sys/dirent.h>
diff --git a/module/os/freebsd/zfs/zfs_znode.c b/module/os/freebsd/zfs/zfs_znode.c
index badf159ca..a44870612 100644
--- a/module/os/freebsd/zfs/zfs_znode.c
+++ b/module/os/freebsd/zfs/zfs_znode.c
@@ -56,14 +56,13 @@
#include <sys/dmu.h>
#include <sys/dmu_objset.h>
#include <sys/dmu_tx.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/stat.h>
#include <sys/zap.h>
#include <sys/zfs_znode.h>
#include <sys/sa.h>
#include <sys/zfs_sa.h>
#include <sys/zfs_stat.h>
-#include <sys/refcount.h>
#include "zfs_prop.h"
#include "zfs_comutil.h"
diff --git a/module/os/freebsd/zfs/zvol_os.c b/module/os/freebsd/zfs/zvol_os.c
index d601c7251..22fc64558 100644
--- a/module/os/freebsd/zfs/zvol_os.c
+++ b/module/os/freebsd/zfs/zvol_os.c
@@ -78,7 +78,6 @@
#include <sys/fs/zfs.h>
#include <sys/zfs_ioctl.h>
#include <sys/zil.h>
-#include <sys/refcount.h>
#include <sys/zfs_znode.h>
#include <sys/zfs_rlock.h>
#include <sys/vdev_impl.h>
diff --git a/module/os/linux/zfs/arc_os.c b/module/os/linux/zfs/arc_os.c
index e9c0f349d..9c3a6a4e2 100644
--- a/module/os/linux/zfs/arc_os.c
+++ b/module/os/linux/zfs/arc_os.c
@@ -33,7 +33,7 @@
#include <sys/zio_checksum.h>
#include <sys/zfs_context.h>
#include <sys/arc.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/vdev.h>
#include <sys/vdev_trim.h>
#include <sys/vdev_impl.h>
diff --git a/module/os/linux/zfs/zfs_znode.c b/module/os/linux/zfs/zfs_znode.c
index 504dc76f9..a542c662c 100644
--- a/module/os/linux/zfs/zfs_znode.c
+++ b/module/os/linux/zfs/zfs_znode.c
@@ -54,7 +54,7 @@
#include <sys/dmu.h>
#include <sys/dmu_objset.h>
#include <sys/dmu_tx.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/stat.h>
#include <sys/zap.h>
#include <sys/zfs_znode.h>
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index 9e9227271..dcf710ad1 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -284,7 +284,7 @@
#include <sys/zio_checksum.h>
#include <sys/zfs_context.h>
#include <sys/arc.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/vdev.h>
#include <sys/vdev_impl.h>
#include <sys/dsl_pool.h>
diff --git a/module/zfs/bpobj.c b/module/zfs/bpobj.c
index 00c3d7dfa..e75ba5ccc 100644
--- a/module/zfs/bpobj.c
+++ b/module/zfs/bpobj.c
@@ -26,7 +26,7 @@
#include <sys/bpobj.h>
#include <sys/zfs_context.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
#include <sys/dsl_pool.h>
#include <sys/zfeature.h>
#include <sys/zap.h>
diff --git a/module/zfs/bptree.c b/module/zfs/bptree.c
index 164216213..1827a3c4e 100644
--- a/module/zfs/bptree.c
+++ b/module/zfs/bptree.c
@@ -33,7 +33,6 @@
#include <sys/dsl_dir.h>
#include <sys/dsl_pool.h>
#include <sys/dnode.h>
-#include <sys/refcount.h>
#include <sys/spa.h>
/*
diff --git a/module/zfs/dsl_deadlist.c b/module/zfs/dsl_deadlist.c
index 8cb0f90fb..3d16f61f6 100644
--- a/module/zfs/dsl_deadlist.c
+++ b/module/zfs/dsl_deadlist.c
@@ -25,7 +25,6 @@
*/
#include <sys/dmu.h>
-#include <sys/refcount.h>
#include <sys/zap.h>
#include <sys/zfs_context.h>
#include <sys/dsl_pool.h>
diff --git a/module/zfs/refcount.c b/module/zfs/refcount.c
index 6c9c305ed..39476261e 100644
--- a/module/zfs/refcount.c
+++ b/module/zfs/refcount.c
@@ -24,7 +24,7 @@
*/
#include <sys/zfs_context.h>
-#include <sys/refcount.h>
+#include <sys/zfs_refcount.h>
/*
* Reference count tracking is disabled by default. It's memory requirements
diff --git a/module/zfs/rrwlock.c b/module/zfs/rrwlock.c
index a2b784837..d23fc3ad1 100644
--- a/module/zfs/rrwlock.c
+++ b/module/zfs/rrwlock.c
@@ -26,7 +26,6 @@
* Copyright (c) 2012 by Delphix. All rights reserved.
*/
-#include <sys/refcount.h>
#include <sys/rrwlock.h>
#include <sys/trace_zfs.h>
diff --git a/module/zfs/space_map.c b/module/zfs/space_map.c
index 723fa0578..3db7d1991 100644
--- a/module/zfs/space_map.c
+++ b/module/zfs/space_map.c
@@ -34,7 +34,6 @@
#include <sys/dsl_pool.h>
#include <sys/zio.h>
#include <sys/space_map.h>
-#include <sys/refcount.h>
#include <sys/zfeature.h>
/*
diff --git a/module/zfs/vdev_indirect.c b/module/zfs/vdev_indirect.c
index fc49bad06..4cd83d79e 100644
--- a/module/zfs/vdev_indirect.c
+++ b/module/zfs/vdev_indirect.c
@@ -27,7 +27,6 @@
#include <sys/zio.h>
#include <sys/zio_checksum.h>
#include <sys/metaslab.h>
-#include <sys/refcount.h>
#include <sys/dmu.h>
#include <sys/vdev_indirect_mapping.h>
#include <sys/dmu_tx.h>
diff --git a/module/zfs/vdev_initialize.c b/module/zfs/vdev_initialize.c
index 0d45d9958..ab711441d 100644
--- a/module/zfs/vdev_initialize.c
+++ b/module/zfs/vdev_initialize.c
@@ -27,7 +27,6 @@
#include <sys/spa_impl.h>
#include <sys/txg.h>
#include <sys/vdev_impl.h>
-#include <sys/refcount.h>
#include <sys/metaslab_impl.h>
#include <sys/dsl_synctask.h>
#include <sys/zap.h>
diff --git a/module/zfs/vdev_trim.c b/module/zfs/vdev_trim.c
index 0254c2904..a655e2fd2 100644
--- a/module/zfs/vdev_trim.c
+++ b/module/zfs/vdev_trim.c
@@ -29,7 +29,6 @@
#include <sys/txg.h>
#include <sys/vdev_impl.h>
#include <sys/vdev_trim.h>
-#include <sys/refcount.h>
#include <sys/metaslab_impl.h>
#include <sys/dsl_synctask.h>
#include <sys/zap.h>
diff --git a/module/zfs/zap.c b/module/zfs/zap.c
index 1abb32fdf..c0c280c52 100644
--- a/module/zfs/zap.c
+++ b/module/zfs/zap.c
@@ -45,7 +45,6 @@
#include <sys/zfs_znode.h>
#include <sys/fs/zfs.h>
#include <sys/zap.h>
-#include <sys/refcount.h>
#include <sys/zap_impl.h>
#include <sys/zap_leaf.h>
diff --git a/module/zfs/zap_micro.c b/module/zfs/zap_micro.c
index 644f4bab1..5d9bc2076 100644
--- a/module/zfs/zap_micro.c
+++ b/module/zfs/zap_micro.c
@@ -31,7 +31,6 @@
#include <sys/dmu.h>
#include <sys/zfs_context.h>
#include <sys/zap.h>
-#include <sys/refcount.h>
#include <sys/zap_impl.h>
#include <sys/zap_leaf.h>
#include <sys/avl.h>
diff --git a/module/zfs/zfs_fuid.c b/module/zfs/zfs_fuid.c
index fbd06be4f..726b923fa 100644
--- a/module/zfs/zfs_fuid.c
+++ b/module/zfs/zfs_fuid.c
@@ -26,7 +26,6 @@
#include <sys/dmu.h>
#include <sys/avl.h>
#include <sys/zap.h>
-#include <sys/refcount.h>
#include <sys/nvpair.h>
#ifdef _KERNEL
#include <sys/sid.h>