Skip to content
Permalink
Browse files

openzfs restructuring part 1

move platform specific headers

Signed-off-by: Matthew Macy <mmacy@FreeBSD.org>
  • Loading branch information...
mattmacy committed Aug 21, 2019
1 parent 31b548f commit 64d0efbf43e8dcd667c06156cdbb1c298f396420
Showing with 127 additions and 68 deletions.
  1. +26 −0 config/always-system.m4
  2. +1 −0 config/zfs-build.m4
  3. +7 −1 configure.ac
  4. +2 −0 copy-builtin
  5. +5 −1 include/Makefile.am
  6. +3 −0 include/os/Makefile.am
  7. +1 −0 include/os/linux/Makefile.am
  8. +1 −0 include/os/linux/spl/Makefile.am
  9. +7 −0 include/os/linux/spl/rpc/Makefile.am
  10. 0 include/{ → os/linux}/spl/rpc/xdr.h
  11. +57 −0 include/os/linux/spl/sys/Makefile.am
  12. 0 include/{ → os/linux}/spl/sys/acl.h
  13. 0 include/{ → os/linux}/spl/sys/atomic.h
  14. 0 include/{ → os/linux}/spl/sys/byteorder.h
  15. 0 include/{ → os/linux}/spl/sys/callb.h
  16. 0 include/{ → os/linux}/spl/sys/callo.h
  17. 0 include/{ → os/linux}/spl/sys/cmn_err.h
  18. 0 include/{ → os/linux}/spl/sys/condvar.h
  19. 0 include/{ → os/linux}/spl/sys/console.h
  20. 0 include/{ → os/linux}/spl/sys/cred.h
  21. 0 include/{ → os/linux}/spl/sys/ctype.h
  22. 0 include/{ → os/linux}/spl/sys/disp.h
  23. 0 include/{ → os/linux}/spl/sys/dkio.h
  24. 0 include/{ → os/linux}/spl/sys/errno.h
  25. 0 include/{ → os/linux}/spl/sys/fcntl.h
  26. 0 include/{ → os/linux}/spl/sys/file.h
  27. 0 include/{ → os/linux}/spl/sys/inttypes.h
  28. 0 include/{ → os/linux}/spl/sys/isa_defs.h
  29. 0 include/{ → os/linux}/spl/sys/kmem.h
  30. 0 include/{ → os/linux}/spl/sys/kmem_cache.h
  31. 0 include/{ → os/linux}/spl/sys/kobj.h
  32. 0 include/{ → os/linux}/spl/sys/list.h
  33. 0 include/{ → os/linux}/spl/sys/mode.h
  34. 0 include/{ → os/linux}/spl/sys/mutex.h
  35. 0 include/{ → os/linux}/spl/sys/param.h
  36. 0 include/{ → os/linux}/spl/sys/proc.h
  37. 0 include/{ → os/linux}/spl/sys/processor.h
  38. 0 include/{ → os/linux}/spl/sys/random.h
  39. 0 include/{ → os/linux}/spl/sys/rwlock.h
  40. 0 include/{ → os/linux}/spl/sys/shrinker.h
  41. 0 include/{ → os/linux}/spl/sys/sid.h
  42. 0 include/{ → os/linux}/spl/sys/signal.h
  43. 0 include/{ → os/linux}/spl/sys/stat.h
  44. 0 include/{ → os/linux}/spl/sys/strings.h
  45. 0 include/{ → os/linux}/spl/sys/sysmacros.h
  46. 0 include/{ → os/linux}/spl/sys/systeminfo.h
  47. 0 include/{ → os/linux}/spl/sys/taskq.h
  48. 0 include/{ → os/linux}/spl/sys/thread.h
  49. 0 include/{ → os/linux}/spl/sys/time.h
  50. 0 include/{ → os/linux}/spl/sys/timer.h
  51. 0 include/{ → os/linux}/spl/sys/tsd.h
  52. 0 include/{ → os/linux}/spl/sys/types.h
  53. 0 include/{ → os/linux}/spl/sys/types32.h
  54. 0 include/{ → os/linux}/spl/sys/uio.h
  55. 0 include/{ → os/linux}/spl/sys/user.h
  56. 0 include/{ → os/linux}/spl/sys/vfs.h
  57. 0 include/{ → os/linux}/spl/sys/vmem.h
  58. 0 include/{ → os/linux}/spl/sys/vmsystm.h
  59. 0 include/{ → os/linux}/spl/sys/vnode.h
  60. 0 include/{ → os/linux}/spl/sys/wait.h
  61. 0 include/{ → os/linux}/spl/sys/zmod.h
  62. 0 include/{ → os/linux}/spl/sys/zone.h
  63. +1 −0 include/os/linux/zfs/Makefile.am
  64. +12 −0 include/os/linux/zfs/sys/Makefile.am
  65. 0 include/{ → os/linux/zfs}/sys/policy.h
  66. 0 include/{ → os/linux/zfs}/sys/zfs_ctldir.h
  67. 0 include/{ → os/linux/zfs}/sys/zfs_dir.h
  68. 0 include/{ → os/linux/zfs}/sys/zfs_vfsops.h
  69. 0 include/{ → os/linux/zfs}/sys/zfs_vnops.h
  70. 0 include/{ → os/linux/zfs}/sys/zpl.h
  71. +1 −1 include/spl/Makefile.am
  72. +0 −7 include/spl/rpc/Makefile.am
  73. +1 −52 include/spl/sys/Makefile.am
  74. +0 −6 include/sys/Makefile.am
  75. +2 −0 module/Makefile.in
