diff --git a/include/os/linux/spl/sys/Makefile.am b/include/os/linux/spl/sys/Makefile.am index de2f74d8cd..934289321e 100644 --- a/include/os/linux/spl/sys/Makefile.am +++ b/include/os/linux/spl/sys/Makefile.am @@ -43,6 +43,7 @@ KERNEL_H = \ $(top_srcdir)/include/os/linux/spl/sys/thread.h \ $(top_srcdir)/include/os/linux/spl/sys/time.h \ $(top_srcdir)/include/os/linux/spl/sys/timer.h \ + $(top_srcdir)/include/os/linux/spl/sys/trace.h \ $(top_srcdir)/include/os/linux/spl/sys/tsd.h \ $(top_srcdir)/include/os/linux/spl/sys/types32.h \ $(top_srcdir)/include/os/linux/spl/sys/types.h \ diff --git a/include/sys/trace.h b/include/os/linux/spl/sys/trace.h similarity index 100% rename from include/sys/trace.h rename to include/os/linux/spl/sys/trace.h diff --git a/include/os/linux/zfs/sys/Makefile.am b/include/os/linux/zfs/sys/Makefile.am index 5aa87da37c..c4e2df0d7e 100644 --- a/include/os/linux/zfs/sys/Makefile.am +++ b/include/os/linux/zfs/sys/Makefile.am @@ -1,5 +1,20 @@ KERNEL_H = \ $(top_srcdir)/include/os/linux/zfs/sys/policy.h \ + $(top_srcdir)/include/os/linux/zfs/sys/trace_acl.h \ + $(top_srcdir)/include/os/linux/zfs/sys/trace_arc.h \ + $(top_srcdir)/include/os/linux/zfs/sys/trace_common.h \ + $(top_srcdir)/include/os/linux/zfs/sys/trace_defs.h \ + $(top_srcdir)/include/os/linux/zfs/sys/trace_dbgmsg.h \ + $(top_srcdir)/include/os/linux/zfs/sys/trace_dbuf.h \ + $(top_srcdir)/include/os/linux/zfs/sys/trace_dmu.h \ + $(top_srcdir)/include/os/linux/zfs/sys/trace_dnode.h \ + $(top_srcdir)/include/os/linux/zfs/sys/trace_multilist.h \ + $(top_srcdir)/include/os/linux/zfs/sys/trace_rrwlock.h \ + $(top_srcdir)/include/os/linux/zfs/sys/trace_txg.h \ + $(top_srcdir)/include/os/linux/zfs/sys/trace_vdev.h \ + $(top_srcdir)/include/os/linux/zfs/sys/trace_zil.h \ + $(top_srcdir)/include/os/linux/zfs/sys/trace_zio.h \ + $(top_srcdir)/include/os/linux/zfs/sys/trace_zrlock.h \ $(top_srcdir)/include/os/linux/zfs/sys/zfs_ctldir.h \ $(top_srcdir)/include/os/linux/zfs/sys/zfs_dir.h \ $(top_srcdir)/include/os/linux/zfs/sys/zfs_vfsops.h \ diff --git a/include/sys/trace_acl.h b/include/os/linux/zfs/sys/trace_acl.h similarity index 100% rename from include/sys/trace_acl.h rename to include/os/linux/zfs/sys/trace_acl.h diff --git a/include/sys/trace_arc.h b/include/os/linux/zfs/sys/trace_arc.h similarity index 100% rename from include/sys/trace_arc.h rename to include/os/linux/zfs/sys/trace_arc.h diff --git a/include/sys/trace_common.h b/include/os/linux/zfs/sys/trace_common.h similarity index 100% rename from include/sys/trace_common.h rename to include/os/linux/zfs/sys/trace_common.h diff --git a/include/sys/trace_dbgmsg.h b/include/os/linux/zfs/sys/trace_dbgmsg.h similarity index 100% rename from include/sys/trace_dbgmsg.h rename to include/os/linux/zfs/sys/trace_dbgmsg.h diff --git a/include/sys/trace_dbuf.h b/include/os/linux/zfs/sys/trace_dbuf.h similarity index 100% rename from include/sys/trace_dbuf.h rename to include/os/linux/zfs/sys/trace_dbuf.h diff --git a/include/os/linux/zfs/sys/trace_defs.h b/include/os/linux/zfs/sys/trace_defs.h new file mode 100644 index 0000000000..aaff65fbc0 --- /dev/null +++ b/include/os/linux/zfs/sys/trace_defs.h @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +#ifndef _OS_LINUX_ZFS_TRACE_H +#define _OS_LINUX_ZFS_TRACE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/include/sys/trace_dmu.h b/include/os/linux/zfs/sys/trace_dmu.h similarity index 100% rename from include/sys/trace_dmu.h rename to include/os/linux/zfs/sys/trace_dmu.h diff --git a/include/sys/trace_dnode.h b/include/os/linux/zfs/sys/trace_dnode.h similarity index 100% rename from include/sys/trace_dnode.h rename to include/os/linux/zfs/sys/trace_dnode.h diff --git a/include/sys/trace_multilist.h b/include/os/linux/zfs/sys/trace_multilist.h similarity index 100% rename from include/sys/trace_multilist.h rename to include/os/linux/zfs/sys/trace_multilist.h diff --git a/include/sys/trace_rrwlock.h b/include/os/linux/zfs/sys/trace_rrwlock.h similarity index 100% rename from include/sys/trace_rrwlock.h rename to include/os/linux/zfs/sys/trace_rrwlock.h diff --git a/include/sys/trace_txg.h b/include/os/linux/zfs/sys/trace_txg.h similarity index 100% rename from include/sys/trace_txg.h rename to include/os/linux/zfs/sys/trace_txg.h diff --git a/include/sys/trace_vdev.h b/include/os/linux/zfs/sys/trace_vdev.h similarity index 96% rename from include/sys/trace_vdev.h rename to include/os/linux/zfs/sys/trace_vdev.h index 13688a99e4..50711446ff 100644 --- a/include/sys/trace_vdev.h +++ b/include/os/linux/zfs/sys/trace_vdev.h @@ -24,8 +24,8 @@ /* * If tracepoints are available define dtrace_probe events for vdev - * related probes. Definitions in usr/include/trace.h will map - * DTRACE_PROBE* calls to tracepoints. + * related probes. Definitions in include/os/linux/spl/sys/trace.h + * will map DTRACE_PROBE* calls to tracepoints. */ #undef TRACE_SYSTEM @@ -129,7 +129,7 @@ DEFINE_REMOVE_FREE_EVENT_TXG(zfs_remove__free__inflight); * When tracepoints are not available, a DEFINE_DTRACE_PROBE* macro is * needed for each DTRACE_PROBE. These will be used to generate stub * tracing functions and prototypes for those functions. See - * include/sys/trace.h. + * include/os/linux/spl/sys/trace.h. */ DEFINE_DTRACE_PROBE3(remove__free__synced); diff --git a/include/sys/trace_zil.h b/include/os/linux/zfs/sys/trace_zil.h similarity index 100% rename from include/sys/trace_zil.h rename to include/os/linux/zfs/sys/trace_zil.h diff --git a/include/sys/trace_zio.h b/include/os/linux/zfs/sys/trace_zio.h similarity index 100% rename from include/sys/trace_zio.h rename to include/os/linux/zfs/sys/trace_zio.h diff --git a/include/sys/trace_zrlock.h b/include/os/linux/zfs/sys/trace_zrlock.h similarity index 100% rename from include/sys/trace_zrlock.h rename to include/os/linux/zfs/sys/trace_zrlock.h diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am index 75033d9130..897b7e1cc4 100644 --- a/include/sys/Makefile.am +++ b/include/sys/Makefile.am @@ -70,21 +70,6 @@ COMMON_H = \ $(top_srcdir)/include/sys/spa_impl.h \ $(top_srcdir)/include/sys/spa_checksum.h \ $(top_srcdir)/include/sys/sysevent.h \ - $(top_srcdir)/include/sys/trace.h \ - $(top_srcdir)/include/sys/trace_acl.h \ - $(top_srcdir)/include/sys/trace_arc.h \ - $(top_srcdir)/include/sys/trace_common.h \ - $(top_srcdir)/include/sys/trace_dbgmsg.h \ - $(top_srcdir)/include/sys/trace_dbuf.h \ - $(top_srcdir)/include/sys/trace_dmu.h \ - $(top_srcdir)/include/sys/trace_dnode.h \ - $(top_srcdir)/include/sys/trace_multilist.h \ - $(top_srcdir)/include/sys/trace_rrwlock.h \ - $(top_srcdir)/include/sys/trace_txg.h \ - $(top_srcdir)/include/sys/trace_vdev.h \ - $(top_srcdir)/include/sys/trace_zil.h \ - $(top_srcdir)/include/sys/trace_zio.h \ - $(top_srcdir)/include/sys/trace_zrlock.h \ $(top_srcdir)/include/sys/txg.h \ $(top_srcdir)/include/sys/txg_impl.h \ $(top_srcdir)/include/sys/u8_textprep_data.h \ diff --git a/lib/libspl/include/sys/Makefile.am b/lib/libspl/include/sys/Makefile.am index 5156e2912c..60ddb7881a 100644 --- a/lib/libspl/include/sys/Makefile.am +++ b/lib/libspl/include/sys/Makefile.am @@ -43,6 +43,7 @@ libspl_HEADERS = \ $(top_srcdir)/lib/libspl/include/sys/sysmacros.h \ $(top_srcdir)/lib/libspl/include/sys/systeminfo.h \ $(top_srcdir)/lib/libspl/include/sys/time.h \ + $(top_srcdir)/lib/libspl/include/sys/trace_defs.h \ $(top_srcdir)/lib/libspl/include/sys/types32.h \ $(top_srcdir)/lib/libspl/include/sys/types.h \ $(top_srcdir)/lib/libspl/include/sys/tzfile.h \ diff --git a/lib/libspl/include/sys/trace_defs.h b/lib/libspl/include/sys/trace_defs.h new file mode 100644 index 0000000000..a96e293184 --- /dev/null +++ b/lib/libspl/include/sys/trace_defs.h @@ -0,0 +1 @@ +/* Here to keep the libspl build happy */ diff --git a/module/os/linux/zfs/Makefile.in b/module/os/linux/zfs/Makefile.in index 84900bd2c3..2165e7f749 100644 --- a/module/os/linux/zfs/Makefile.in +++ b/module/os/linux/zfs/Makefile.in @@ -11,6 +11,7 @@ ccflags-y += -I@abs_top_srcdir@/module/os/linux/zfs $(MODULE)-objs += ../os/linux/zfs/abd.o $(MODULE)-objs += ../os/linux/zfs/policy.o +$(MODULE)-objs += ../os/linux/zfs/trace.o $(MODULE)-objs += ../os/linux/zfs/qat.o $(MODULE)-objs += ../os/linux/zfs/qat_compress.o $(MODULE)-objs += ../os/linux/zfs/qat_crypt.o diff --git a/module/zfs/trace.c b/module/os/linux/zfs/trace.c similarity index 96% rename from module/zfs/trace.c rename to module/os/linux/zfs/trace.c index fe503776b4..7b2f981ee9 100644 --- a/module/zfs/trace.c +++ b/module/os/linux/zfs/trace.c @@ -33,11 +33,10 @@ #include #include #include -#include #include #include -#include +#ifdef _KERNEL #define CREATE_TRACE_POINTS #include #include @@ -52,3 +51,4 @@ #include #include #include +#endif diff --git a/module/zfs/Makefile.in b/module/zfs/Makefile.in index 7c560fad77..b60b799b57 100644 --- a/module/zfs/Makefile.in +++ b/module/zfs/Makefile.in @@ -80,7 +80,6 @@ $(MODULE)-objs += spa_log_spacemap.o $(MODULE)-objs += spa_misc.o $(MODULE)-objs += space_map.o $(MODULE)-objs += space_reftree.o -$(MODULE)-objs += trace.o $(MODULE)-objs += txg.o $(MODULE)-objs += uberblock.o $(MODULE)-objs += unique.o diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 21f3dee077..709a565b16 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -302,7 +302,7 @@ #include #include #include -#include +#include #include #include diff --git a/module/zfs/dbuf.c b/module/zfs/dbuf.c index dd33ae97c9..ca6032ed24 100644 --- a/module/zfs/dbuf.c +++ b/module/zfs/dbuf.c @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c index 861858e3a9..895cac58e8 100644 --- a/module/zfs/dmu.c +++ b/module/zfs/dmu.c @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #ifdef _KERNEL #include diff --git a/module/zfs/dmu_tx.c b/module/zfs/dmu_tx.c index fcbe302879..66dbb583a1 100644 --- a/module/zfs/dmu_tx.c +++ b/module/zfs/dmu_tx.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include typedef void (*dmu_tx_hold_func_t)(dmu_tx_t *tx, struct dnode *dn, uint64_t arg1, uint64_t arg2); diff --git a/module/zfs/dnode.c b/module/zfs/dnode.c index 4ee192ed5e..95132344c2 100644 --- a/module/zfs/dnode.c +++ b/module/zfs/dnode.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include dnode_stats_t dnode_stats = { diff --git a/module/zfs/dsl_pool.c b/module/zfs/dsl_pool.c index 09045bb472..4fffe4cb5a 100644 --- a/module/zfs/dsl_pool.c +++ b/module/zfs/dsl_pool.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include /* diff --git a/module/zfs/multilist.c b/module/zfs/multilist.c index 6f935917cb..73cf8cbbc2 100644 --- a/module/zfs/multilist.c +++ b/module/zfs/multilist.c @@ -18,7 +18,7 @@ #include #include -#include +#include /* needed for spa_get_random() */ #include diff --git a/module/zfs/rrwlock.c b/module/zfs/rrwlock.c index 32d45f674a..c48a5d3ed7 100644 --- a/module/zfs/rrwlock.c +++ b/module/zfs/rrwlock.c @@ -28,7 +28,7 @@ #include #include -#include +#include /* * This file contains the implementation of a re-entrant read diff --git a/module/zfs/txg.c b/module/zfs/txg.c index 2a5f4f6896..ae96f5ec0d 100644 --- a/module/zfs/txg.c +++ b/module/zfs/txg.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include /* * ZFS Transaction Groups diff --git a/module/zfs/vdev_removal.c b/module/zfs/vdev_removal.c index 3ba06e4acf..c9156054cd 100644 --- a/module/zfs/vdev_removal.c +++ b/module/zfs/vdev_removal.c @@ -46,7 +46,7 @@ #include #include #include -#include +#include /* * This file contains the necessary logic to remove vdevs from a diff --git a/module/zfs/zil.c b/module/zfs/zil.c index 9df5820e5f..30a73515c7 100644 --- a/module/zfs/zil.c +++ b/module/zfs/zil.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include /* diff --git a/module/zfs/zio.c b/module/zfs/zio.c index f966023aaa..1e341e2246 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/module/zfs/zrlock.c b/module/zfs/zrlock.c index 014a5cc6c7..fe9044f2cf 100644 --- a/module/zfs/zrlock.c +++ b/module/zfs/zrlock.c @@ -39,7 +39,7 @@ * function calls. */ #include -#include +#include /* * A ZRL can be locked only while there are zero references, so ZRL_LOCKED is