diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c index 0a3653f7ff..31205a5bf8 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 cfb94268bf..c594c928f8 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 0d0be44f8a..51e59b1133 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 e330bc079f..b9fae99ad2 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 0659c6419d..cbe21b7914 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 e9bd0e96f1..735a131475 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 f358bc9ae5..f322d6328f 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 d04e08baaf..04338b2c49 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 36d205e950..60e9ed6e26 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 14821bab27..3208b60f0e 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 73424e5a86..70f4813449 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 77fa440f25..90cb68927a 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 b894bcfff6..7cf5093c2c 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 935a7ee940..8d296ef28f 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 7eddd8750f..fa10aff8a3 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 2c52cb666f..69de75fb6d 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 c8f5862303..fc0cbea1cf 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 6b7bf719ef..d7a63d6958 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 df1084cb6d..ebfaa9b41a 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 d42835c202..6d308adb43 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 b3deff0f0c..554896d856 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 ebd09abd65..72655d7ff6 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 14ad71d11e..742b295066 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 badf159ca1..a448706121 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 d601c72515..22fc64558d 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 e9c0f349d5..9c3a6a4e29 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 504dc76f92..a542c662cb 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 9e9227271d..dcf710ad14 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 00c3d7dfa8..e75ba5cccd 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 1642162133..1827a3c4e3 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 8cb0f90fb8..3d16f61f62 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 6c9c305eda..39476261ed 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 a2b7848374..d23fc3ad10 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 723fa05784..3db7d19919 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 fc49bad065..4cd83d79ea 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 0d45d9958e..ab711441d9 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 0254c29043..a655e2fd2a 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 1abb32fdf0..c0c280c520 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 644f4bab1f..5d9bc20760 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 fbd06be4f9..726b923fac 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