@@ -0,0 +1,26 @@
dnl #
dnl # Set the target system
dnl #
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_SYSTEM], [
AC_MSG_CHECKING([for system type ($host_os)])
case $host_os in
*linux*)
AC_DEFINE([SYSTEM_LINUX], [1],
[True if ZFS is to be compiled for a Linux system])
ac_system="Linux"
;;
*freebsd*)
AC_DEFINE([SYSTEM_FREEBSD], [1],
[True if ZFS is to be compiled for a FreeBSD system])
ac_system="FreeBSD"
;;
*)
ac_system="unknown"
;;
esac
AC_MSG_RESULT([$ac_system])
AC_SUBST([ac_system])

AM_CONDITIONAL([BUILD_LINUX], [test "x$ac_system" = "xLinux"])
AM_CONDITIONAL([BUILD_FREEBSD], [test "x$ac_system" = "xFreeBSD"])
])
@@ -160,6 +160,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
ZFS_AC_CONFIG_ALWAYS_CC_NO_OMIT_FRAME_POINTER
ZFS_AC_CONFIG_ALWAYS_CC_ASAN
ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_SIMD
ZFS_AC_CONFIG_ALWAYS_SYSTEM
ZFS_AC_CONFIG_ALWAYS_ARCH
ZFS_AC_CONFIG_ALWAYS_PYTHON
ZFS_AC_CONFIG_ALWAYS_PYZFS
@@ -147,8 +147,14 @@ AC_CONFIG_FILES([
module/spl/Makefile
include/Makefile
include/linux/Makefile
include/os/Makefile
include/os/linux/Makefile
include/os/linux/spl/Makefile
include/os/linux/spl/rpc/Makefile
include/os/linux/spl/sys/Makefile
include/os/linux/zfs/Makefile
include/os/linux/zfs/sys/Makefile
include/spl/Makefile
include/spl/rpc/Makefile
include/spl/sys/Makefile
include/sys/Makefile
include/sys/fs/Makefile
@@ -63,6 +63,8 @@ EOF
cat <<-"EOF"
ZFS_MODULE_CFLAGS = -I$(srctree)/include/zfs
ZFS_MODULE_CFLAGS += -I$(srctree)/include/zfs/spl
ZFS_MODULE_CFLAGS += -I$(srctree)/include/zfs/os/linux/spl
ZFS_MODULE_CFLAGS += -I$(srctree)/include/zfs/os/linux/zfs
ZFS_MODULE_CFLAGS += -include $(srctree)/include/zfs/zfs_config.h
ZFS_MODULE_CFLAGS += -std=gnu99 -Wno-declaration-after-statement
ZFS_MODULE_CPPFLAGS = -D_KERNEL
@@ -1,4 +1,8 @@
SUBDIRS = linux spl sys
SUBDIRS = sys os

if BUILD_LINUX
SUBDIRS += linux spl
endif

COMMON_H = \
$(top_srcdir)/include/zfeature_common.h \
@@ -0,0 +1,3 @@
if BUILD_LINUX
SUBDIRS = linux
endif
@@ -0,0 +1 @@
SUBDIRS = spl zfs
@@ -0,0 +1 @@
SUBDIRS = rpc sys
@@ -0,0 +1,7 @@
KERNEL_H = \
$(top_srcdir)/include/os/linux/spl/rpc/xdr.h

if CONFIG_KERNEL
kerneldir = @prefix@/src/zfs-$(VERSION)/include/os/linux/spl/rpc
kernel_HEADERS = $(KERNEL_H)
endif
File renamed without changes.
@@ -0,0 +1,57 @@
KERNEL_H = \
$(top_srcdir)/include/os/linux/spl/sys/acl.h \
$(top_srcdir)/include/os/linux/spl/sys/atomic.h \
$(top_srcdir)/include/os/linux/spl/sys/byteorder.h \
$(top_srcdir)/include/os/linux/spl/sys/callb.h \
$(top_srcdir)/include/os/linux/spl/sys/callo.h \
$(top_srcdir)/include/os/linux/spl/sys/cmn_err.h \
$(top_srcdir)/include/os/linux/spl/sys/condvar.h \
$(top_srcdir)/include/os/linux/spl/sys/console.h \
$(top_srcdir)/include/os/linux/spl/sys/cred.h \
$(top_srcdir)/include/os/linux/spl/sys/ctype.h \
$(top_srcdir)/include/os/linux/spl/sys/disp.h \
$(top_srcdir)/include/os/linux/spl/sys/dkio.h \
$(top_srcdir)/include/os/linux/spl/sys/errno.h \
$(top_srcdir)/include/os/linux/spl/sys/fcntl.h \
$(top_srcdir)/include/os/linux/spl/sys/file.h \
$(top_srcdir)/include/os/linux/spl/sys/inttypes.h \
$(top_srcdir)/include/os/linux/spl/sys/isa_defs.h \
$(top_srcdir)/include/os/linux/spl/sys/kmem_cache.h \
$(top_srcdir)/include/os/linux/spl/sys/kmem.h \
$(top_srcdir)/include/os/linux/spl/sys/kobj.h \
$(top_srcdir)/include/os/linux/spl/sys/list.h \
$(top_srcdir)/include/os/linux/spl/sys/mode.h \
$(top_srcdir)/include/os/linux/spl/sys/mutex.h \
$(top_srcdir)/include/os/linux/spl/sys/param.h \
$(top_srcdir)/include/os/linux/spl/sys/processor.h \
$(top_srcdir)/include/os/linux/spl/sys/proc.h \
$(top_srcdir)/include/os/linux/spl/sys/random.h \
$(top_srcdir)/include/os/linux/spl/sys/rwlock.h \
$(top_srcdir)/include/os/linux/spl/sys/shrinker.h \
$(top_srcdir)/include/os/linux/spl/sys/sid.h \
$(top_srcdir)/include/os/linux/spl/sys/signal.h \
$(top_srcdir)/include/os/linux/spl/sys/stat.h \
$(top_srcdir)/include/os/linux/spl/sys/strings.h \
$(top_srcdir)/include/os/linux/spl/sys/sysmacros.h \
$(top_srcdir)/include/os/linux/spl/sys/systeminfo.h \
$(top_srcdir)/include/os/linux/spl/sys/taskq.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/tsd.h \
$(top_srcdir)/include/os/linux/spl/sys/types32.h \
$(top_srcdir)/include/os/linux/spl/sys/types.h \
$(top_srcdir)/include/os/linux/spl/sys/uio.h \
$(top_srcdir)/include/os/linux/spl/sys/user.h \
$(top_srcdir)/include/os/linux/spl/sys/vfs.h \
$(top_srcdir)/include/os/linux/spl/sys/vmem.h \
$(top_srcdir)/include/os/linux/spl/sys/vmsystm.h \
$(top_srcdir)/include/os/linux/spl/sys/vnode.h \
$(top_srcdir)/include/os/linux/spl/sys/wait.h \
$(top_srcdir)/include/os/linux/spl/sys/zmod.h \
$(top_srcdir)/include/os/linux/spl/sys/zone.h

if CONFIG_KERNEL
kerneldir = @prefix@/src/zfs-$(VERSION)/include/os/linux/spl/sys
kernel_HEADERS = $(KERNEL_H)
endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1 @@
SUBDIRS = sys
@@ -0,0 +1,12 @@
KERNEL_H = \
$(top_srcdir)/include/os/linux/zfs/sys/policy.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 \
$(top_srcdir)/include/os/linux/zfs/sys/zfs_vnops.h \
$(top_srcdir)/include/os/linux/zfs/sys/zpl.h

if CONFIG_KERNEL
kerneldir = @prefix@/src/zfs-$(VERSION)/include/os/linux/zfs/sys
kernel_HEADERS = $(KERNEL_H)
endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1 +1 @@
SUBDIRS = rpc sys
SUBDIRS = sys

This file was deleted.

@@ -1,59 +1,8 @@
KERNEL_H = \
$(top_srcdir)/include/spl/sys/acl.h \
$(top_srcdir)/include/spl/sys/atomic.h \
$(top_srcdir)/include/spl/sys/byteorder.h \
$(top_srcdir)/include/spl/sys/callb.h \
$(top_srcdir)/include/spl/sys/callo.h \
$(top_srcdir)/include/spl/sys/cmn_err.h \
$(top_srcdir)/include/spl/sys/condvar.h \
$(top_srcdir)/include/spl/sys/console.h \
$(top_srcdir)/include/spl/sys/cred.h \
$(top_srcdir)/include/spl/sys/ctype.h \
$(top_srcdir)/include/spl/sys/debug.h \
$(top_srcdir)/include/spl/sys/disp.h \
$(top_srcdir)/include/spl/sys/dkio.h \
$(top_srcdir)/include/spl/sys/errno.h \
$(top_srcdir)/include/spl/sys/fcntl.h \
$(top_srcdir)/include/spl/sys/file.h \
$(top_srcdir)/include/spl/sys/inttypes.h \
$(top_srcdir)/include/spl/sys/isa_defs.h \
$(top_srcdir)/include/spl/sys/kmem_cache.h \
$(top_srcdir)/include/spl/sys/kmem.h \
$(top_srcdir)/include/spl/sys/kobj.h \
$(top_srcdir)/include/spl/sys/kstat.h \
$(top_srcdir)/include/spl/sys/list.h \
$(top_srcdir)/include/spl/sys/mode.h \
$(top_srcdir)/include/spl/sys/mutex.h \
$(top_srcdir)/include/spl/sys/param.h \
$(top_srcdir)/include/spl/sys/processor.h \
$(top_srcdir)/include/spl/sys/proc.h \
$(top_srcdir)/include/spl/sys/procfs_list.h \
$(top_srcdir)/include/spl/sys/random.h \
$(top_srcdir)/include/spl/sys/rwlock.h \
$(top_srcdir)/include/spl/sys/shrinker.h \
$(top_srcdir)/include/spl/sys/sid.h \
$(top_srcdir)/include/spl/sys/signal.h \
$(top_srcdir)/include/spl/sys/stat.h \
$(top_srcdir)/include/spl/sys/strings.h \
$(top_srcdir)/include/spl/sys/sunddi.h \
$(top_srcdir)/include/spl/sys/sysmacros.h \
$(top_srcdir)/include/spl/sys/systeminfo.h \
$(top_srcdir)/include/spl/sys/taskq.h \
$(top_srcdir)/include/spl/sys/thread.h \
$(top_srcdir)/include/spl/sys/time.h \
$(top_srcdir)/include/spl/sys/timer.h \
$(top_srcdir)/include/spl/sys/tsd.h \
$(top_srcdir)/include/spl/sys/types32.h \
$(top_srcdir)/include/spl/sys/types.h \
$(top_srcdir)/include/spl/sys/uio.h \
$(top_srcdir)/include/spl/sys/user.h \
$(top_srcdir)/include/spl/sys/vfs.h \
$(top_srcdir)/include/spl/sys/vmem.h \
$(top_srcdir)/include/spl/sys/vmsystm.h \
$(top_srcdir)/include/spl/sys/vnode.h \
$(top_srcdir)/include/spl/sys/wait.h \
$(top_srcdir)/include/spl/sys/zmod.h \
$(top_srcdir)/include/spl/sys/zone.h
$(top_srcdir)/include/spl/sys/sunddi.h

if CONFIG_KERNEL
kerneldir = @prefix@/src/zfs-$(VERSION)/include/spl/sys
@@ -52,7 +52,6 @@ COMMON_H = \
$(top_srcdir)/include/sys/nvpair_impl.h \
$(top_srcdir)/include/sys/objlist.h \
$(top_srcdir)/include/sys/pathname.h \
$(top_srcdir)/include/sys/policy.h \
$(top_srcdir)/include/sys/range_tree.h \
$(top_srcdir)/include/sys/refcount.h \
$(top_srcdir)/include/sys/rrwlock.h \
@@ -116,19 +115,15 @@ COMMON_H = \
$(top_srcdir)/include/sys/zfeature.h \
$(top_srcdir)/include/sys/zfs_acl.h \
$(top_srcdir)/include/sys/zfs_context.h \
$(top_srcdir)/include/sys/zfs_ctldir.h \
$(top_srcdir)/include/sys/zfs_debug.h \
$(top_srcdir)/include/sys/zfs_delay.h \
$(top_srcdir)/include/sys/zfs_dir.h \
$(top_srcdir)/include/sys/zfs_fuid.h \
$(top_srcdir)/include/sys/zfs_project.h \
$(top_srcdir)/include/sys/zfs_ratelimit.h \
$(top_srcdir)/include/sys/zfs_rlock.h \
$(top_srcdir)/include/sys/zfs_sa.h \
$(top_srcdir)/include/sys/zfs_stat.h \
$(top_srcdir)/include/sys/zfs_sysfs.h \
$(top_srcdir)/include/sys/zfs_vfsops.h \
$(top_srcdir)/include/sys/zfs_vnops.h \
$(top_srcdir)/include/sys/zfs_znode.h \
$(top_srcdir)/include/sys/zil.h \
$(top_srcdir)/include/sys/zil_impl.h \
@@ -144,7 +139,6 @@ COMMON_H = \
KERNEL_H = \
$(top_srcdir)/include/sys/zfs_ioctl.h \
$(top_srcdir)/include/sys/zfs_onexit.h \
${top_srcdir}/include/sys/zpl.h \
$(top_srcdir)/include/sys/zvol.h

USER_H =
@@ -13,6 +13,8 @@ ZFS_MODULE_CFLAGS += -std=gnu99 -Wno-declaration-after-statement
ZFS_MODULE_CFLAGS += @KERNEL_DEBUG_CFLAGS@
ZFS_MODULE_CFLAGS += -include @abs_top_builddir@/zfs_config.h
ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include/spl
ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include/os/linux/spl
ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include/os/linux/zfs
ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include

ZFS_MODULE_CPPFLAGS += -D_KERNEL

0 comments on commit 64d0efb

Please sign in to comment.
You can’t perform that action at this time.