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 #include #include -#include +#include #include #include #include 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 -#include_next #include_next #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 #include #include -#include_next +#include #include #include #include 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 #include -#include +#include #include #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 #include #include -#include +#include /* * 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 #include #include -#include +#include #include #include 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 #include #include -#include +#include #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 #include #include -#include +#include #include #include #include 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 -#include +#include #include #include 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 #include #include -#include +#include #include #include #include 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 #include #include -#include +#include #include #include #include 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 #include -#include +#include 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 -#include +#include #include /* 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 #include #include -#include +#include #include #include #include diff --git a/include/sys/refcount.h b/include/sys/zfs_refcount.h similarity index 98% rename from include/sys/refcount.h rename to 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 #include 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 -#include +#include #if defined(__FreeBSD__) && defined(_KERNEL) #include #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 #include #include -#include +#include #include #include #include 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 #include +#include #include 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 #include #include -#include +#include #include #include #include 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 #include #include -#include #include #ifdef _KERNEL #include 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 #include #include +#include #include #include #include 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 #include #include -#include +#include #include #include #include #include #include #include -#include #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 #include #include -#include #include #include #include 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 #include #include -#include +#include #include #include #include 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 #include #include -#include +#include #include #include #include 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 #include #include -#include +#include #include #include #include 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 #include -#include +#include #include #include #include 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 #include #include -#include #include /* 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 -#include #include #include #include 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 -#include +#include /* * 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 #include #include 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 #include #include -#include #include /* 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 #include #include -#include #include #include #include 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 #include #include -#include #include #include #include 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 #include #include -#include #include #include #include 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 #include #include -#include #include #include 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 #include #include -#include #include #include #include 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 #include #include -#include #include #ifdef _KERNEL #include