]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Update build system and packaging
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 16 Feb 2018 01:53:18 +0000 (17:53 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 29 May 2018 23:00:33 +0000 (16:00 -0700)
Minimal changes required to integrate the SPL sources in to the
ZFS repository build infrastructure and packaging.

Build system and packaging:
  * Renamed SPL_* autoconf m4 macros to ZFS_*.
  * Removed redundant SPL_* autoconf m4 macros.
  * Updated the RPM spec files to remove SPL package dependency.
  * The zfs package obsoletes the spl package, and the zfs-kmod
    package obsoletes the spl-kmod package.
  * The zfs-kmod-devel* packages were updated to add compatibility
    symlinks under /usr/src/spl-x.y.z until all dependent packages
    can be updated.  They will be removed in a future release.
  * Updated copy-builtin script for in-kernel builds.
  * Updated DKMS package to include the spl.ko.
  * Updated stale AUTHORS file to include all contributors.
  * Updated stale COPYRIGHT and included the SPL as an exception.
  * Renamed README.markdown to README.md
  * Renamed OPENSOLARIS.LICENSE to LICENSE.
  * Renamed DISCLAIMER to NOTICE.

Required code changes:
  * Removed redundant HAVE_SPL macro.
  * Removed _BOOT from nvpairs since it doesn't apply for Linux.
  * Initial header cleanup (removal of empty headers, refactoring).
  * Remove SPL repository clone/build from zimport.sh.
  * Use of DEFINE_RATELIMIT_STATE and DEFINE_SPINLOCK removed due
    to build issues when forcing C99 compilation.
  * Replaced legacy ACCESS_ONCE with READ_ONCE.
  * Include needed headers for `current` and `EXPORT_SYMBOL`.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Pavel Zakharov <pavel.zakharov@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
TEST_ZIMPORT_SKIP="yes"
Closes #7556

216 files changed:
AUTHORS
COPYRIGHT
DISCLAIMER [deleted file]
LICENSE [new file with mode: 0644]
Makefile.am
NOTICE [new file with mode: 0644]
OPENSOLARIS.LICENSE [deleted file]
README.markdown [deleted file]
README.md [new file with mode: 0644]
TEST
cmd/mount_zfs/mount_zfs.c
cmd/zed/agents/zfs_diagnosis.c
cmd/zed/agents/zfs_mod.c
cmd/zfs/zfs_iter.c
config/kernel-ctl-table-name.m4
config/kernel-fallocate-pax.m4
config/kernel-group-info.m4
config/kernel-inode-lock.m4
config/kernel-kmem-cache.m4
config/kernel-kuidgid.m4
config/kernel-pde-data.m4
config/kernel-rw.m4
config/kernel-rwsem.m4
config/kernel-sched.m4
config/kernel-set-fs-pwd.m4
config/kernel-shrink.m4
config/kernel-shrinker.m4 [deleted file]
config/kernel-spinlock.m4
config/kernel-timer.m4
config/kernel-trim-unused-symbols.m4 [deleted file]
config/kernel-urange-sleep.m4
config/kernel-vfs-fsync.m4
config/kernel-vfs-getattr.m4
config/kernel-wait.m4
config/kernel-zlib.m4
config/kernel.m4
config/zfs-build.m4
config/zfs-meta.m4
configure.ac
copy-builtin
include/Makefile.am
include/linux/Makefile.am
include/linux/blkdev_compat.h
include/linux/compiler_compat.h [new file with mode: 0644]
include/spl/Makefile.am [new file with mode: 0644]
include/spl/rpc/Makefile.am [new file with mode: 0644]
include/spl/sys/Makefile.am [new file with mode: 0644]
include/spl/sys/debug.h
include/spl/sys/errno.h [new file with mode: 0644]
include/spl/sys/mutex.h
include/spl/sys/rwlock.h
include/spl/sys/sysmacros.h
include/spl/sys/types.h
include/spl/sys/vnode.h
include/sys/Makefile.am
include/sys/abd.h
include/sys/fm/protocol.h
include/sys/note.h [new file with mode: 0644]
include/sys/nvpair.h
include/sys/xvattr.h
include/sys/zfs_context.h
include/sys/zfs_delay.h
include/sys/zfs_fuid.h
include/sys/zfs_znode.h
include/sys/zpl.h
lib/libefi/rdwr_efi.c
lib/libnvpair/libnvpair.c
lib/libshare/nfs.c
lib/libshare/smb.c
lib/libspl/include/Makefile.am
lib/libspl/include/attr.h [deleted file]
lib/libspl/include/note.h [deleted file]
lib/libspl/include/strings.h [deleted file]
lib/libspl/include/sys/Makefile.am
lib/libspl/include/sys/compress.h [deleted file]
lib/libspl/include/sys/note.h [deleted file]
lib/libspl/include/sys/stdtypes.h [new file with mode: 0644]
lib/libspl/include/sys/strings.h [new file with mode: 0644]
lib/libspl/include/sys/sysmacros.h
lib/libspl/include/sys/systm.h [deleted file]
lib/libspl/include/sys/types.h
lib/libspl/include/sys/types32.h
lib/libspl/include/umem.h
lib/libuutil/uu_dprintf.c
lib/libzfs/libzfs_diff.c
man/man1/zhack.1
man/man5/Makefile.am
module/Makefile.in
module/avl/avl.c
module/icp/algs/edonr/edonr.c
module/icp/algs/edonr/edonr_byteorder.h
module/icp/algs/skein/skein.c
module/icp/algs/skein/skein_impl.h
module/icp/algs/skein/skein_port.h
module/icp/api/kcf_cipher.c
module/icp/api/kcf_ctxops.c
module/icp/api/kcf_digest.c
module/icp/api/kcf_mac.c
module/icp/api/kcf_miscapi.c
module/icp/illumos-crypto.c
module/icp/io/edonr_mod.c
module/icp/io/skein_mod.c
module/lua/lapi.c
module/lua/lauxlib.c
module/lua/lbaselib.c
module/lua/lcorolib.c
module/lua/lstrlib.c
module/lua/ltablib.c
module/nvpair/fnvpair.c
module/nvpair/nvpair.c
module/nvpair/nvpair_alloc_fixed.c
module/spl/Makefile.in [new file with mode: 0644]
module/spl/README.md [new file with mode: 0644]
module/spl/spl-condvar.c
module/spl/spl-err.c
module/spl/spl-generic.c
module/spl/spl-kmem.c
module/spl/spl-rwlock.c
module/spl/spl-taskq.c
module/spl/spl-vnode.c
module/spl/spl-xdr.c
module/unicode/u8_textprep.c
module/unicode/uconv.c
module/zcommon/zfeature_common.c
module/zcommon/zfs_comutil.c
module/zcommon/zfs_deleg.c
module/zcommon/zfs_fletcher.c
module/zcommon/zfs_fletcher_aarch64_neon.c
module/zcommon/zfs_fletcher_avx512.c
module/zcommon/zfs_fletcher_intel.c
module/zcommon/zfs_fletcher_sse.c
module/zcommon/zfs_fletcher_superscalar.c
module/zcommon/zfs_fletcher_superscalar4.c
module/zcommon/zfs_namecheck.c
module/zcommon/zfs_prop.c
module/zcommon/zfs_uio.c
module/zcommon/zpool_prop.c
module/zcommon/zprop_common.c
module/zfs/abd.c
module/zfs/arc.c
module/zfs/dbuf.c
module/zfs/dbuf_stats.c
module/zfs/ddt.c
module/zfs/ddt_zap.c
module/zfs/dmu.c
module/zfs/dmu_object.c
module/zfs/dmu_objset.c
module/zfs/dmu_traverse.c
module/zfs/dmu_tx.c
module/zfs/dmu_zfetch.c
module/zfs/dsl_dataset.c
module/zfs/dsl_deleg.c
module/zfs/dsl_destroy.c
module/zfs/dsl_dir.c
module/zfs/dsl_pool.c
module/zfs/dsl_prop.c
module/zfs/dsl_scan.c
module/zfs/dsl_synctask.c
module/zfs/fm.c
module/zfs/gzip.c
module/zfs/metaslab.c
module/zfs/mmp.c
module/zfs/multilist.c
module/zfs/pathname.c
module/zfs/sa.c
module/zfs/spa.c
module/zfs/spa_config.c
module/zfs/spa_errlog.c
module/zfs/spa_history.c
module/zfs/spa_misc.c
module/zfs/spa_stats.c
module/zfs/txg.c
module/zfs/vdev.c
module/zfs/vdev_cache.c
module/zfs/vdev_disk.c
module/zfs/vdev_indirect.c
module/zfs/vdev_indirect_births.c
module/zfs/vdev_indirect_mapping.c
module/zfs/vdev_mirror.c
module/zfs/vdev_queue.c
module/zfs/vdev_raidz_math.c
module/zfs/vdev_removal.c
module/zfs/zap_micro.c
module/zfs/zcp.c
module/zfs/zfs_acl.c
module/zfs/zfs_byteswap.c
module/zfs/zfs_ctldir.c
module/zfs/zfs_dir.c
module/zfs/zfs_fm.c
module/zfs/zfs_fuid.c
module/zfs/zfs_ioctl.c
module/zfs/zfs_log.c
module/zfs/zfs_onexit.c
module/zfs/zfs_replay.c
module/zfs/zfs_rlock.c
module/zfs/zfs_vfsops.c
module/zfs/zfs_vnops.c
module/zfs/zfs_znode.c
module/zfs/zil.c
module/zfs/zio.c
module/zfs/zio_compress.c
module/zfs/zio_crypt.c
module/zfs/zio_inject.c
module/zfs/zpl_file.c
module/zfs/zpl_xattr.c
module/zfs/zrlock.c
rpm/generic/zfs-dkms.spec.in
rpm/generic/zfs-kmod.spec.in
rpm/generic/zfs.spec.in
rpm/redhat/zfs-kmod.spec.in
scripts/Makefile.am
scripts/dkms.mkconf
scripts/kmodtool
scripts/zfs.sh
scripts/zimport.sh
tests/zfs-tests/tests/functional/checksum/edonr_test.c

diff --git a/AUTHORS b/AUTHORS
index cf5c808e3e4d91d403070ae2f3a8b58e7e4662b2..8314a1c21472d30990a6f1ba4370cdaabcff09e1 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
-Brian Behlendorf is the principal developer of the ZFS on Linux port.
-He works full time as a computer scientist at Lawrence Livermore
-National Laboratory on the ZFS and Lustre filesystems.  However,
-this port would not have been possible without the help of many
-others who have contributed their time, effort, and insight.
+MAINTAINERS:
 
-  Brian Behlendorf <behlendorf1@llnl.gov>
+    Brian Behlendorf <behlendorf1@llnl.gov>
+    Tony Hutter <hutter2@llnl.gov>
 
-First and foremost the hard working ZFS developers at Sun/Oracle.
-They are responsible for the bulk of the code in this project and
-without their efforts there never would have been a ZFS filesystem.
+PAST MAINTAINERS:
 
-  The ZFS Development Team at Sun/Oracle
+    Ned Bass <bass6@llnl.gov>
 
-Next all the developers at KQ Infotech who implemented a prototype
-ZFS Posix Layer (ZPL).  Their implementation provided an excellent
-reference for adding the ZPL functionality.
+CONTRIBUTORS:
 
-  Anand Mitra <mitra@kqinfotech.com>
-  Anurag Agarwal <anurag@kqinfotech.com>
-  Neependra Khare <neependra@kqinfotech.com>
-  Prasad Joshi <prasad@kqinfotech.com>
-  Rohan Puri <rohan@kqinfotech.com>
-  Sandip Divekar <sandipd@kqinfotech.com>
-  Shoaib <shoaib@kqinfotech.com>
-  Shrirang <shrirang@kqinfotech.com>
-
-Additionally the following individuals have all made contributions
-to the project and deserve to be acknowledged.
-
-  Albert Lee <trisk@nexenta.com>
-  Alejandro R. Sedeño <asedeno@mit.edu>
-  Alex Zhuravlev <bzzz@whamcloud.com>
-  Alexander Eremin <a.eremin@nexenta.com>
-  Alexander Stetsenko <ams@nexenta.com>
-  Alexey Shvetsov <alexxy@gentoo.org>
-  Andreas Dilger <adilger@whamcloud.com>
-  Andrew Reid <ColdCanuck@nailedtotheperch.com>
-  Andrew Stormont <andrew.stormont@nexenta.com>
-  Andrew Tselischev <andrewtselischev@gmail.com>
-  Andriy Gapon <avg@FreeBSD.org>
-  Aniruddha Shankar <k@191a.net>
-  Bill Pijewski <wdp@joyent.com>
-  Chris Dunlap <cdunlap@llnl.gov>
-  Chris Dunlop <chris@onthe.net.au>
-  Chris Siden <chris.siden@delphix.com>
-  Chris Wedgwood <cw@f00f.org>
-  Christian Kohlschütter <christian@kohlschutter.com>
-  Christopher Siden <chris.siden@delphix.com>
-  Craig Sanders <github@taz.net.au>
-  Cyril Plisko <cyril.plisko@mountall.com>
-  Dan McDonald <danmcd@nexenta.com>
-  Daniel Verite <daniel@verite.pro>
-  Darik Horn <dajhorn@vanadac.com>
-  Eric Schrock <Eric.Schrock@delphix.com>
-  Etienne Dechamps <etienne.dechamps@ovh.net>
-  Fajar A. Nugraha <github@fajar.net>
-  Frederik Wessels <wessels147@gmail.com>
-  Garrett D'Amore <garrett@nexenta.com>
-  George Wilson <george.wilson@delphix.com>
-  Gordon Ross <gwr@nexenta.com>
-  Gregor Kopka <mailfrom-github.com@kopka.net>
-  Gunnar Beutner <gunnar@beutner.name>
-  James H <james@kagisoft.co.uk>
-  Javen Wu <wu.javen@gmail.com>
-  Jeremy Gill <jgill@parallax-innovations.com>
-  Jorgen Lundman <lundman@lundman.net>
-  KORN Andras <korn@elan.rulez.org>
-  Kyle Fuller <inbox@kylefuller.co.uk>
-  Manuel Amador (Rudd-O) <rudd-o@rudd-o.com>
-  Martin Matuska <mm@FreeBSD.org>
-  Massimo Maggi <massimo@mmmm.it>
-  Matthew Ahrens <mahrens@delphix.com>
-  Michael Martin <mgmartin.mgm@gmail.com>
-  Mike Harsch <mike@harschsystems.com>
-  Ned Bass <bass6@llnl.gov>
-  Oleg Stepura <oleg@stepura.com>
-  P.SCH <p88@yahoo.com>
-  Pawel Jakub Dawidek <pawel@dawidek.net>
-  Prakash Surya <surya1@llnl.gov>
-  Prasad Joshi <pjoshi@stec-inc.com>
-  Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
-  Richard Laager <rlaager@wiktel.com>
-  Richard Lowe <richlowe@richlowe.net>
-  Richard Yao <ryao@cs.stonybrook.edu>
-  Rohan Puri <rohan.puri15@gmail.com>
-  Shampavman <sham.pavman@nexenta.com>
-  Simon Klinkert <klinkert@webgods.de>
-  Suman Chakravartula <suman@gogrid.com>
-  Tim Haley <Tim.Haley@Sun.COM>
-  Turbo Fredriksson <turbo@bayour.com>
-  Xin Li <delphij@FreeBSD.org>
-  Yuxuan Shui <yshuiv7@gmail.com>
-  Zachary Bedell <zac@thebedells.org>
-  nordaux <nordaux@gmail.com>
+    Aaron Fineman <abyxcos@gmail.com>
+    Adam Leventhal <ahl@delphix.com>
+    Adam Stevko <adam.stevko@gmail.com>
+    Ahmed G <ahmedg@delphix.com>
+    Akash Ayare <aayare@delphix.com>
+    Alan Somers <asomers@gmail.com>
+    Alar Aun <spamtoaun@gmail.com>
+    Albert Lee <trisk@nexenta.com>
+    Alec Salazar <alec.j.salazar@gmail.com>
+    Alejandro R. Sedeño <asedeno@mit.edu>
+    Alek Pinchuk <alek@nexenta.com>
+    Alex Braunegg <alex.braunegg@gmail.com>
+    Alex McWhirter <alexmcwhirter@triadic.us>
+    Alex Reece <alex@delphix.com>
+    Alex Wilson <alex.wilson@joyent.com>
+    Alex Zhuravlev <alexey.zhuravlev@intel.com>
+    Alexander Eremin <a.eremin@nexenta.com>
+    Alexander Motin <mav@freebsd.org>
+    Alexander Pyhalov <apyhalov@gmail.com>
+    Alexander Stetsenko <ams@nexenta.com>
+    Alexey Shvetsov <alexxy@gentoo.org>
+    Alexey Smirnoff <fling@member.fsf.org>
+    Allan Jude <allanjude@freebsd.org>
+    AndCycle <andcycle@andcycle.idv.tw>
+    Andreas Buschmann <andreas.buschmann@tech.net.de>
+    Andreas Dilger <adilger@intel.com>
+    Andrew Barnes <barnes333@gmail.com>
+    Andrew Hamilton <ahamilto@tjhsst.edu>
+    Andrew Reid <ColdCanuck@nailedtotheperch.com>
+    Andrew Stormont <andrew.stormont@nexenta.com>
+    Andrew Tselischev <andrewtselischev@gmail.com>
+    Andrey Vesnovaty <andrey.vesnovaty@gmail.com>
+    Andriy Gapon <avg@freebsd.org>
+    Andy Bakun <github@thwartedefforts.org>
+    Aniruddha Shankar <k@191a.net>
+    Antonio Russo <antonio.e.russo@gmail.com>
+    Arkadiusz BubaÅ‚a <arkadiusz.bubala@open-e.com>
+    Arne Jansen <arne@die-jansens.de>
+    Aron Xu <happyaron.xu@gmail.com>
+    Bart Coddens <bart.coddens@gmail.com>
+    Basil Crow <basil.crow@delphix.com>
+    Huang Liu <liu.huang@zte.com.cn>
+    Ben Allen <bsallen@alcf.anl.gov>
+    Ben Rubson <ben.rubson@gmail.com>
+    Benjamin Albrecht <git@albrecht.io>
+    Bill McGonigle <bill-github.com-public1@bfccomputing.com>
+    Bill Pijewski <wdp@joyent.com>
+    Boris Protopopov <boris.protopopov@nexenta.com>
+    Brad Lewis <brad.lewis@delphix.com>
+    Brian Behlendorf <behlendorf1@llnl.gov>
+    Brian J. Murrell <brian@sun.com>
+    Caleb James DeLisle <calebdelisle@lavabit.com>
+    Cao Xuewen <cao.xuewen@zte.com.cn>
+    Carlo Landmeter <clandmeter@gmail.com>
+    Carlos Alberto Lopez Perez <clopez@igalia.com>
+    Chaoyu Zhang <zhang.chaoyu@zte.com.cn>
+    Chen Can <chen.can2@zte.com.cn>
+    Chen Haiquan <oc@yunify.com>
+    Chip Parker <aparker@enthought.com>
+    Chris Burroughs <chris.burroughs@gmail.com>
+    Chris Dunlap <cdunlap@llnl.gov>
+    Chris Dunlop <chris@onthe.net.au>
+    Chris Siden <chris.siden@delphix.com>
+    Chris Wedgwood <cw@f00f.org>
+    Chris Williamson <chris.williamson@delphix.com>
+    Chris Zubrzycki <github@mid-earth.net>
+    Christ Schlacta <aarcane@aarcane.info>
+    Christer Ekholm <che@chrekh.se>
+    Christian Kohlschütter <christian@kohlschutter.com>
+    Christian Neukirchen <chneukirchen@gmail.com>
+    Christian Schwarz <me@cschwarz.com>
+    Christopher Voltz <cjunk@voltz.ws>
+    Chunwei Chen <david.chen@nutanix.com>
+    Clemens Fruhwirth <clemens@endorphin.org>
+    Colin Ian King <colin.king@canonical.com>
+    Craig Loomis <cloomis@astro.princeton.edu>
+    Craig Sanders <github@taz.net.au>
+    Cyril Plisko <cyril.plisko@infinidat.com>
+    DHE <git@dehacked.net>
+    Damian WojsÅ‚aw <damian@wojslaw.pl>
+    Dan Kimmel <dan.kimmel@delphix.com>
+    Dan McDonald <danmcd@nexenta.com>
+    Dan Swartzendruber <dswartz@druber.com>
+    Dan Vatca <dan.vatca@gmail.com>
+    Daniel Hoffman <dj.hoffman@delphix.com>
+    Daniel Verite <daniel@verite.pro>
+    Daniil Lunev <d.lunev.mail@gmail.com>
+    Darik Horn <dajhorn@vanadac.com>
+    Dave Eddy <dave@daveeddy.com>
+    David Lamparter <equinox@diac24.net>
+    David Qian <david.qian@intel.com>
+    David Quigley <david.quigley@intel.com>
+    Debabrata Banerjee <dbanerje@akamai.com>
+    Denys Rtveliashvili <denys@rtveliashvili.name>
+    Derek Dai <daiderek@gmail.com>
+    Dimitri John Ledkov <xnox@ubuntu.com>
+    Dmitry Khasanov <pik4ez@gmail.com>
+    Dominik Hassler <hadfl@omniosce.org>
+    Dominik Honnef <dominikh@fork-bomb.org>
+    Don Brady <don.brady@delphix.com>
+    Dr. András Korn <korn-github.com@elan.rulez.org>
+    Eli Rosenthal <eli.rosenthal@delphix.com>
+    Eric Desrochers <eric.desrochers@canonical.com>
+    Eric Dillmann <eric@jave.fr>
+    Eric Schrock <Eric.Schrock@delphix.com>
+    Etienne Dechamps <etienne@edechamps.fr>
+    Evan Susarret <evansus@gmail.com>
+    Fabian Grünbichler <f.gruenbichler@proxmox.com>
+    Fajar A. Nugraha <github@fajar.net>
+    Fan Yong <fan.yong@intel.com>
+    Feng Sun <loyou85@gmail.com>
+    Frederik Wessels <wessels147@gmail.com>
+    Frédéric Vanniere <f.vanniere@planet-work.com>
+    Garrett D'Amore <garrett@nexenta.com>
+    Garrison Jensen <garrison.jensen@gmail.com>
+    Gary Mills <gary_mills@fastmail.fm>
+    Gaurav Kumar  <gauravk.18@gmail.com>
+    GeLiXin <ge.lixin@zte.com.cn>
+    George Amanakis <g_amanakis@yahoo.com>
+    George Melikov <mail@gmelikov.ru>
+    George Wilson <gwilson@delphix.com>
+    Georgy Yakovlev <ya@sysdump.net>
+    Giuseppe Di Natale <guss80@gmail.com>
+    Gordan Bobic <gordan@redsleeve.org>
+    Gordon Ross <gwr@nexenta.com>
+    Gregor Kopka <gregor@kopka.net>
+    Grischa Zengel <github.zfsonlinux@zengel.info>
+    Gunnar Beutner <gunnar@beutner.name>
+    Gvozden Neskovic <neskovic@gmail.com>
+    Hajo Möller <dasjoe@gmail.com>
+    Hans Rosenfeld <hans.rosenfeld@nexenta.com>
+    HÃ¥kan Johansson <f96hajo@chalmers.se>
+    Igor Kozhukhov <ikozhukhov@gmail.com>
+    Igor Lvovsky <ilvovsky@gmail.com>
+    Isaac Huang <he.huang@intel.com>
+    JK Dingwall <james@dingwall.me.uk>
+    Jacek FefliÅ„ski <feflik@gmail.com>
+    James Cowgill <james.cowgill@mips.com>
+    James Lee <jlee@thestaticvoid.com>
+    James Pan <jiaming.pan@yahoo.com>
+    Jan Engelhardt <jengelh@inai.de>
+    Jan Kryl <jan.kryl@nexenta.com>
+    Jan Sanislo <oystr@cs.washington.edu>
+    Jason King <jason.brian.king@gmail.com>
+    Jason Zaman <jasonzaman@gmail.com>
+    Javen Wu <wu.javen@gmail.com>
+    Jeremy Gill <jgill@parallax-innovations.com>
+    Jeremy Jones <jeremy@delphix.com>
+    Jerry Jelinek <jerry.jelinek@joyent.com>
+    Jinshan Xiong <jinshan.xiong@intel.com>
+    Joe Stein <joe.stein@delphix.com>
+    John Albietz <inthecloud247@gmail.com>
+    John Eismeier <john.eismeier@gmail.com>
+    John L. Hammond <john.hammond@intel.com>
+    John Layman <jlayman@sagecloud.com>
+    John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
+    John Wren Kennedy <john.kennedy@delphix.com>
+    Johnny Stenback <github@jstenback.com>
+    Jorgen Lundman <lundman@lundman.net>
+    Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
+    Joshua M. Clulow <josh@sysmgr.org>
+    Justin BedÅ‘ <cu@cua0.org>
+    Justin Lecher <jlec@gentoo.org>
+    Justin T. Gibbs <gibbs@FreeBSD.org>
+    Jörg Thalheim <joerg@higgsboson.tk>
+    KORN Andras <korn@elan.rulez.org>
+    Kamil DomaÅ„ski <kamil@domanski.co>
+    Karsten Kretschmer <kkretschmer@gmail.com>
+    Kash Pande <kash@tripleback.net>
+    Keith M Wesolowski <wesolows@foobazco.org>
+    Kevin Tanguy <kevin.tanguy@ovh.net>
+    KireinaHoro <i@jsteward.moe>
+    Kohsuke Kawaguchi <kk@kohsuke.org>
+    Kyle Blatter <kyleblatter@llnl.gov>
+    Kyle Fuller <inbox@kylefuller.co.uk>
+    Loli <ezomori.nozomu@gmail.com>
+    Lars Johannsen <laj@it.dk>
+    Li Dongyang <dongyang.li@anu.edu.au>
+    Li Wei <W.Li@Sun.COM>
+    Lukas Wunner <lukas@wunner.de>
+    Madhav Suresh <madhav.suresh@delphix.com>
+    Manoj Joseph <manoj.joseph@delphix.com>
+    Manuel Amador (Rudd-O) <rudd-o@rudd-o.com>
+    Marcel Huber <marcelhuberfoo@gmail.com>
+    Marcel Telka <marcel.telka@nexenta.com>
+    Marcel Wysocki <maci.stgn@gmail.com>
+    Mark Shellenbaum <Mark.Shellenbaum@Oracle.COM>
+    Mark Wright <markwright@internode.on.net>
+    Martin Matuska <mm@FreeBSD.org>
+    Massimo Maggi <me@massimo-maggi.eu>
+    Matt Johnston <matt@fugro-fsi.com.au>
+    Matt Kemp <matt@mattikus.com>
+    Matthew Ahrens <matt@delphix.com>
+    Matthew Thode <mthode@mthode.org>
+    Matus Kral <matuskral@me.com>
+    Max Grossman <max.grossman@delphix.com>
+    Maximilian Mehnert <maximilian.mehnert@gmx.de>
+    Michael Gebetsroither <michael@mgeb.org>
+    Michael Kjorling <michael@kjorling.se>
+    Michael Martin <mgmartin.mgm@gmail.com>
+    Mike Gerdts <mike.gerdts@joyent.com>
+    Mike Harsch <mike@harschsystems.com>
+    Mike Leddy <mike.leddy@gmail.com>
+    Mike Swanson <mikeonthecomputer@gmail.com>
+    Milan Jurik <milan.jurik@xylab.cz>
+    Morgan Jones <mjones@rice.edu>
+    Moritz Maxeiner <moritz@ucworks.org>
+    Nathaniel Clark <Nathaniel.Clark@misrule.us>
+    Nathaniel Wesley Filardo <nwf@cs.jhu.edu>
+    Nav Ravindranath <nav@delphix.com>
+    Neal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
+    Ned Bass <bass6@llnl.gov>
+    Neependra Khare <neependra@kqinfotech.com>
+    Neil Stockbridge <neil@dist.ro>
+    Nick Garvey <garvey.nick@gmail.com>
+    Nikolay Borisov <n.borisov.lkml@gmail.com>
+    Olaf Faaland <faaland1@llnl.gov>
+    Oleg Drokin <green@linuxhacker.ru>
+    Oleg Stepura <oleg@stepura.com>
+    Patrik Greco <sikevux@sikevux.se>
+    Paul B. Henson <henson@acm.org>
+    Paul Dagnelie <pcd@delphix.com>
+    Paul Zuchowski <pzuchowski@datto.com>
+    Pavel Boldin <boldin.pavel@gmail.com>
+    Pavel Zakharov <pavel.zakharov@delphix.com>
+    Pawel Jakub Dawidek <pjd@FreeBSD.org>
+    Pedro Giffuni <pfg@freebsd.org>
+    Peng <peng.hse@xtaotech.com>
+    Peter Ashford <ashford@accs.com>
+    Prakash Surya <prakash.surya@delphix.com>
+    Prasad Joshi <prasadjoshi124@gmail.com>
+    Ralf Ertzinger <ralf@skytale.net>
+    Randall Mason <ClashTheBunny@gmail.com>
+    Remy Blank <remy.blank@pobox.com>
+    Ricardo M. Correia <ricardo.correia@oracle.com>
+    Rich Ercolani <rincebrain@gmail.com>
+    Richard Elling <Richard.Elling@RichardElling.com>
+    Richard Laager <rlaager@wiktel.com>
+    Richard Lowe <richlowe@richlowe.net>
+    Richard Sharpe <rsharpe@samba.org>
+    Richard Yao <ryao@gentoo.org>
+    Rohan Puri <rohan.puri15@gmail.com>
+    Romain Dolbeau <romain.dolbeau@atos.net>
+    Roman Strashkin <roman.strashkin@nexenta.com>
+    Ruben Kerkhof <ruben@rubenkerkhof.com>
+    Saso Kiselkov <saso.kiselkov@nexenta.com>
+    Scot W. Stevenson <scot.stevenson@gmail.com>
+    Sean Eric Fagan <sef@ixsystems.com>
+    Sen Haerens <sen@senhaerens.be>
+    Serapheim Dimitropoulos <serapheim@delphix.com>
+    Seth Forshee <seth.forshee@canonical.com>
+    Shampavman <sham.pavman@nexenta.com>
+    Shen Yan <shenyanxxxy@qq.com>
+    Simon Guest <simon.guest@tesujimath.org>
+    Simon Klinkert <simon.klinkert@gmail.com>
+    Sowrabha Gopal <sowrabha.gopal@delphix.com>
+    Stanislav Seletskiy <s.seletskiy@gmail.com>
+    Steffen Müthing <steffen.muething@iwr.uni-heidelberg.de>
+    Stephen Blinick <stephen.blinick@delphix.com>
+    Steve Dougherty <sdougherty@barracuda.com>
+    Steven Burgess <sburgess@dattobackup.com>
+    Steven Hartland <smh@freebsd.org>
+    Steven Johnson <sjohnson@sakuraindustries.com>
+    Stian Ellingsen <stian@plaimi.net>
+    Suman Chakravartula <schakrava@gmail.com>
+    Sydney Vanda <sydney.m.vanda@intel.com>
+    Sören Tempel <soeren+git@soeren-tempel.net>
+    Thijs Cramer <thijs.cramer@gmail.com>
+    Tim Chase <tim@chase2k.com>
+    Tim Connors <tconnors@rather.puzzling.org>
+    Tim Crawford <tcrawford@datto.com>
+    Tim Haley <Tim.Haley@Sun.COM>
+    Tobin Harding <me@tobin.cc>
+    Tom Caputi <tcaputi@datto.com>
+    Tom Matthews <tom@axiom-partners.com>
+    Tom Prince <tom.prince@ualberta.net>
+    Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
+    Tony Hutter <hutter2@llnl.gov>
+    Toomas Soome <tsoome@me.com>
+    Trey Dockendorf <treydock@gmail.com>
+    Turbo Fredriksson <turbo@bayour.com>
+    Tyler J. Stachecki <stachecki.tyler@gmail.com>
+    Vitaut Bajaryn <vitaut.bayaryn@gmail.com>
+    Weigang Li <weigang.li@intel.com>
+    Will Andrews <will@freebsd.org>
+    Will Rouesnel <w.rouesnel@gmail.com>
+    Wolfgang Bumiller <w.bumiller@proxmox.com>
+    Xin Li <delphij@FreeBSD.org>
+    Ying Zhu <casualfisher@gmail.com>
+    YunQiang Su <syq@debian.org>
+    Yuri Pankov <yuri.pankov@gmail.com>
+    Yuxuan Shui <yshuiv7@gmail.com>
+    Zachary Bedell <zac@thebedells.org>
index 9b94f927fe1b5eb781829ca6b55a58c4e8fed58f..54fbceade1e4dfffbad1b5726554da67861b6b76 100644 (file)
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,39 +1,27 @@
-The majority of the code in the ZFS on Linux port comes from OpenSolaris
-which has been released under the terms of the CDDL open source license.
-This includes the core ZFS code, libavl, libnvpair, libefi, libunicode,
-and libutil.  The original OpenSolaris source can be downloaded from:
-
-http://dlc.sun.com/osol/on/downloads/b121/on-src.tar.bz2
-
-Files which do not originate from OpenSolaris are noted in the file header
-and attributed properly.  These exceptions include, but are not limited
-to, the vdev_disk.c and zvol.c implementation which are licensed under
-the CDDL.
-
-The latest stable and development versions of this port can be downloaded
-from the official ZFS on Linux site located at:
+Refer to the git commit log for authoritative copyright attribution.
 
-http://zfsonlinux.org/
+The original ZFS source code was obtained from Open Solaris which was
+released under the terms of the CDDL open source license.  Additional
+changes have been included from OpenZFS and the Illumos project which
+are similarly licensed.  These projects can be found on Github at:
 
-This ZFS on Linux port was produced at the Lawrence Livermore National
-Laboratory (LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44)
-between the U.S. Department of Energy (DOE) and Lawrence Livermore
-National Security, LLC (LLNS) for the operation of LLNL.  It has been
-approved for release under LLNL-CODE-403049.
+  * https://github.com/illumos/illumos-gate
+  * https://github.com/openzfs/openzfs
 
 Unless otherwise noted, all files in this distribution are released
 under the Common Development and Distribution License (CDDL).
-Exceptions are noted within the associated source files.  A few notable
-exceptions and their respective licenses include:
 
-Skein Checksum Implementation: module/icp/algs/skein/THIRDPARTYLICENSE
-AES Implementation: module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.gladman
-AES Implementation: module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.openssl
-PBKDF2 Implementation: lib/libzfs/THIRDPARTYLICENSE.openssl
+Exceptions are noted within the associated source files headers and
+by including a THIRDPARTYLICENSE file with the license terms.  A few
+notable exceptions and their respective licenses include:
+
+  * Skein Checksum Implementation: module/icp/algs/skein/THIRDPARTYLICENSE
+  * AES Implementation: module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.gladman
+  * AES Implementation: module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.openssl
+  * PBKDF2 Implementation: lib/libzfs/THIRDPARTYLICENSE.openssl
+  * SPL Implementation: module/spl/THIRDPARTYLICENSE.gplv2
 
 This product includes software developed by the OpenSSL Project for use
 in the OpenSSL Toolkit (http://www.openssl.org/)
 
-See the file OPENSOLARIS.LICENSE for more information.
-
-Refer to the git commit log for authoritative copyright attribution.
+See the LICENSE and NOTICE for more information.
diff --git a/DISCLAIMER b/DISCLAIMER
deleted file mode 100644 (file)
index a0af1ef..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-This work was produced at the Lawrence Livermore National Laboratory
-(LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between
-the U.S. Department of Energy (DOE) and Lawrence Livermore National
-Security, LLC (LLNS) for the operation of LLNL.
-
-This work was prepared as an account of work sponsored by an agency of
-the United States Government.  Neither the United States Government nor
-Lawrence Livermore National Security, LLC nor any of their employees,
-makes any warranty, express or implied, or assumes any liability or
-responsibility for the accuracy, completeness, or usefulness of any
-information, apparatus, product, or process disclosed, or represents
-that its use would not infringe privately-owned rights.
-
-Reference herein to any specific commercial products, process, or
-services by trade name, trademark, manufacturer or otherwise does
-not necessarily constitute or imply its endorsement, recommendation,
-or favoring by the United States Government or Lawrence Livermore
-National Security, LLC.  The views and opinions of authors expressed
-herein do not necessarily state or reflect those of the United States
-Government or Lawrence Livermore National Security, LLC, and shall
-not be used for advertising or product endorsement purposes.
-
-The precise terms and conditions for copying, distribution, and
-modification are specified in the file OPENSOLARIS.LICENSE.
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..da23621
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,384 @@
+Unless otherwise noted, all files in this distribution are released
+under the Common Development and Distribution License (CDDL).
+Exceptions are noted within the associated source files.
+
+--------------------------------------------------------------------
+
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE Version 1.0
+
+1. Definitions.
+
+    1.1. "Contributor" means each individual or entity that creates
+         or contributes to the creation of Modifications.
+
+    1.2. "Contributor Version" means the combination of the Original
+         Software, prior Modifications used by a Contributor (if any),
+         and the Modifications made by that particular Contributor.
+
+    1.3. "Covered Software" means (a) the Original Software, or (b)
+         Modifications, or (c) the combination of files containing
+         Original Software with files containing Modifications, in
+         each case including portions thereof.
+
+    1.4. "Executable" means the Covered Software in any form other
+         than Source Code.
+
+    1.5. "Initial Developer" means the individual or entity that first
+         makes Original Software available under this License.
+
+    1.6. "Larger Work" means a work which combines Covered Software or
+         portions thereof with code not governed by the terms of this
+         License.
+
+    1.7. "License" means this document.
+
+    1.8. "Licensable" means having the right to grant, to the maximum
+         extent possible, whether at the time of the initial grant or
+         subsequently acquired, any and all of the rights conveyed
+         herein.
+
+    1.9. "Modifications" means the Source Code and Executable form of
+         any of the following:
+
+        A. Any file that results from an addition to, deletion from or
+           modification of the contents of a file containing Original
+           Software or previous Modifications;
+
+        B. Any new file that contains any part of the Original
+           Software or previous Modifications; or
+
+        C. Any new file that is contributed or otherwise made
+           available under the terms of this License.
+
+    1.10. "Original Software" means the Source Code and Executable
+          form of computer software code that is originally released
+          under this License.
+
+    1.11. "Patent Claims" means any patent claim(s), now owned or
+          hereafter acquired, including without limitation, method,
+          process, and apparatus claims, in any patent Licensable by
+          grantor.
+
+    1.12. "Source Code" means (a) the common form of computer software
+          code in which modifications are made and (b) associated
+          documentation included in or with such code.
+
+    1.13. "You" (or "Your") means an individual or a legal entity
+          exercising rights under, and complying with all of the terms
+          of, this License.  For legal entities, "You" includes any
+          entity which controls, is controlled by, or is under common
+          control with You.  For purposes of this definition,
+          "control" means (a) the power, direct or indirect, to cause
+          the direction or management of such entity, whether by
+          contract or otherwise, or (b) ownership of more than fifty
+          percent (50%) of the outstanding shares or beneficial
+          ownership of such entity.
+
+2. License Grants.
+
+    2.1. The Initial Developer Grant.
+
+    Conditioned upon Your compliance with Section 3.1 below and
+    subject to third party intellectual property claims, the Initial
+    Developer hereby grants You a world-wide, royalty-free,
+    non-exclusive license:
+
+        (a) under intellectual property rights (other than patent or
+            trademark) Licensable by Initial Developer, to use,
+            reproduce, modify, display, perform, sublicense and
+            distribute the Original Software (or portions thereof),
+            with or without Modifications, and/or as part of a Larger
+            Work; and
+
+        (b) under Patent Claims infringed by the making, using or
+            selling of Original Software, to make, have made, use,
+            practice, sell, and offer for sale, and/or otherwise
+            dispose of the Original Software (or portions thereof).
+
+        (c) The licenses granted in Sections 2.1(a) and (b) are
+            effective on the date Initial Developer first distributes
+            or otherwise makes the Original Software available to a
+            third party under the terms of this License.
+
+        (d) Notwithstanding Section 2.1(b) above, no patent license is
+            granted: (1) for code that You delete from the Original
+            Software, or (2) for infringements caused by: (i) the
+            modification of the Original Software, or (ii) the
+            combination of the Original Software with other software
+            or devices.
+
+    2.2. Contributor Grant.
+
+    Conditioned upon Your compliance with Section 3.1 below and
+    subject to third party intellectual property claims, each
+    Contributor hereby grants You a world-wide, royalty-free,
+    non-exclusive license:
+
+        (a) under intellectual property rights (other than patent or
+            trademark) Licensable by Contributor to use, reproduce,
+            modify, display, perform, sublicense and distribute the
+            Modifications created by such Contributor (or portions
+            thereof), either on an unmodified basis, with other
+            Modifications, as Covered Software and/or as part of a
+            Larger Work; and
+
+        (b) under Patent Claims infringed by the making, using, or
+            selling of Modifications made by that Contributor either
+            alone and/or in combination with its Contributor Version
+            (or portions of such combination), to make, use, sell,
+            offer for sale, have made, and/or otherwise dispose of:
+            (1) Modifications made by that Contributor (or portions
+            thereof); and (2) the combination of Modifications made by
+            that Contributor with its Contributor Version (or portions
+            of such combination).
+
+        (c) The licenses granted in Sections 2.2(a) and 2.2(b) are
+            effective on the date Contributor first distributes or
+            otherwise makes the Modifications available to a third
+            party.
+
+        (d) Notwithstanding Section 2.2(b) above, no patent license is
+            granted: (1) for any code that Contributor has deleted
+            from the Contributor Version; (2) for infringements caused
+            by: (i) third party modifications of Contributor Version,
+            or (ii) the combination of Modifications made by that
+            Contributor with other software (except as part of the
+            Contributor Version) or other devices; or (3) under Patent
+            Claims infringed by Covered Software in the absence of
+            Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+    3.1. Availability of Source Code.
+
+    Any Covered Software that You distribute or otherwise make
+    available in Executable form must also be made available in Source
+    Code form and that Source Code form must be distributed only under
+    the terms of this License.  You must include a copy of this
+    License with every copy of the Source Code form of the Covered
+    Software You distribute or otherwise make available.  You must
+    inform recipients of any such Covered Software in Executable form
+    as to how they can obtain such Covered Software in Source Code
+    form in a reasonable manner on or through a medium customarily
+    used for software exchange.
+
+    3.2. Modifications.
+
+    The Modifications that You create or to which You contribute are
+    governed by the terms of this License.  You represent that You
+    believe Your Modifications are Your original creation(s) and/or
+    You have sufficient rights to grant the rights conveyed by this
+    License.
+
+    3.3. Required Notices.
+
+    You must include a notice in each of Your Modifications that
+    identifies You as the Contributor of the Modification.  You may
+    not remove or alter any copyright, patent or trademark notices
+    contained within the Covered Software, or any notices of licensing
+    or any descriptive text giving attribution to any Contributor or
+    the Initial Developer.
+
+    3.4. Application of Additional Terms.
+
+    You may not offer or impose any terms on any Covered Software in
+    Source Code form that alters or restricts the applicable version
+    of this License or the recipients' rights hereunder.  You may
+    choose to offer, and to charge a fee for, warranty, support,
+    indemnity or liability obligations to one or more recipients of
+    Covered Software.  However, you may do so only on Your own behalf,
+    and not on behalf of the Initial Developer or any Contributor.
+    You must make it absolutely clear that any such warranty, support,
+    indemnity or liability obligation is offered by You alone, and You
+    hereby agree to indemnify the Initial Developer and every
+    Contributor for any liability incurred by the Initial Developer or
+    such Contributor as a result of warranty, support, indemnity or
+    liability terms You offer.
+
+    3.5. Distribution of Executable Versions.
+
+    You may distribute the Executable form of the Covered Software
+    under the terms of this License or under the terms of a license of
+    Your choice, which may contain terms different from this License,
+    provided that You are in compliance with the terms of this License
+    and that the license for the Executable form does not attempt to
+    limit or alter the recipient's rights in the Source Code form from
+    the rights set forth in this License.  If You distribute the
+    Covered Software in Executable form under a different license, You
+    must make it absolutely clear that any terms which differ from
+    this License are offered by You alone, not by the Initial
+    Developer or Contributor.  You hereby agree to indemnify the
+    Initial Developer and every Contributor for any liability incurred
+    by the Initial Developer or such Contributor as a result of any
+    such terms You offer.
+
+    3.6. Larger Works.
+
+    You may create a Larger Work by combining Covered Software with
+    other code not governed by the terms of this License and
+    distribute the Larger Work as a single product.  In such a case,
+    You must make sure the requirements of this License are fulfilled
+    for the Covered Software.
+
+4. Versions of the License.
+
+    4.1. New Versions.
+
+    Sun Microsystems, Inc. is the initial license steward and may
+    publish revised and/or new versions of this License from time to
+    time.  Each version will be given a distinguishing version number.
+    Except as provided in Section 4.3, no one other than the license
+    steward has the right to modify this License.
+
+    4.2. Effect of New Versions.
+
+    You may always continue to use, distribute or otherwise make the
+    Covered Software available under the terms of the version of the
+    License under which You originally received the Covered Software.
+    If the Initial Developer includes a notice in the Original
+    Software prohibiting it from being distributed or otherwise made
+    available under any subsequent version of the License, You must
+    distribute and make the Covered Software available under the terms
+    of the version of the License under which You originally received
+    the Covered Software.  Otherwise, You may also choose to use,
+    distribute or otherwise make the Covered Software available under
+    the terms of any subsequent version of the License published by
+    the license steward.
+
+    4.3. Modified Versions.
+
+    When You are an Initial Developer and You want to create a new
+    license for Your Original Software, You may create and use a
+    modified version of this License if You: (a) rename the license
+    and remove any references to the name of the license steward
+    (except to note that the license differs from this License); and
+    (b) otherwise make it clear that the license contains terms which
+    differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+    COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
+    BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+    INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
+    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
+    PURPOSE OR NON-INFRINGING.  THE ENTIRE RISK AS TO THE QUALITY AND
+    PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU.  SHOULD ANY
+    COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
+    INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY
+    NECESSARY SERVICING, REPAIR OR CORRECTION.  THIS DISCLAIMER OF
+    WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.  NO USE OF
+    ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
+    DISCLAIMER.
+
+6. TERMINATION.
+
+    6.1. This License and the rights granted hereunder will terminate
+    automatically if You fail to comply with terms herein and fail to
+    cure such breach within 30 days of becoming aware of the breach.
+    Provisions which, by their nature, must remain in effect beyond
+    the termination of this License shall survive.
+
+    6.2. If You assert a patent infringement claim (excluding
+    declaratory judgment actions) against Initial Developer or a
+    Contributor (the Initial Developer or Contributor against whom You
+    assert such claim is referred to as "Participant") alleging that
+    the Participant Software (meaning the Contributor Version where
+    the Participant is a Contributor or the Original Software where
+    the Participant is the Initial Developer) directly or indirectly
+    infringes any patent, then any and all rights granted directly or
+    indirectly to You by such Participant, the Initial Developer (if
+    the Initial Developer is not the Participant) and all Contributors
+    under Sections 2.1 and/or 2.2 of this License shall, upon 60 days
+    notice from Participant terminate prospectively and automatically
+    at the expiration of such 60 day notice period, unless if within
+    such 60 day period You withdraw Your claim with respect to the
+    Participant Software against such Participant either unilaterally
+    or pursuant to a written agreement with Participant.
+
+    6.3. In the event of termination under Sections 6.1 or 6.2 above,
+    all end user licenses that have been validly granted by You or any
+    distributor hereunder prior to termination (excluding licenses
+    granted to You by any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+    UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
+    (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
+    INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
+    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
+    LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
+    CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+    LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
+    STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+    COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
+    INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.  THIS LIMITATION OF
+    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
+    INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT
+    APPLICABLE LAW PROHIBITS SUCH LIMITATION.  SOME JURISDICTIONS DO
+    NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
+    CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
+    APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+    The Covered Software is a "commercial item," as that term is
+    defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
+    computer software" (as that term is defined at 48
+    C.F.R. 252.227-7014(a)(1)) and "commercial computer software
+    documentation" as such terms are used in 48 C.F.R. 12.212
+    (Sept. 1995).  Consistent with 48 C.F.R. 12.212 and 48
+    C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all
+    U.S. Government End Users acquire Covered Software with only those
+    rights set forth herein.  This U.S. Government Rights clause is in
+    lieu of, and supersedes, any other FAR, DFAR, or other clause or
+    provision that addresses Government rights in computer software
+    under this License.
+
+9. MISCELLANEOUS.
+
+    This License represents the complete agreement concerning subject
+    matter hereof.  If any provision of this License is held to be
+    unenforceable, such provision shall be reformed only to the extent
+    necessary to make it enforceable.  This License shall be governed
+    by the law of the jurisdiction specified in a notice contained
+    within the Original Software (except to the extent applicable law,
+    if any, provides otherwise), excluding such jurisdiction's
+    conflict-of-law provisions.  Any litigation relating to this
+    License shall be subject to the jurisdiction of the courts located
+    in the jurisdiction and venue specified in a notice contained
+    within the Original Software, with the losing party responsible
+    for costs, including, without limitation, court costs and
+    reasonable attorneys' fees and expenses.  The application of the
+    United Nations Convention on Contracts for the International Sale
+    of Goods is expressly excluded.  Any law or regulation which
+    provides that the language of a contract shall be construed
+    against the drafter shall not apply to this License.  You agree
+    that You alone are responsible for compliance with the United
+    States export administration regulations (and the export control
+    laws and regulation of any other countries) when You use,
+    distribute or otherwise make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+    As between Initial Developer and the Contributors, each party is
+    responsible for claims and damages arising, directly or
+    indirectly, out of its utilization of rights under this License
+    and You agree to work with Initial Developer and Contributors to
+    distribute such responsibility on an equitable basis.  Nothing
+    herein is intended or shall be deemed to constitute any admission
+    of liability.
+
+--------------------------------------------------------------------
+
+NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND
+DISTRIBUTION LICENSE (CDDL)
+
+For Covered Software in this distribution, this License shall
+be governed by the laws of the State of California (excluding
+conflict-of-law provisions).
+
+Any litigation relating to this License shall be subject to the
+jurisdiction of the Federal Courts of the Northern District of
+California and the state courts of the State of California, with
+venue lying in Santa Clara County, California.
index 20f7903287e81e5130e9f859a685113ee8e17f02..669231c074abe7ab26bd94ed46c7d6d1ab424464 100644 (file)
@@ -11,17 +11,17 @@ endif
 if CONFIG_KERNEL
 SUBDIRS += module
 
-extradir = @prefix@/src/zfs-$(VERSION)
+extradir = $(prefix)/src/zfs-$(VERSION)
 extra_HEADERS = zfs.release.in zfs_config.h.in
 
-kerneldir = @prefix@/src/zfs-$(VERSION)/$(LINUX_VERSION)
+kerneldir = $(prefix)/src/zfs-$(VERSION)/$(LINUX_VERSION)
 nodist_kernel_HEADERS = zfs.release zfs_config.h module/$(LINUX_SYMBOLS)
 endif
 
 AUTOMAKE_OPTIONS = foreign
 EXTRA_DIST  = autogen.sh copy-builtin
 EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am
-EXTRA_DIST += META DISCLAIMER COPYRIGHT README.markdown OPENSOLARIS.LICENSE
+EXTRA_DIST += META AUTHORS COPYRIGHT LICENSE NOTICE README.md
 
 @CODE_COVERAGE_RULES@
 
@@ -44,6 +44,22 @@ dist-hook:
        sed -i 's/Release:[[:print:]]*/Release:      $(RELEASE)/' \
                $(distdir)/META
 
+# For compatibility, create a matching spl-x.y.z directly which contains
+# symlinks to the updated header and object file locations.  These
+# compatibility links will be removed in the next major release.
+if CONFIG_KERNEL
+install-data-hook:
+       mkdir $(DESTDIR)$(prefix)/src/spl-$(VERSION) && \
+       cd $(DESTDIR)$(prefix)/src/spl-$(VERSION) && \
+       ln -s ../zfs-$(VERSION)/include/spl include && \
+       ln -s ../zfs-$(VERSION)/$(LINUX_VERSION) $(LINUX_VERSION) && \
+       ln -s ../zfs-$(VERSION)/zfs_config.h.in spl_config.h.in && \
+       ln -s ../zfs-$(VERSION)/zfs.release.in spl.release.in && \
+       cd $(DESTDIR)$(prefix)/src/zfs-$(VERSION)/$(LINUX_VERSION) && \
+       ln -s zfs_config.h spl_config.h && \
+       ln -s zfs.release spl.release
+endif
+
 checkstyle: cstyle shellcheck flake8 commitcheck mancheck testscheck
 
 commitcheck:
diff --git a/NOTICE b/NOTICE
new file mode 100644 (file)
index 0000000..3218920
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,16 @@
+This work was produced under the auspices of the U.S. Department of Energy by
+Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.
+
+This work was prepared as an account of work sponsored by an agency of the
+United States Government. Neither the United States Government nor Lawrence
+Livermore National Security, LLC, nor any of their employees makes any warranty,
+expressed or implied, or assumes any legal liability or responsibility for the
+accuracy, completeness, or usefulness of any information, apparatus, product, or
+process disclosed, or represents that its use would not infringe privately owned
+rights. Reference herein to any specific commercial product, process, or service
+by trade name, trademark, manufacturer, or otherwise does not necessarily
+constitute or imply its endorsement, recommendation, or favoring by the United
+States Government or Lawrence Livermore National Security, LLC. The views and
+opinions of authors expressed herein do not necessarily state or reflect those
+of the United States Government or Lawrence Livermore National Security, LLC,
+and shall not be used for advertising or product endorsement purposes.
diff --git a/OPENSOLARIS.LICENSE b/OPENSOLARIS.LICENSE
deleted file mode 100644 (file)
index da23621..0000000
+++ /dev/null
@@ -1,384 +0,0 @@
-Unless otherwise noted, all files in this distribution are released
-under the Common Development and Distribution License (CDDL).
-Exceptions are noted within the associated source files.
-
---------------------------------------------------------------------
-
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE Version 1.0
-
-1. Definitions.
-
-    1.1. "Contributor" means each individual or entity that creates
-         or contributes to the creation of Modifications.
-
-    1.2. "Contributor Version" means the combination of the Original
-         Software, prior Modifications used by a Contributor (if any),
-         and the Modifications made by that particular Contributor.
-
-    1.3. "Covered Software" means (a) the Original Software, or (b)
-         Modifications, or (c) the combination of files containing
-         Original Software with files containing Modifications, in
-         each case including portions thereof.
-
-    1.4. "Executable" means the Covered Software in any form other
-         than Source Code.
-
-    1.5. "Initial Developer" means the individual or entity that first
-         makes Original Software available under this License.
-
-    1.6. "Larger Work" means a work which combines Covered Software or
-         portions thereof with code not governed by the terms of this
-         License.
-
-    1.7. "License" means this document.
-
-    1.8. "Licensable" means having the right to grant, to the maximum
-         extent possible, whether at the time of the initial grant or
-         subsequently acquired, any and all of the rights conveyed
-         herein.
-
-    1.9. "Modifications" means the Source Code and Executable form of
-         any of the following:
-
-        A. Any file that results from an addition to, deletion from or
-           modification of the contents of a file containing Original
-           Software or previous Modifications;
-
-        B. Any new file that contains any part of the Original
-           Software or previous Modifications; or
-
-        C. Any new file that is contributed or otherwise made
-           available under the terms of this License.
-
-    1.10. "Original Software" means the Source Code and Executable
-          form of computer software code that is originally released
-          under this License.
-
-    1.11. "Patent Claims" means any patent claim(s), now owned or
-          hereafter acquired, including without limitation, method,
-          process, and apparatus claims, in any patent Licensable by
-          grantor.
-
-    1.12. "Source Code" means (a) the common form of computer software
-          code in which modifications are made and (b) associated
-          documentation included in or with such code.
-
-    1.13. "You" (or "Your") means an individual or a legal entity
-          exercising rights under, and complying with all of the terms
-          of, this License.  For legal entities, "You" includes any
-          entity which controls, is controlled by, or is under common
-          control with You.  For purposes of this definition,
-          "control" means (a) the power, direct or indirect, to cause
-          the direction or management of such entity, whether by
-          contract or otherwise, or (b) ownership of more than fifty
-          percent (50%) of the outstanding shares or beneficial
-          ownership of such entity.
-
-2. License Grants.
-
-    2.1. The Initial Developer Grant.
-
-    Conditioned upon Your compliance with Section 3.1 below and
-    subject to third party intellectual property claims, the Initial
-    Developer hereby grants You a world-wide, royalty-free,
-    non-exclusive license:
-
-        (a) under intellectual property rights (other than patent or
-            trademark) Licensable by Initial Developer, to use,
-            reproduce, modify, display, perform, sublicense and
-            distribute the Original Software (or portions thereof),
-            with or without Modifications, and/or as part of a Larger
-            Work; and
-
-        (b) under Patent Claims infringed by the making, using or
-            selling of Original Software, to make, have made, use,
-            practice, sell, and offer for sale, and/or otherwise
-            dispose of the Original Software (or portions thereof).
-
-        (c) The licenses granted in Sections 2.1(a) and (b) are
-            effective on the date Initial Developer first distributes
-            or otherwise makes the Original Software available to a
-            third party under the terms of this License.
-
-        (d) Notwithstanding Section 2.1(b) above, no patent license is
-            granted: (1) for code that You delete from the Original
-            Software, or (2) for infringements caused by: (i) the
-            modification of the Original Software, or (ii) the
-            combination of the Original Software with other software
-            or devices.
-
-    2.2. Contributor Grant.
-
-    Conditioned upon Your compliance with Section 3.1 below and
-    subject to third party intellectual property claims, each
-    Contributor hereby grants You a world-wide, royalty-free,
-    non-exclusive license:
-
-        (a) under intellectual property rights (other than patent or
-            trademark) Licensable by Contributor to use, reproduce,
-            modify, display, perform, sublicense and distribute the
-            Modifications created by such Contributor (or portions
-            thereof), either on an unmodified basis, with other
-            Modifications, as Covered Software and/or as part of a
-            Larger Work; and
-
-        (b) under Patent Claims infringed by the making, using, or
-            selling of Modifications made by that Contributor either
-            alone and/or in combination with its Contributor Version
-            (or portions of such combination), to make, use, sell,
-            offer for sale, have made, and/or otherwise dispose of:
-            (1) Modifications made by that Contributor (or portions
-            thereof); and (2) the combination of Modifications made by
-            that Contributor with its Contributor Version (or portions
-            of such combination).
-
-        (c) The licenses granted in Sections 2.2(a) and 2.2(b) are
-            effective on the date Contributor first distributes or
-            otherwise makes the Modifications available to a third
-            party.
-
-        (d) Notwithstanding Section 2.2(b) above, no patent license is
-            granted: (1) for any code that Contributor has deleted
-            from the Contributor Version; (2) for infringements caused
-            by: (i) third party modifications of Contributor Version,
-            or (ii) the combination of Modifications made by that
-            Contributor with other software (except as part of the
-            Contributor Version) or other devices; or (3) under Patent
-            Claims infringed by Covered Software in the absence of
-            Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-    3.1. Availability of Source Code.
-
-    Any Covered Software that You distribute or otherwise make
-    available in Executable form must also be made available in Source
-    Code form and that Source Code form must be distributed only under
-    the terms of this License.  You must include a copy of this
-    License with every copy of the Source Code form of the Covered
-    Software You distribute or otherwise make available.  You must
-    inform recipients of any such Covered Software in Executable form
-    as to how they can obtain such Covered Software in Source Code
-    form in a reasonable manner on or through a medium customarily
-    used for software exchange.
-
-    3.2. Modifications.
-
-    The Modifications that You create or to which You contribute are
-    governed by the terms of this License.  You represent that You
-    believe Your Modifications are Your original creation(s) and/or
-    You have sufficient rights to grant the rights conveyed by this
-    License.
-
-    3.3. Required Notices.
-
-    You must include a notice in each of Your Modifications that
-    identifies You as the Contributor of the Modification.  You may
-    not remove or alter any copyright, patent or trademark notices
-    contained within the Covered Software, or any notices of licensing
-    or any descriptive text giving attribution to any Contributor or
-    the Initial Developer.
-
-    3.4. Application of Additional Terms.
-
-    You may not offer or impose any terms on any Covered Software in
-    Source Code form that alters or restricts the applicable version
-    of this License or the recipients' rights hereunder.  You may
-    choose to offer, and to charge a fee for, warranty, support,
-    indemnity or liability obligations to one or more recipients of
-    Covered Software.  However, you may do so only on Your own behalf,
-    and not on behalf of the Initial Developer or any Contributor.
-    You must make it absolutely clear that any such warranty, support,
-    indemnity or liability obligation is offered by You alone, and You
-    hereby agree to indemnify the Initial Developer and every
-    Contributor for any liability incurred by the Initial Developer or
-    such Contributor as a result of warranty, support, indemnity or
-    liability terms You offer.
-
-    3.5. Distribution of Executable Versions.
-
-    You may distribute the Executable form of the Covered Software
-    under the terms of this License or under the terms of a license of
-    Your choice, which may contain terms different from this License,
-    provided that You are in compliance with the terms of this License
-    and that the license for the Executable form does not attempt to
-    limit or alter the recipient's rights in the Source Code form from
-    the rights set forth in this License.  If You distribute the
-    Covered Software in Executable form under a different license, You
-    must make it absolutely clear that any terms which differ from
-    this License are offered by You alone, not by the Initial
-    Developer or Contributor.  You hereby agree to indemnify the
-    Initial Developer and every Contributor for any liability incurred
-    by the Initial Developer or such Contributor as a result of any
-    such terms You offer.
-
-    3.6. Larger Works.
-
-    You may create a Larger Work by combining Covered Software with
-    other code not governed by the terms of this License and
-    distribute the Larger Work as a single product.  In such a case,
-    You must make sure the requirements of this License are fulfilled
-    for the Covered Software.
-
-4. Versions of the License.
-
-    4.1. New Versions.
-
-    Sun Microsystems, Inc. is the initial license steward and may
-    publish revised and/or new versions of this License from time to
-    time.  Each version will be given a distinguishing version number.
-    Except as provided in Section 4.3, no one other than the license
-    steward has the right to modify this License.
-
-    4.2. Effect of New Versions.
-
-    You may always continue to use, distribute or otherwise make the
-    Covered Software available under the terms of the version of the
-    License under which You originally received the Covered Software.
-    If the Initial Developer includes a notice in the Original
-    Software prohibiting it from being distributed or otherwise made
-    available under any subsequent version of the License, You must
-    distribute and make the Covered Software available under the terms
-    of the version of the License under which You originally received
-    the Covered Software.  Otherwise, You may also choose to use,
-    distribute or otherwise make the Covered Software available under
-    the terms of any subsequent version of the License published by
-    the license steward.
-
-    4.3. Modified Versions.
-
-    When You are an Initial Developer and You want to create a new
-    license for Your Original Software, You may create and use a
-    modified version of this License if You: (a) rename the license
-    and remove any references to the name of the license steward
-    (except to note that the license differs from this License); and
-    (b) otherwise make it clear that the license contains terms which
-    differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-    COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
-    BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-    INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-    SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
-    PURPOSE OR NON-INFRINGING.  THE ENTIRE RISK AS TO THE QUALITY AND
-    PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU.  SHOULD ANY
-    COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
-    INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY
-    NECESSARY SERVICING, REPAIR OR CORRECTION.  THIS DISCLAIMER OF
-    WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.  NO USE OF
-    ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
-    DISCLAIMER.
-
-6. TERMINATION.
-
-    6.1. This License and the rights granted hereunder will terminate
-    automatically if You fail to comply with terms herein and fail to
-    cure such breach within 30 days of becoming aware of the breach.
-    Provisions which, by their nature, must remain in effect beyond
-    the termination of this License shall survive.
-
-    6.2. If You assert a patent infringement claim (excluding
-    declaratory judgment actions) against Initial Developer or a
-    Contributor (the Initial Developer or Contributor against whom You
-    assert such claim is referred to as "Participant") alleging that
-    the Participant Software (meaning the Contributor Version where
-    the Participant is a Contributor or the Original Software where
-    the Participant is the Initial Developer) directly or indirectly
-    infringes any patent, then any and all rights granted directly or
-    indirectly to You by such Participant, the Initial Developer (if
-    the Initial Developer is not the Participant) and all Contributors
-    under Sections 2.1 and/or 2.2 of this License shall, upon 60 days
-    notice from Participant terminate prospectively and automatically
-    at the expiration of such 60 day notice period, unless if within
-    such 60 day period You withdraw Your claim with respect to the
-    Participant Software against such Participant either unilaterally
-    or pursuant to a written agreement with Participant.
-
-    6.3. In the event of termination under Sections 6.1 or 6.2 above,
-    all end user licenses that have been validly granted by You or any
-    distributor hereunder prior to termination (excluding licenses
-    granted to You by any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-    UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-    (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
-    INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-    COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
-    LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
-    CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-    LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
-    STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-    COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-    INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.  THIS LIMITATION OF
-    LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
-    INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT
-    APPLICABLE LAW PROHIBITS SUCH LIMITATION.  SOME JURISDICTIONS DO
-    NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
-    CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
-    APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-    The Covered Software is a "commercial item," as that term is
-    defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
-    computer software" (as that term is defined at 48
-    C.F.R. 252.227-7014(a)(1)) and "commercial computer software
-    documentation" as such terms are used in 48 C.F.R. 12.212
-    (Sept. 1995).  Consistent with 48 C.F.R. 12.212 and 48
-    C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all
-    U.S. Government End Users acquire Covered Software with only those
-    rights set forth herein.  This U.S. Government Rights clause is in
-    lieu of, and supersedes, any other FAR, DFAR, or other clause or
-    provision that addresses Government rights in computer software
-    under this License.
-
-9. MISCELLANEOUS.
-
-    This License represents the complete agreement concerning subject
-    matter hereof.  If any provision of this License is held to be
-    unenforceable, such provision shall be reformed only to the extent
-    necessary to make it enforceable.  This License shall be governed
-    by the law of the jurisdiction specified in a notice contained
-    within the Original Software (except to the extent applicable law,
-    if any, provides otherwise), excluding such jurisdiction's
-    conflict-of-law provisions.  Any litigation relating to this
-    License shall be subject to the jurisdiction of the courts located
-    in the jurisdiction and venue specified in a notice contained
-    within the Original Software, with the losing party responsible
-    for costs, including, without limitation, court costs and
-    reasonable attorneys' fees and expenses.  The application of the
-    United Nations Convention on Contracts for the International Sale
-    of Goods is expressly excluded.  Any law or regulation which
-    provides that the language of a contract shall be construed
-    against the drafter shall not apply to this License.  You agree
-    that You alone are responsible for compliance with the United
-    States export administration regulations (and the export control
-    laws and regulation of any other countries) when You use,
-    distribute or otherwise make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-    As between Initial Developer and the Contributors, each party is
-    responsible for claims and damages arising, directly or
-    indirectly, out of its utilization of rights under this License
-    and You agree to work with Initial Developer and Contributors to
-    distribute such responsibility on an equitable basis.  Nothing
-    herein is intended or shall be deemed to constitute any admission
-    of liability.
-
---------------------------------------------------------------------
-
-NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND
-DISTRIBUTION LICENSE (CDDL)
-
-For Covered Software in this distribution, this License shall
-be governed by the laws of the State of California (excluding
-conflict-of-law provisions).
-
-Any litigation relating to this License shall be subject to the
-jurisdiction of the Federal Courts of the Northern District of
-California and the state courts of the State of California, with
-venue lying in Santa Clara County, California.
diff --git a/README.markdown b/README.markdown
deleted file mode 100644 (file)
index b650805..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-![img](http://zfsonlinux.org/images/zfs-linux.png)
-
-ZFS on Linux is an advanced file system and volume manager which was originally
-developed for Solaris and is now maintained by the OpenZFS community.
-
-[![codecov](https://codecov.io/gh/zfsonlinux/zfs/branch/master/graph/badge.svg)](https://codecov.io/gh/zfsonlinux/zfs)
-[![coverity](https://scan.coverity.com/projects/1973/badge.svg)](https://scan.coverity.com/projects/zfsonlinux-zfs)
-
-# Official Resources
-  * [Site](http://zfsonlinux.org)
-  * [Wiki](https://github.com/zfsonlinux/zfs/wiki)
-  * [Mailing lists](https://github.com/zfsonlinux/zfs/wiki/Mailing-Lists)
-  * [OpenZFS site](http://open-zfs.org/)
-
-# Installation
-Full documentation for installing ZoL on your favorite Linux distribution can
-be found at [our site](http://zfsonlinux.org/).
-
-# Contribute & Develop
-We have a separate document with [contribution guidelines](./.github/CONTRIBUTING.md).
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..49b3bfe
--- /dev/null
+++ b/README.md
@@ -0,0 +1,28 @@
+![img](http://zfsonlinux.org/images/zfs-linux.png)
+
+ZFS on Linux is an advanced file system and volume manager which was originally
+developed for Solaris and is now maintained by the OpenZFS community.
+
+[![codecov](https://codecov.io/gh/zfsonlinux/zfs/branch/master/graph/badge.svg)](https://codecov.io/gh/zfsonlinux/zfs)
+[![coverity](https://scan.coverity.com/projects/1973/badge.svg)](https://scan.coverity.com/projects/zfsonlinux-zfs)
+
+# Official Resources
+
+  * [Site](http://zfsonlinux.org)
+  * [Wiki](https://github.com/zfsonlinux/zfs/wiki)
+  * [Mailing lists](https://github.com/zfsonlinux/zfs/wiki/Mailing-Lists)
+  * [OpenZFS site](http://open-zfs.org/)
+
+# Installation
+
+Full documentation for installing ZoL on your favorite Linux distribution can
+be found at [our site](http://zfsonlinux.org/).
+
+# Contribute & Develop
+
+We have a separate document with [contribution guidelines](./.github/CONTRIBUTING.md).
+
+# Release
+
+ZFS on Linux is released under a CDDL license.  
+For more details see the NOTICE, LICENSE and COPYRIGHT files; `UCRL-CODE-235197`
diff --git a/TEST b/TEST
index 4c593a457078c1d63d7712ed83a9e884be24d771..ebe6ef963fa6a322a6cc1ba30afaf3af5fef241c 100644 (file)
--- a/TEST
+++ b/TEST
@@ -4,10 +4,6 @@
 #TEST_PREPARE_WATCHDOG="yes"
 #TEST_PREPARE_SHARES="yes"
 
-### SPLAT
-#TEST_SPLAT_SKIP="yes"
-#TEST_SPLAT_OPTIONS="-acvx"
-
 ### ztest
 #TEST_ZTEST_SKIP="yes"
 #TEST_ZTEST_TIMEOUT=1800
index 47f2a9ed9e1c06866b25eafc2418ae89271e74e6..d0d65fb943e4d4f838dc87d371f020a84a75afae 100644 (file)
@@ -34,6 +34,7 @@
 #include <locale.h>
 #include <getopt.h>
 #include <fcntl.h>
+#include <errno.h>
 
 #define        ZS_COMMENT      0x00000000      /* comment */
 #define        ZS_ZFSUTIL      0x00000001      /* caller is zfs(8) */
index bb8db6af58667b1e83dace1523948e362422aa15..0b27f6702ee8dd0c1320590d9ac8d0f0ff7a7172 100644 (file)
@@ -26,6 +26,7 @@
  */
 
 #include <stddef.h>
+#include <string.h>
 #include <strings.h>
 #include <libuutil.h>
 #include <libzfs.h>
index 54568e75ad9a2363c9b6345cc9ecbece274eff98..600d6527c0db265afe390fab8757dd1eabad4fa5 100644 (file)
@@ -85,6 +85,7 @@
 #include <thread_pool.h>
 #include <pthread.h>
 #include <unistd.h>
+#include <errno.h>
 #include "zfs_agents.h"
 #include "../zed_log.h"
 
index aeb98ab64604a820f4916ec3a48a981165cccb37..af4e4b4d2d7b5734b4167fba1d00b0e944cf2b3f 100644 (file)
@@ -31,6 +31,7 @@
 #include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <strings.h>
 
 #include <libzfs.h>
index 8dd2e77cb9b7d1d6d00c8835e4e898c980316a66..3ce499968ffd1f3e873aef51032e7a1e0421ac55 100644 (file)
@@ -2,9 +2,9 @@ dnl #
 dnl # 2.6.33 API change,
 dnl # Removed .ctl_name from struct ctl_table.
 dnl #
-AC_DEFUN([SPL_AC_CTL_NAME], [
+AC_DEFUN([ZFS_AC_KERNEL_CTL_NAME], [
        AC_MSG_CHECKING([whether struct ctl_table has ctl_name])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/sysctl.h>
        ],[
                struct ctl_table ctl __attribute__ ((unused));
index ac75a4c8e150563063860a60b285b137ceb04b50..e8948be176d13e70a9083fdc5da127ecd41b7a8a 100644 (file)
@@ -1,9 +1,9 @@
 dnl #
 dnl # PaX Linux 2.6.38 - 3.x API
 dnl #
-AC_DEFUN([SPL_AC_PAX_KERNEL_FILE_FALLOCATE], [
+AC_DEFUN([ZFS_AC_PAX_KERNEL_FILE_FALLOCATE], [
        AC_MSG_CHECKING([whether fops->fallocate() exists])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/fs.h>
        ],[
                long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL;
index 4db2bba5c9a3db99b6cc80441465d13b3e20f803..849a1e246a4a35a58b6d43e020f30b9ebc26f392 100644 (file)
@@ -2,11 +2,11 @@ dnl #
 dnl # 4.9 API change
 dnl # group_info changed from 2d array via >blocks to 1d array via ->gid
 dnl #
-AC_DEFUN([SPL_AC_GROUP_INFO_GID], [
+AC_DEFUN([ZFS_AC_KERNEL_GROUP_INFO_GID], [
        AC_MSG_CHECKING([whether group_info->gid exists])
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="-Werror"
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/cred.h>
        ],[
                struct group_info *gi = groups_alloc(1);
index 2cc06a5ec31522e41bb148d71d23348b08d509ec..8dee014227278a080b77d8ce32361629f3ffc5f9 100644 (file)
@@ -4,11 +4,11 @@ dnl # i_mutex is changed to i_rwsem. Instead of directly using
 dnl # i_mutex/i_rwsem, we should use inode_lock() and inode_lock_shared()
 dnl # We test inode_lock_shared because inode_lock is introduced earlier.
 dnl #
-AC_DEFUN([SPL_AC_INODE_LOCK], [
+AC_DEFUN([ZFS_AC_KERNEL_INODE_LOCK], [
        AC_MSG_CHECKING([whether inode_lock_shared() exists])
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="-Werror"
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/fs.h>
        ],[
                struct inode *inode = NULL;
index 50a7fdb4b5f203b05254a33d79387ab06c611c70..21cc53d349335110eed1911e5eeb4c787bd8b280 100644 (file)
@@ -5,9 +5,9 @@ dnl # private allocation flags which are applied when allocating a new slab
 dnl # in kmem_getpages().  Unfortunately there is no public API for setting
 dnl # non-default flags.
 dnl #
-AC_DEFUN([SPL_AC_KMEM_CACHE_ALLOCFLAGS], [
+AC_DEFUN([ZFS_AC_KERNEL_KMEM_CACHE_ALLOCFLAGS], [
        AC_MSG_CHECKING([whether struct kmem_cache has allocflags])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/slab.h>
        ],[
                struct kmem_cache cachep __attribute__ ((unused));
@@ -20,7 +20,7 @@ AC_DEFUN([SPL_AC_KMEM_CACHE_ALLOCFLAGS], [
                AC_MSG_RESULT(no)
 
                AC_MSG_CHECKING([whether struct kmem_cache has gfpflags])
-               SPL_LINUX_TRY_COMPILE([
+               ZFS_LINUX_TRY_COMPILE([
                        #include <linux/slab.h>
                ],[
                        struct kmem_cache cachep __attribute__ ((unused));
@@ -40,11 +40,11 @@ dnl # grsecurity API change,
 dnl # kmem_cache_create() with SLAB_USERCOPY flag replaced by
 dnl # kmem_cache_create_usercopy().
 dnl #
-AC_DEFUN([SPL_AC_KMEM_CACHE_CREATE_USERCOPY], [
+AC_DEFUN([ZFS_AC_KERNEL_KMEM_CACHE_CREATE_USERCOPY], [
        AC_MSG_CHECKING([whether kmem_cache_create_usercopy() exists])
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="-Werror"
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/slab.h>
                static void ctor(void *foo)
                {
index 47d193783cd2639da6528629378ca4099ba191b2..82685d26369ed7033a5490eb5a0b6643e042e031 100644 (file)
@@ -3,19 +3,19 @@ dnl # User namespaces, use kuid_t in place of uid_t
 dnl # where available. Not strictly a user namespaces thing
 dnl # but it should prevent surprises
 dnl #
-AC_DEFUN([SPL_AC_KUIDGID_T], [
+AC_DEFUN([ZFS_AC_KERNEL_KUIDGID_T], [
        AC_MSG_CHECKING([whether kuid_t/kgid_t is available])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/uidgid.h>
        ], [
-               kuid_t userid = KUIDT_INIT(0);
-               kgid_t groupid = KGIDT_INIT(0);
+               kuid_t userid __attribute__ ((unused)) = KUIDT_INIT(0);
+               kgid_t groupid __attribute__ ((unused)) = KGIDT_INIT(0);
        ],[
-               SPL_LINUX_TRY_COMPILE([
+               ZFS_LINUX_TRY_COMPILE([
                        #include <linux/uidgid.h>
                ], [
-                       kuid_t userid = 0;
-                       kgid_t groupid = 0;
+                       kuid_t userid __attribute__ ((unused)) = 0;
+                       kgid_t groupid __attribute__ ((unused)) = 0;
                ],[
                        AC_MSG_RESULT(yes; optional)
                ],[
index 6aa5765c32c64f9c9d8c837528b218bf79363409..8aa4c2204e8ef04944596df53f6b7a37d9b726d8 100644 (file)
@@ -2,9 +2,9 @@ dnl #
 dnl # 3.10 API change,
 dnl # PDE is replaced by PDE_DATA
 dnl #
-AC_DEFUN([SPL_AC_PDE_DATA], [
+AC_DEFUN([ZFS_AC_KERNEL_PDE_DATA], [
        AC_MSG_CHECKING([whether PDE_DATA() is available])
-       SPL_LINUX_TRY_COMPILE_SYMBOL([
+       ZFS_LINUX_TRY_COMPILE_SYMBOL([
                #include <linux/proc_fs.h>
        ], [
                PDE_DATA(NULL);
index 23c14b70fd3421863b8aa6edd10240b14d1082e4..1c8a265e0ae04dbf9b589e03b5e12f17b0c04863 100644 (file)
@@ -3,11 +3,11 @@ dnl # 4.14 API change
 dnl # kernel_write() which was introduced in 3.9 was updated to take
 dnl # the offset as a pointer which is needed by vn_rdwr().
 dnl #
-AC_DEFUN([SPL_AC_KERNEL_WRITE], [
+AC_DEFUN([ZFS_AC_KERNEL_WRITE], [
        AC_MSG_CHECKING([whether kernel_write() takes loff_t pointer])
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="-Werror"
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/fs.h>
        ],[
                struct file *file = NULL;
@@ -32,11 +32,11 @@ dnl # 4.14 API change
 dnl # kernel_read() which has existed for forever was updated to take
 dnl # the offset as a pointer which is needed by vn_rdwr().
 dnl #
-AC_DEFUN([SPL_AC_KERNEL_READ], [
+AC_DEFUN([ZFS_AC_KERNEL_READ], [
        AC_MSG_CHECKING([whether kernel_read() takes loff_t pointer])
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="-Werror"
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/fs.h>
        ],[
                struct file *file = NULL;
index aee20ae901c6ba05ee21125822e7d1277214b3ca..532c22718189b9f695ac070d1264eca76d2af7ae 100644 (file)
@@ -4,11 +4,11 @@ dnl #
 dnl # The rw_semaphore.wait_lock member was changed from spinlock_t to
 dnl # raw_spinlock_t at commit ddb6c9b58a19edcfac93ac670b066c836ff729f1.
 dnl #
-AC_DEFUN([SPL_AC_RWSEM_SPINLOCK_IS_RAW], [
+AC_DEFUN([ZFS_AC_KERNEL_RWSEM_SPINLOCK_IS_RAW], [
        AC_MSG_CHECKING([whether struct rw_semaphore member wait_lock is raw])
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="-Werror"
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/rwsem.h>
        ],[
                struct rw_semaphore dummy_semaphore __attribute__ ((unused));
@@ -30,11 +30,11 @@ dnl # 3.16 API Change
 dnl #
 dnl # rwsem-spinlock "->activity" changed to "->count"
 dnl #
-AC_DEFUN([SPL_AC_RWSEM_ACTIVITY], [
+AC_DEFUN([ZFS_AC_KERNEL_RWSEM_ACTIVITY], [
        AC_MSG_CHECKING([whether struct rw_semaphore has member activity])
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="-Werror"
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/rwsem.h>
        ],[
                struct rw_semaphore dummy_semaphore __attribute__ ((unused));
@@ -54,12 +54,12 @@ dnl # 4.8 API Change
 dnl #
 dnl # rwsem "->count" changed to atomic_long_t type
 dnl #
-AC_DEFUN([SPL_AC_RWSEM_ATOMIC_LONG_COUNT], [
+AC_DEFUN([ZFS_AC_KERNEL_RWSEM_ATOMIC_LONG_COUNT], [
        AC_MSG_CHECKING(
        [whether struct rw_semaphore has atomic_long_t member count])
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="-Werror"
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/rwsem.h>
        ],[
                DECLARE_RWSEM(dummy_semaphore);
index 5ae21676ed35d173c7876aec467f297fad8bbefb..640b008aab8d8b3d1d656759acb60a071e1469ad 100644 (file)
@@ -2,9 +2,9 @@ dnl #
 dnl # 3.9 API change,
 dnl # Moved things from linux/sched.h to linux/sched/rt.h
 dnl #
-AC_DEFUN([SPL_AC_SCHED_RT_HEADER],
+AC_DEFUN([ZFS_AC_KERNEL_SCHED_RT_HEADER],
        [AC_MSG_CHECKING([whether header linux/sched/rt.h exists])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/sched.h>
                #include <linux/sched/rt.h>
        ],[
@@ -21,9 +21,9 @@ dnl #
 dnl # 4.11 API change,
 dnl # Moved things from linux/sched.h to linux/sched/signal.h
 dnl #
-AC_DEFUN([SPL_AC_SCHED_SIGNAL_HEADER],
+AC_DEFUN([ZFS_AC_KERNEL_SCHED_SIGNAL_HEADER],
        [AC_MSG_CHECKING([whether header linux/sched/signal.h exists])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/sched.h>
                #include <linux/sched/signal.h>
        ],[
@@ -41,9 +41,9 @@ dnl # The io_schedule_timeout() function is present in all 2.6.32 kernels
 dnl # but it was not exported until Linux 3.19.  The RHEL 7.x kernels which
 dnl # are based on a 3.10 kernel do export this symbol.
 dnl #
-AC_DEFUN([SPL_AC_IO_SCHEDULE_TIMEOUT], [
+AC_DEFUN([ZFS_AC_KERNEL_IO_SCHEDULE_TIMEOUT], [
        AC_MSG_CHECKING([whether io_schedule_timeout() is available])
-       SPL_LINUX_TRY_COMPILE_SYMBOL([
+       ZFS_LINUX_TRY_COMPILE_SYMBOL([
                #include <linux/sched.h>
        ], [
                (void) io_schedule_timeout(1);
index 849e7e6cbf0994c8d61fbd122bf71a2e78e3fa41..d5565b42cb575d9b40e3a6d4701b066420ff82bf 100644 (file)
@@ -2,11 +2,11 @@ dnl #
 dnl # 3.9 API change
 dnl # set_fs_pwd takes const struct path *
 dnl #
-AC_DEFUN([SPL_AC_SET_FS_PWD_WITH_CONST],
+AC_DEFUN([ZFS_AC_KERNEL_SET_FS_PWD_WITH_CONST],
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="-Werror"
        [AC_MSG_CHECKING([whether set_fs_pwd() requires const struct path *])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/spinlock.h>
                #include <linux/fs_struct.h>
                #include <linux/path.h>
@@ -20,7 +20,7 @@ AC_DEFUN([SPL_AC_SET_FS_PWD_WITH_CONST],
                AC_DEFINE(HAVE_SET_FS_PWD_WITH_CONST, 1,
                        [set_fs_pwd() needs const path *])
        ],[
-               SPL_LINUX_TRY_COMPILE([
+               ZFS_LINUX_TRY_COMPILE([
                        #include <linux/spinlock.h>
                        #include <linux/fs_struct.h>
                        #include <linux/path.h>
index a57c2afb0b6b298ea446f94a2d7c5ebcfa9025c7..37da0ec721aa6a06221dfa787302af12003150ec 100644 (file)
@@ -131,3 +131,130 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINK_CONTROL_HAS_NID], [
                AC_MSG_RESULT(no)
        ])
 ])
+
+
+AC_DEFUN([ZFS_AC_KERNEL_SHRINKER_CALLBACK],[
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-Werror"
+       dnl #
+       dnl # 2.6.23 to 2.6.34 API change
+       dnl # ->shrink(int nr_to_scan, gfp_t gfp_mask)
+       dnl #
+       AC_MSG_CHECKING([whether old 2-argument shrinker exists])
+       ZFS_LINUX_TRY_COMPILE([
+               #include <linux/mm.h>
+
+               int shrinker_cb(int nr_to_scan, gfp_t gfp_mask);
+       ],[
+               struct shrinker cache_shrinker = {
+                       .shrink = shrinker_cb,
+                       .seeks = DEFAULT_SEEKS,
+               };
+               register_shrinker(&cache_shrinker);
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_2ARGS_OLD_SHRINKER_CALLBACK, 1,
+                       [old shrinker callback wants 2 args])
+       ],[
+               AC_MSG_RESULT(no)
+               dnl #
+               dnl # 2.6.35 - 2.6.39 API change
+               dnl # ->shrink(struct shrinker *,
+               dnl #          int nr_to_scan, gfp_t gfp_mask)
+               dnl #
+               AC_MSG_CHECKING([whether old 3-argument shrinker exists])
+               ZFS_LINUX_TRY_COMPILE([
+                       #include <linux/mm.h>
+
+                       int shrinker_cb(struct shrinker *, int nr_to_scan,
+                                       gfp_t gfp_mask);
+               ],[
+                       struct shrinker cache_shrinker = {
+                               .shrink = shrinker_cb,
+                               .seeks = DEFAULT_SEEKS,
+                       };
+                       register_shrinker(&cache_shrinker);
+               ],[
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_3ARGS_SHRINKER_CALLBACK, 1,
+                               [old shrinker callback wants 3 args])
+               ],[
+                       AC_MSG_RESULT(no)
+                       dnl #
+                       dnl # 3.0 - 3.11 API change
+                       dnl # ->shrink(struct shrinker *,
+                       dnl #          struct shrink_control *sc)
+                       dnl #
+                       AC_MSG_CHECKING(
+                               [whether new 2-argument shrinker exists])
+                       ZFS_LINUX_TRY_COMPILE([
+                               #include <linux/mm.h>
+
+                               int shrinker_cb(struct shrinker *,
+                                               struct shrink_control *sc);
+                       ],[
+                               struct shrinker cache_shrinker = {
+                                       .shrink = shrinker_cb,
+                                       .seeks = DEFAULT_SEEKS,
+                               };
+                               register_shrinker(&cache_shrinker);
+                       ],[
+                               AC_MSG_RESULT(yes)
+                               AC_DEFINE(HAVE_2ARGS_NEW_SHRINKER_CALLBACK, 1,
+                                       [new shrinker callback wants 2 args])
+                       ],[
+                               AC_MSG_RESULT(no)
+                               dnl #
+                               dnl # 3.12 API change,
+                               dnl # ->shrink() is logically split in to
+                               dnl # ->count_objects() and ->scan_objects()
+                               dnl #
+                               AC_MSG_CHECKING(
+                                   [whether ->count_objects callback exists])
+                               ZFS_LINUX_TRY_COMPILE([
+                                       #include <linux/mm.h>
+
+                                       unsigned long shrinker_cb(
+                                               struct shrinker *,
+                                               struct shrink_control *sc);
+                               ],[
+                                       struct shrinker cache_shrinker = {
+                                               .count_objects = shrinker_cb,
+                                               .scan_objects = shrinker_cb,
+                                               .seeks = DEFAULT_SEEKS,
+                                       };
+                                       register_shrinker(&cache_shrinker);
+                               ],[
+                                       AC_MSG_RESULT(yes)
+                                       AC_DEFINE(HAVE_SPLIT_SHRINKER_CALLBACK,
+                                               1, [->count_objects exists])
+                               ],[
+                                       AC_MSG_ERROR(error)
+                               ])
+                       ])
+               ])
+       ])
+       EXTRA_KCFLAGS="$tmp_flags"
+])
+
+dnl #
+dnl # 2.6.39 API change,
+dnl # Shrinker adjust to use common shrink_control structure.
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_SHRINK_CONTROL_STRUCT], [
+       AC_MSG_CHECKING([whether struct shrink_control exists])
+       ZFS_LINUX_TRY_COMPILE([
+               #include <linux/mm.h>
+       ],[
+               struct shrink_control sc __attribute__ ((unused));
+
+               sc.nr_to_scan = 0;
+               sc.gfp_mask = GFP_KERNEL;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_SHRINK_CONTROL_STRUCT, 1,
+                       [struct shrink_control exists])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+])
diff --git a/config/kernel-shrinker.m4 b/config/kernel-shrinker.m4
deleted file mode 100644 (file)
index 6fc9b54..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-AC_DEFUN([SPL_AC_SHRINKER_CALLBACK],[
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-Werror"
-       dnl #
-       dnl # 2.6.23 to 2.6.34 API change
-       dnl # ->shrink(int nr_to_scan, gfp_t gfp_mask)
-       dnl #
-       AC_MSG_CHECKING([whether old 2-argument shrinker exists])
-       SPL_LINUX_TRY_COMPILE([
-               #include <linux/mm.h>
-
-               int shrinker_cb(int nr_to_scan, gfp_t gfp_mask);
-       ],[
-               struct shrinker cache_shrinker = {
-                       .shrink = shrinker_cb,
-                       .seeks = DEFAULT_SEEKS,
-               };
-               register_shrinker(&cache_shrinker);
-       ],[
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_2ARGS_OLD_SHRINKER_CALLBACK, 1,
-                       [old shrinker callback wants 2 args])
-       ],[
-               AC_MSG_RESULT(no)
-               dnl #
-               dnl # 2.6.35 - 2.6.39 API change
-               dnl # ->shrink(struct shrinker *,
-               dnl #          int nr_to_scan, gfp_t gfp_mask)
-               dnl #
-               AC_MSG_CHECKING([whether old 3-argument shrinker exists])
-               SPL_LINUX_TRY_COMPILE([
-                       #include <linux/mm.h>
-
-                       int shrinker_cb(struct shrinker *, int nr_to_scan,
-                                       gfp_t gfp_mask);
-               ],[
-                       struct shrinker cache_shrinker = {
-                               .shrink = shrinker_cb,
-                               .seeks = DEFAULT_SEEKS,
-                       };
-                       register_shrinker(&cache_shrinker);
-               ],[
-                       AC_MSG_RESULT(yes)
-                       AC_DEFINE(HAVE_3ARGS_SHRINKER_CALLBACK, 1,
-                               [old shrinker callback wants 3 args])
-               ],[
-                       AC_MSG_RESULT(no)
-                       dnl #
-                       dnl # 3.0 - 3.11 API change
-                       dnl # ->shrink(struct shrinker *,
-                       dnl #          struct shrink_control *sc)
-                       dnl #
-                       AC_MSG_CHECKING(
-                               [whether new 2-argument shrinker exists])
-                       SPL_LINUX_TRY_COMPILE([
-                               #include <linux/mm.h>
-
-                               int shrinker_cb(struct shrinker *,
-                                               struct shrink_control *sc);
-                       ],[
-                               struct shrinker cache_shrinker = {
-                                       .shrink = shrinker_cb,
-                                       .seeks = DEFAULT_SEEKS,
-                               };
-                               register_shrinker(&cache_shrinker);
-                       ],[
-                               AC_MSG_RESULT(yes)
-                               AC_DEFINE(HAVE_2ARGS_NEW_SHRINKER_CALLBACK, 1,
-                                       [new shrinker callback wants 2 args])
-                       ],[
-                               AC_MSG_RESULT(no)
-                               dnl #
-                               dnl # 3.12 API change,
-                               dnl # ->shrink() is logically split in to
-                               dnl # ->count_objects() and ->scan_objects()
-                               dnl #
-                               AC_MSG_CHECKING(
-                                   [whether ->count_objects callback exists])
-                               SPL_LINUX_TRY_COMPILE([
-                                       #include <linux/mm.h>
-
-                                       unsigned long shrinker_cb(
-                                               struct shrinker *,
-                                               struct shrink_control *sc);
-                               ],[
-                                       struct shrinker cache_shrinker = {
-                                               .count_objects = shrinker_cb,
-                                               .scan_objects = shrinker_cb,
-                                               .seeks = DEFAULT_SEEKS,
-                                       };
-                                       register_shrinker(&cache_shrinker);
-                               ],[
-                                       AC_MSG_RESULT(yes)
-                                       AC_DEFINE(HAVE_SPLIT_SHRINKER_CALLBACK,
-                                               1, [->count_objects exists])
-                               ],[
-                                       AC_MSG_ERROR(error)
-                               ])
-                       ])
-               ])
-       ])
-       EXTRA_KCFLAGS="$tmp_flags"
-])
-
-dnl #
-dnl # 2.6.39 API change,
-dnl # Shrinker adjust to use common shrink_control structure.
-dnl #
-AC_DEFUN([SPL_AC_SHRINK_CONTROL_STRUCT], [
-       AC_MSG_CHECKING([whether struct shrink_control exists])
-       SPL_LINUX_TRY_COMPILE([
-               #include <linux/mm.h>
-       ],[
-               struct shrink_control sc __attribute__ ((unused));
-
-               sc.nr_to_scan = 0;
-               sc.gfp_mask = GFP_KERNEL;
-       ],[
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_SHRINK_CONTROL_STRUCT, 1,
-                       [struct shrink_control exists])
-       ],[
-               AC_MSG_RESULT(no)
-       ])
-])
index 136262d0e651b3737052228081222bfa056fb382..d6d6640070b54b6fd0add2e9319ca40a82c5b7ee 100644 (file)
@@ -3,11 +3,11 @@ dnl # 2.6.36 API change,
 dnl # The 'struct fs_struct->lock' was changed from a rwlock_t to
 dnl # a spinlock_t to improve the fastpath performance.
 dnl #
-AC_DEFUN([SPL_AC_FS_STRUCT_SPINLOCK], [
+AC_DEFUN([ZFS_AC_KERNEL_FS_STRUCT_SPINLOCK], [
        AC_MSG_CHECKING([whether struct fs_struct uses spinlock_t])
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="-Werror"
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/sched.h>
                #include <linux/fs_struct.h>
        ],[
index 93b5158b974d76e974e8e571a9514ba572c30c8d..4dc3f84ed47e1a016e567e9831e7f4bdbdb1e435 100644 (file)
@@ -6,11 +6,11 @@ dnl # (older kernels).  Also sanity check the from_timer() and timer_setup()
 dnl # macros are available as well, since they will be used in the same newer
 dnl # kernels that support the new timer_list.func signature.
 dnl #
-AC_DEFUN([SPL_AC_KERNEL_TIMER_FUNCTION_TIMER_LIST], [
+AC_DEFUN([ZFS_AC_KERNEL_TIMER_FUNCTION_TIMER_LIST], [
        AC_MSG_CHECKING([whether timer_list.function gets a timer_list])
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="-Werror"
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/timer.h>
                void task_expire(struct timer_list *tl) {}
        ],[
diff --git a/config/kernel-trim-unused-symbols.m4 b/config/kernel-trim-unused-symbols.m4
deleted file mode 100644 (file)
index d1ac2f3..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-dnl #
-dnl # config trim unused symbols,
-dnl # Verify the kernel has CONFIG_TRIM_UNUSED_KSYMS DISABLED.
-dnl #
-AC_DEFUN([SPL_AC_CONFIG_TRIM_UNUSED_KSYMS], [
-       AC_MSG_CHECKING([whether CONFIG_TRIM_UNUSED_KSYM is disabled])
-       SPL_LINUX_TRY_COMPILE([
-               #if defined(CONFIG_TRIM_UNUSED_KSYMS)
-               #error CONFIG_TRIM_UNUSED_KSYMS not defined
-               #endif
-       ],[ ],[
-               AC_MSG_RESULT([yes])
-       ],[
-               AC_MSG_RESULT([no])
-               AC_MSG_ERROR([
-       *** This kernel has unused symbols trimming enabled, please disable.
-       *** Rebuild the kernel with CONFIG_TRIM_UNUSED_KSYMS=n set.])
-       ])
-])
index 85beca6ddec4d17b489ab970e8e21a590a0c95e5..b5764de3ed626c02a13a8b94e1e909c345e7e940 100644 (file)
@@ -5,9 +5,9 @@ dnl # usleep_range is a finer precision implementation of msleep
 dnl # designed to be a drop-in replacement for udelay where a precise
 dnl # sleep / busy-wait is unnecessary.
 dnl #
-AC_DEFUN([SPL_AC_USLEEP_RANGE], [
+AC_DEFUN([ZFS_AC_KERNEL_USLEEP_RANGE], [
        AC_MSG_CHECKING([whether usleep_range() is available])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/delay.h>
        ],[
                usleep_range(0, 0);
index 3c42bf1a0380be913a8a8307c1ba98b67a737f69..a474f9f1745d838962e404aaedd6fec7f70e1f35 100644 (file)
@@ -2,9 +2,9 @@ dnl #
 dnl # 2.6.35 API change,
 dnl # Unused 'struct dentry *' removed from vfs_fsync() prototype.
 dnl #
-AC_DEFUN([SPL_AC_2ARGS_VFS_FSYNC], [
+AC_DEFUN([ZFS_AC_KERNEL_2ARGS_VFS_FSYNC], [
        AC_MSG_CHECKING([whether vfs_fsync() wants 2 args])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/fs.h>
        ],[
                vfs_fsync(NULL, 0);
index 7772cb514cb66bd03fe84c0d83c74fd8a258bfda..b13723538f15be917d7512eb9a73ce47bbaec7f5 100644 (file)
@@ -2,9 +2,9 @@ dnl #
 dnl # 4.11 API, a528d35e@torvalds/linux
 dnl # vfs_getattr(const struct path *p, struct kstat *s, u32 m, unsigned int f)
 dnl #
-AC_DEFUN([SPL_AC_4ARGS_VFS_GETATTR], [
+AC_DEFUN([ZFS_AC_KERNEL_4ARGS_VFS_GETATTR], [
        AC_MSG_CHECKING([whether vfs_getattr() wants 4 args])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/fs.h>
        ],[
                vfs_getattr((const struct path *)NULL,
@@ -24,9 +24,9 @@ dnl #
 dnl # 3.9 API
 dnl # vfs_getattr(struct path *p, struct kstat *s)
 dnl #
-AC_DEFUN([SPL_AC_2ARGS_VFS_GETATTR], [
+AC_DEFUN([ZFS_AC_KERNEL_2ARGS_VFS_GETATTR], [
        AC_MSG_CHECKING([whether vfs_getattr() wants 2 args])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/fs.h>
        ],[
                vfs_getattr((struct path *) NULL,
@@ -44,9 +44,9 @@ dnl #
 dnl # <3.9 API
 dnl # vfs_getattr(struct vfsmount *v, struct dentry *d, struct kstat *k)
 dnl #
-AC_DEFUN([SPL_AC_3ARGS_VFS_GETATTR], [
+AC_DEFUN([ZFS_AC_KERNEL_3ARGS_VFS_GETATTR], [
        AC_MSG_CHECKING([whether vfs_getattr() wants 3 args])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/fs.h>
        ],[
                vfs_getattr((struct vfsmount *)NULL,
index 5f718a160ff473295c03af3159d82efb04d94bce..d6442c1df6fbe56d1f6e13ccb2c44289b9f9cf77 100644 (file)
@@ -8,9 +8,9 @@ dnl # of just two functions: one which uses io_schedule() and one which just
 dnl # uses schedule().  This API change was made to consolidate all of those
 dnl # redundant wait functions.
 dnl #
-AC_DEFUN([SPL_AC_WAIT_ON_BIT], [
+AC_DEFUN([ZFS_AC_KERNEL_WAIT_ON_BIT], [
        AC_MSG_CHECKING([whether wait_on_bit() takes an action])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/wait.h>
        ],[
                int (*action)(void *) = NULL;
@@ -26,9 +26,9 @@ dnl #
 dnl # 4.13 API change
 dnl # Renamed struct wait_queue -> struct wait_queue_entry.
 dnl #
-AC_DEFUN([SPL_AC_WAIT_QUEUE_ENTRY_T], [
+AC_DEFUN([ZFS_AC_KERNEL_WAIT_QUEUE_ENTRY_T], [
        AC_MSG_CHECKING([whether wait_queue_entry_t exists])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/wait.h>
        ],[
                wait_queue_entry_t *entry __attribute__ ((unused));
@@ -46,9 +46,9 @@ dnl # 4.13 API change
 dnl # Renamed wait_queue_head::task_list -> wait_queue_head::head
 dnl # Renamed wait_queue_entry::task_list -> wait_queue_entry::entry
 dnl #
-AC_DEFUN([SPL_AC_WAIT_QUEUE_HEAD_ENTRY], [
+AC_DEFUN([ZFS_AC_KERNEL_WAIT_QUEUE_HEAD_ENTRY], [
        AC_MSG_CHECKING([whether wq_head->head and wq_entry->entry exist])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/wait.h>
 
                #ifdef HAVE_WAIT_QUEUE_ENTRY_T
index bb236466a8027b4c51fdbdbbc305716f155edf4b..3ca7cf682dad2d746c3ef133db2876fcbbbd7717 100644 (file)
@@ -2,9 +2,9 @@ dnl #
 dnl # zlib inflate compat,
 dnl # Verify the kernel has CONFIG_ZLIB_INFLATE support enabled.
 dnl #
-AC_DEFUN([SPL_AC_CONFIG_ZLIB_INFLATE], [
+AC_DEFUN([ZFS_AC_KERNEL_CONFIG_ZLIB_INFLATE], [
        AC_MSG_CHECKING([whether CONFIG_ZLIB_INFLATE is defined])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #if !defined(CONFIG_ZLIB_INFLATE) && \
                    !defined(CONFIG_ZLIB_INFLATE_MODULE)
                #error CONFIG_ZLIB_INFLATE not defined
@@ -23,9 +23,9 @@ dnl #
 dnl # zlib deflate compat,
 dnl # Verify the kernel has CONFIG_ZLIB_DEFLATE support enabled.
 dnl #
-AC_DEFUN([SPL_AC_CONFIG_ZLIB_DEFLATE], [
+AC_DEFUN([ZFS_AC_KERNEL_CONFIG_ZLIB_DEFLATE], [
        AC_MSG_CHECKING([whether CONFIG_ZLIB_DEFLATE is defined])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #if !defined(CONFIG_ZLIB_DEFLATE) && \
                    !defined(CONFIG_ZLIB_DEFLATE_MODULE)
                #error CONFIG_ZLIB_DEFLATE not defined
@@ -47,9 +47,9 @@ dnl # This was done to avoid always having to allocate the maximum size
 dnl # workspace (268K).  The caller can now specific the windowBits and
 dnl # memLevel compression parameters to get a smaller workspace.
 dnl #
-AC_DEFUN([SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE],
+AC_DEFUN([ZFS_AC_KERNEL_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE],
        [AC_MSG_CHECKING([whether zlib_deflate_workspacesize() wants 2 args])
-       SPL_LINUX_TRY_COMPILE([
+       ZFS_LINUX_TRY_COMPILE([
                #include <linux/zlib.h>
        ],[
                return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL);
index e3daeffa8117f9937113783388b1c291297765ae..8151cdc224e327acd89aadd558f2d978b54fc96d 100644 (file)
@@ -3,12 +3,39 @@ dnl # Default ZFS kernel configuration
 dnl #
 AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
        ZFS_AC_KERNEL
-       ZFS_AC_SPL
        ZFS_AC_QAT
        ZFS_AC_TEST_MODULE
        ZFS_AC_KERNEL_MISC_MINOR
        ZFS_AC_KERNEL_OBJTOOL
        ZFS_AC_KERNEL_CONFIG
+       ZFS_AC_KERNEL_CTL_NAME
+       ZFS_AC_KERNEL_PDE_DATA
+       ZFS_AC_KERNEL_SET_FS_PWD_WITH_CONST
+       ZFS_AC_KERNEL_2ARGS_VFS_FSYNC
+       ZFS_AC_KERNEL_FS_STRUCT_SPINLOCK
+       ZFS_AC_KERNEL_KUIDGID_T
+       ZFS_AC_KERNEL_FALLOCATE
+       ZFS_AC_KERNEL_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE
+       ZFS_AC_KERNEL_RWSEM_SPINLOCK_IS_RAW
+       ZFS_AC_KERNEL_RWSEM_ACTIVITY
+       ZFS_AC_KERNEL_RWSEM_ATOMIC_LONG_COUNT
+       ZFS_AC_KERNEL_SCHED_RT_HEADER
+       ZFS_AC_KERNEL_SCHED_SIGNAL_HEADER
+       ZFS_AC_KERNEL_IO_SCHEDULE_TIMEOUT
+       ZFS_AC_KERNEL_4ARGS_VFS_GETATTR
+       ZFS_AC_KERNEL_3ARGS_VFS_GETATTR
+       ZFS_AC_KERNEL_2ARGS_VFS_GETATTR
+       ZFS_AC_KERNEL_USLEEP_RANGE
+       ZFS_AC_KERNEL_KMEM_CACHE_ALLOCFLAGS
+       ZFS_AC_KERNEL_KMEM_CACHE_CREATE_USERCOPY
+       ZFS_AC_KERNEL_WAIT_ON_BIT
+       ZFS_AC_KERNEL_WAIT_QUEUE_ENTRY_T
+       ZFS_AC_KERNEL_WAIT_QUEUE_HEAD_ENTRY
+       ZFS_AC_KERNEL_INODE_LOCK
+       ZFS_AC_KERNEL_GROUP_INFO_GID
+       ZFS_AC_KERNEL_WRITE
+       ZFS_AC_KERNEL_READ
+       ZFS_AC_KERNEL_TIMER_FUNCTION_TIMER_LIST
        ZFS_AC_KERNEL_DECLARE_EVENT_CLASS
        ZFS_AC_KERNEL_CURRENT_BIO_TAIL
        ZFS_AC_KERNEL_SUPER_USER_NS
@@ -106,6 +133,8 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
        ZFS_AC_KERNEL_FST_MOUNT
        ZFS_AC_KERNEL_SHRINK
        ZFS_AC_KERNEL_SHRINK_CONTROL_HAS_NID
+       ZFS_AC_KERNEL_SHRINK_CONTROL_STRUCT
+       ZFS_AC_KERNEL_SHRINKER_CALLBACK
        ZFS_AC_KERNEL_S_INSTANCES_LIST_HEAD
        ZFS_AC_KERNEL_S_D_OP
        ZFS_AC_KERNEL_BDI
@@ -275,204 +304,6 @@ AC_DEFUN([ZFS_AC_KERNEL], [
        ZFS_AC_MODULE_SYMVERS
 ])
 
-
-dnl #
-dnl # Detect the SPL module to be built against
-dnl #
-AC_DEFUN([ZFS_AC_SPL], [
-       AC_ARG_WITH([spl],
-               AS_HELP_STRING([--with-spl=PATH],
-               [Path to spl source]),
-               AS_IF([test "$withval" = "yes"],
-                       AC_MSG_ERROR([--with-spl=PATH requires a PATH]),
-                       [splsrc="$withval"]))
-
-       AC_ARG_WITH([spl-obj],
-               AS_HELP_STRING([--with-spl-obj=PATH],
-               [Path to spl build objects]),
-               [splbuild="$withval"])
-
-       AC_ARG_WITH([spl-timeout],
-               AS_HELP_STRING([--with-spl-timeout=SECS],
-               [Wait SECS for SPL header and symver file @<:@default=0@:>@]),
-               [timeout="$withval"], [timeout=0])
-
-       dnl #
-       dnl # The existence of spl.release.in is used to identify a valid
-       dnl # source directory.  In order of preference:
-       dnl #
-       splsrc0="/var/lib/dkms/spl/${VERSION}/build"
-       splsrc1="/usr/local/src/spl-${VERSION}/${LINUX_VERSION}"
-       splsrc2="/usr/local/src/spl-${VERSION}"
-       splsrc3="/usr/src/spl-${VERSION}/${LINUX_VERSION}"
-       splsrc4="/usr/src/spl-${VERSION}"
-       splsrc5="../spl/"
-       splsrc6="$LINUX"
-
-       AC_MSG_CHECKING([spl source directory])
-       AS_IF([test -z "${splsrc}"], [
-               [all_spl_sources="
-               ${splsrc0}
-               ${splsrc1}
-               ${splsrc2}
-               ${splsrc3}
-               ${splsrc4}
-               ${splsrc5}
-               ${splsrc6}"],
-               AS_IF([ test -e "${splsrc0}/spl.release.in"], [
-                       splsrc=${splsrc0}
-               ], [ test -e "${splsrc1}/spl.release.in"], [
-                       splsrc=${splsrc1}
-               ], [ test -e "${splsrc2}/spl.release.in"], [
-                       splsrc=${splsrc2}
-               ], [ test -e "${splsrc3}/spl.release.in"], [
-                       splsrc=$(readlink -f "${splsrc3}")
-               ], [ test -e "${splsrc4}/spl.release.in" ], [
-                       splsrc=${splsrc4}
-               ], [ test -e "${splsrc5}/spl.release.in"], [
-                       splsrc=$(readlink -f "${splsrc5}")
-               ], [ test -e "${splsrc6}/spl.release.in" ], [
-                       splsrc=${splsrc6}
-               ], [
-                       splsrc="[Not found]"
-               ])
-       ], [
-               [all_spl_sources="$withval"],
-               AS_IF([test "$splsrc" = "NONE"], [
-                       splbuild=NONE
-                       splsrcver=NONE
-               ])
-       ])
-
-       AC_MSG_RESULT([$splsrc])
-       AS_IF([ test ! -e "$splsrc/spl.release.in"], [
-               AC_MSG_ERROR([
-       *** Please make sure the kmod spl devel package for your distribution
-       *** is installed then try again.  If that fails you can specify the
-       *** location of the spl source with the '--with-spl=PATH' option.
-       *** The spl version must match the version of ZFS you are building,
-       *** ${VERSION}.  Failed to find spl.release.in in the following:
-       $all_spl_sources])
-       ])
-
-       dnl #
-       dnl # The existence of the spl_config.h is used to identify a valid
-       dnl # spl object directory.  In many cases the object and source
-       dnl # directory are the same, however the objects may also reside
-       dnl # is a subdirectory named after the kernel version.
-       dnl #
-       dnl # This file is supposed to be available after DKMS finishes
-       dnl # building the SPL kernel module for the target kernel.  The
-       dnl # '--with-spl-timeout' option can be passed to pause here,
-       dnl # waiting for the file to appear from a concurrently building
-       dnl # SPL package.
-       dnl #
-       AC_MSG_CHECKING([spl build directory])
-
-       all_spl_config_locs="${splsrc}/${LINUX_VERSION}
-       ${splsrc}"
-
-       while true; do
-               AS_IF([test -z "$splbuild"], [
-                       AS_IF([ test -e "${splsrc}/${LINUX_VERSION}/spl_config.h" ], [
-                               splbuild="${splsrc}/${LINUX_VERSION}"
-                       ], [ test -e "${splsrc}/spl_config.h" ], [
-                               splbuild="${splsrc}"
-                       ], [ find -L "${splsrc}" -name spl_config.h 2> /dev/null | grep -wq spl_config.h ], [
-                               splbuild=$(find -L "${splsrc}" -name spl_config.h | sed 's,/spl_config.h,,')
-                       ], [
-                               splbuild="[Not found]"
-                       ])
-               ])
-               AS_IF([test -e "$splbuild/spl_config.h" -o $timeout -le 0], [
-                       break;
-               ], [
-                       sleep 1
-                       timeout=$((timeout-1))
-               ])
-       done
-
-       AC_MSG_RESULT([$splbuild])
-       AS_IF([ ! test -e "$splbuild/spl_config.h"], [
-               AC_MSG_ERROR([
-       *** Please make sure the kmod spl devel <kernel> package for your
-       *** distribution is installed then try again.  If that fails you
-       *** can specify the location of the spl objects with the
-       *** '--with-spl-obj=PATH' option.  Failed to find spl_config.h in
-       *** any of the following:
-       $all_spl_config_locs])
-       ])
-
-       AC_MSG_CHECKING([spl source version])
-       AS_IF([test -r $splbuild/spl_config.h &&
-               fgrep -q SPL_META_VERSION $splbuild/spl_config.h], [
-
-               splsrcver=`(echo "#include <spl_config.h>";
-                           echo "splsrcver=SPL_META_VERSION-SPL_META_RELEASE") |
-                           cpp -I $splbuild |
-                           grep "^splsrcver=" | tr -d \" | cut -d= -f2`
-       ])
-
-       AS_IF([test -z "$splsrcver"], [
-               AC_MSG_RESULT([Not found])
-               AC_MSG_ERROR([
-       *** Cannot determine the version of the spl source.
-       *** Please prepare the spl source before running this script])
-       ])
-
-       AC_MSG_RESULT([$splsrcver])
-
-       SPL=${splsrc}
-       SPL_OBJ=${splbuild}
-       SPL_VERSION=${splsrcver}
-
-       AC_SUBST(SPL)
-       AC_SUBST(SPL_OBJ)
-       AC_SUBST(SPL_VERSION)
-
-       dnl #
-       dnl # Detect the name used for the SPL Module.symvers file.  If one
-       dnl # does not exist this is likely because the SPL has been configured
-       dnl # but not built.  The '--with-spl-timeout' option can be passed
-       dnl # to pause here, waiting for the file to appear from a concurrently
-       dnl # building SPL package.  If the file does not appear in time, a good
-       dnl # guess is made as to what this file will be named based on what it
-       dnl # is named in the kernel build products.  This file will first be
-       dnl # used at link time so if the guess is wrong the build will fail
-       dnl # then.  This unfortunately means the ZFS package does not contain a
-       dnl # reliable mechanism to detect symbols exported by the SPL at
-       dnl # configure time.
-       dnl #
-       AC_MSG_CHECKING([spl file name for module symbols])
-       SPL_SYMBOLS=NONE
-
-       while true; do
-               AS_IF([test -r $SPL_OBJ/Module.symvers], [
-                       SPL_SYMBOLS=Module.symvers
-               ], [test -r $SPL_OBJ/Modules.symvers], [
-                       SPL_SYMBOLS=Modules.symvers
-               ], [test -r $SPL_OBJ/module/Module.symvers], [
-                       SPL_SYMBOLS=Module.symvers
-               ], [test -r $SPL_OBJ/module/Modules.symvers], [
-                       SPL_SYMBOLS=Modules.symvers
-               ])
-
-               AS_IF([test $SPL_SYMBOLS != NONE -o $timeout -le 0], [
-                       break;
-               ], [
-                       sleep 1
-                       timeout=$((timeout-1))
-               ])
-       done
-
-       AS_IF([test "$SPL_SYMBOLS" = NONE], [
-               SPL_SYMBOLS=$LINUX_SYMBOLS
-       ])
-
-       AC_MSG_RESULT([$SPL_SYMBOLS])
-       AC_SUBST(SPL_SYMBOLS)
-])
-
 dnl #
 dnl # Detect the QAT module to be built against
 dnl # QAT provides hardware acceleration for data compression:
@@ -603,6 +434,9 @@ AC_DEFUN([ZFS_AC_KERNEL_CONFIG], [
 
        ZFS_AC_KERNEL_CONFIG_THREAD_SIZE
        ZFS_AC_KERNEL_CONFIG_DEBUG_LOCK_ALLOC
+       ZFS_AC_KERNEL_CONFIG_TRIM_UNUSED_KSYMS
+       ZFS_AC_KERNEL_CONFIG_ZLIB_INFLATE
+       ZFS_AC_KERNEL_CONFIG_ZLIB_DEFLATE
 ])
 
 dnl #
@@ -672,6 +506,27 @@ AC_DEFUN([ZFS_AC_KERNEL_CONFIG_DEBUG_LOCK_ALLOC], [
        ], [])
 ])
 
+dnl #
+dnl # Check CONFIG_TRIM_UNUSED_KSYMS
+dnl #
+dnl # Verify the kernel has CONFIG_TRIM_UNUSED_KSYMS disabled.
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_CONFIG_TRIM_UNUSED_KSYMS], [
+       AC_MSG_CHECKING([whether CONFIG_TRIM_UNUSED_KSYM is disabled])
+       ZFS_LINUX_TRY_COMPILE([
+               #if defined(CONFIG_TRIM_UNUSED_KSYMS)
+               #error CONFIG_TRIM_UNUSED_KSYMS not defined
+               #endif
+       ],[ ],[
+               AC_MSG_RESULT([yes])
+       ],[
+               AC_MSG_RESULT([no])
+               AC_MSG_ERROR([
+       *** This kernel has unused symbols trimming enabled, please disable.
+       *** Rebuild the kernel with CONFIG_TRIM_UNUSED_KSYMS=n set.])
+       ])
+])
+
 dnl #
 dnl # ZFS_LINUX_CONFTEST_H
 dnl #
index 49a4096d6887580e31585e56adf23703e19dd9e7..1d47b038484e57e8631e0b86d6038bdb25c1ba7e 100644 (file)
@@ -95,6 +95,63 @@ AC_DEFUN([ZFS_AC_DEBUGINFO], [
        AC_MSG_RESULT([$enable_debuginfo])
 ])
 
+dnl #
+dnl # Disabled by default, provides basic memory tracking.  Track the total
+dnl # number of bytes allocated with kmem_alloc() and freed with kmem_free().
+dnl # Then at module unload time if any bytes were leaked it will be reported
+dnl # on the console.
+dnl #
+AC_DEFUN([ZFS_AC_DEBUG_KMEM], [
+       AC_MSG_CHECKING([whether basic kmem accounting is enabled])
+       AC_ARG_ENABLE([debug-kmem],
+               [AS_HELP_STRING([--enable-debug-kmem],
+               [Enable basic kmem accounting @<:@default=no@:>@])],
+               [],
+               [enable_debug_kmem=no])
+
+       AS_IF([test "x$enable_debug_kmem" = xyes], [
+               KERNEL_DEBUG_CPPFLAGS+=" -DDEBUG_KMEM"
+               DEBUG_KMEM_ZFS="_with_debug_kmem"
+       ], [
+               DEBUG_KMEM_ZFS="_without_debug_kmem"
+       ])
+
+       AC_SUBST(KERNEL_DEBUG_CPPFLAGS)
+       AC_SUBST(DEBUG_KMEM_ZFS)
+
+       AC_MSG_RESULT([$enable_debug_kmem])
+])
+
+dnl #
+dnl # Disabled by default, provides detailed memory tracking.  This feature
+dnl # also requires --enable-debug-kmem to be set.  When enabled not only will
+dnl # total bytes be tracked but also the location of every kmem_alloc() and
+dnl # kmem_free().  When the module is unloaded a list of all leaked addresses
+dnl # and where they were allocated will be dumped to the console.  Enabling
+dnl # this feature has a significant impact on performance but it makes finding
+dnl # memory leaks straight forward.
+dnl #
+AC_DEFUN([ZFS_AC_DEBUG_KMEM_TRACKING], [
+       AC_MSG_CHECKING([whether detailed kmem tracking is enabled])
+       AC_ARG_ENABLE([debug-kmem-tracking],
+               [AS_HELP_STRING([--enable-debug-kmem-tracking],
+               [Enable detailed kmem tracking  @<:@default=no@:>@])],
+               [],
+               [enable_debug_kmem_tracking=no])
+
+       AS_IF([test "x$enable_debug_kmem_tracking" = xyes], [
+               KERNEL_DEBUG_CPPFLAGS+=" -DDEBUG_KMEM_TRACKING"
+               DEBUG_KMEM_TRACKING_ZFS="_with_debug_kmem_tracking"
+       ], [
+               DEBUG_KMEM_TRACKING_ZFS="_without_debug_kmem_tracking"
+       ])
+
+       AC_SUBST(KERNEL_DEBUG_CPPFLAGS)
+       AC_SUBST(DEBUG_KMEM_TRACKING_ZFS)
+
+       AC_MSG_RESULT([$enable_debug_kmem_tracking])
+])
+
 AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
        ZFS_AC_CONFIG_ALWAYS_CC_NO_UNUSED_BUT_SET_VARIABLE
        ZFS_AC_CONFIG_ALWAYS_CC_NO_BOOL_COMPARE
@@ -183,10 +240,11 @@ AC_DEFUN([ZFS_AC_RPM], [
        ])
 
        RPM_DEFINE_COMMON='--define "$(DEBUG_ZFS) 1"'
+       RPM_DEFINE_COMMON+=' --define "$(DEBUG_KMEM_ZFS) 1"'
+       RPM_DEFINE_COMMON+=' --define "$(DEBUG_KMEM_TRACKING_ZFS) 1"'
        RPM_DEFINE_COMMON+=' --define "$(DEBUGINFO_ZFS) 1"'
        RPM_DEFINE_COMMON+=' --define "$(ASAN_ZFS) 1"'
 
-
        RPM_DEFINE_UTIL=' --define "_initconfdir $(DEFAULT_INITCONF_DIR)"'
 
        dnl # Make the next three RPM_DEFINE_UTIL additions conditional, since
@@ -221,8 +279,6 @@ AC_DEFUN([ZFS_AC_RPM], [
        ])
 
        RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)"'
-       RPM_DEFINE_KMOD+=' --define "require_spldir $(SPL)"'
-       RPM_DEFINE_KMOD+=' --define "require_splobj $(SPL_OBJ)"'
        RPM_DEFINE_KMOD+=' --define "ksrc $(LINUX)"'
        RPM_DEFINE_KMOD+=' --define "kobj $(LINUX_OBJ)"'
        RPM_DEFINE_KMOD+=' --define "_wrong_version_format_terminate_build 0"'
index 3e1429d99d80c9a362125ebc6de01459d4a88e03..aa0fc1420933b31446891d6a12b3068c00c2dad7 100644 (file)
@@ -60,9 +60,12 @@ AC_DEFUN([ZFS_AC_META], [
 
                ZFS_META_VERSION=_ZFS_AC_META_GETVAL([Version]);
                if test -n "$ZFS_META_VERSION"; then
-                       AC_DEFINE_UNQUOTED([ZFS_META_VERSION], ["$ZFS_META_VERSION"],
-                               [Define the project version.]
-                       )
+                       AC_DEFINE_UNQUOTED([ZFS_META_VERSION],
+                           ["$ZFS_META_VERSION"],
+                           [Define the project version.])
+                       AC_DEFINE_UNQUOTED([SPL_META_VERSION],
+                           [ZFS_META_VERSION],
+                           [Defined for legacy compatibility.])
                        AC_SUBST([ZFS_META_VERSION])
                fi
 
@@ -86,9 +89,12 @@ AC_DEFUN([ZFS_AC_META], [
                fi
 
                if test -n "$ZFS_META_RELEASE"; then
-                       AC_DEFINE_UNQUOTED([ZFS_META_RELEASE], ["$ZFS_META_RELEASE"],
-                               [Define the project release.]
-                       )
+                       AC_DEFINE_UNQUOTED([ZFS_META_RELEASE],
+                            ["$ZFS_META_RELEASE"],
+                            [Define the project release.])
+                       AC_DEFINE_UNQUOTED([SPL_META_RELEASE],
+                           [ZFS_META_RELEASE],
+                           [Defined for legacy compatibility.])
                        AC_SUBST([ZFS_META_RELEASE])
 
                        RELEASE="$ZFS_META_RELEASE"
@@ -108,9 +114,11 @@ AC_DEFUN([ZFS_AC_META], [
                                test -n "$ZFS_META_RELEASE" && 
                                        ZFS_META_ALIAS="$ZFS_META_ALIAS-$ZFS_META_RELEASE"
                                AC_DEFINE_UNQUOTED([ZFS_META_ALIAS],
-                                       ["$ZFS_META_ALIAS"],
-                                       [Define the project alias string.] 
-                               )
+                                   ["$ZFS_META_ALIAS"],
+                                   [Define the project alias string.])
+                               AC_DEFINE_UNQUOTED([SPL_META_ALIAS],
+                                   [ZFS_META_ALIAS],
+                                   [Defined for legacy compatibility.])
                                AC_SUBST([ZFS_META_ALIAS])
                fi
 
index a57724c13a6a4b233fdfdf1c15c8b3fd1e480192..e171e785f6ef7b95f99bb9efcd3fd6cfc1ff8596 100644 (file)
@@ -57,6 +57,8 @@ ZFS_AC_PACKAGE
 ZFS_AC_CONFIG
 ZFS_AC_DEBUG
 ZFS_AC_DEBUGINFO
+ZFS_AC_DEBUG_KMEM
+ZFS_AC_DEBUG_KMEM_TRACKING
 
 AC_CONFIG_FILES([
        Makefile
@@ -135,8 +137,12 @@ AC_CONFIG_FILES([
        module/zfs/Makefile
        module/lua/Makefile
        module/icp/Makefile
+       module/spl/Makefile
        include/Makefile
        include/linux/Makefile
+       include/spl/Makefile
+       include/spl/rpc/Makefile
+       include/spl/sys/Makefile
        include/sys/Makefile
        include/sys/fs/Makefile
        include/sys/fm/Makefile
index 795025b380118ab0ef059c6169f3ab9c80bc6c1b..02c0926c325ea542786f3494a6489704f5ca97cd 100755 (executable)
@@ -32,7 +32,7 @@ make clean || true
 rm -rf "$KERNEL_DIR/include/zfs" "$KERNEL_DIR/fs/zfs"
 cp --recursive include "$KERNEL_DIR/include/zfs"
 cp --recursive module "$KERNEL_DIR/fs/zfs"
-cp zfs_config.h "$KERNEL_DIR/"
+cp zfs_config.h "$KERNEL_DIR/include/zfs/"
 
 for MODULE in "${MODULES[@]}"
 do
@@ -43,7 +43,6 @@ done
 cat > "$KERNEL_DIR/fs/zfs/Kconfig" <<"EOF"
 config ZFS
        tristate "ZFS filesystem support"
-       depends on SPL
        depends on EFI_PARTITION
        select ZLIB_INFLATE
        select ZLIB_DEFLATE
@@ -60,11 +59,10 @@ EOF
 {
        cat <<-"EOF"
        ZFS_MODULE_CFLAGS  = -I$(srctree)/include/zfs
-       ZFS_MODULE_CFLAGS += -I$(srctree)/include/spl
-       ZFS_MODULE_CFLAGS += -include $(srctree)/spl_config.h
-       ZFS_MODULE_CFLAGS += -include $(srctree)/zfs_config.h
+       ZFS_MODULE_CFLAGS += -I$(srctree)/include/zfs/spl
+       ZFS_MODULE_CFLAGS += -include $(srctree)/include/zfs/zfs_config.h
        ZFS_MODULE_CFLAGS += -std=gnu99 -Wno-declaration-after-statement
-       ZFS_MODULE_CPPFLAGS  = -DHAVE_SPL -D_KERNEL
+       ZFS_MODULE_CPPFLAGS  = -D_KERNEL
        ZFS_MODULE_CPPFLAGS += -UDEBUG -DNDEBUG
        export ZFS_MODULE_CFLAGS ZFS_MODULE_CPPFLAGS
 
index 23e15dac4bdce9607d97c7128848bd05d27a4929..5f13505f27909a800223f2119f8fb510714250d3 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = linux sys
+SUBDIRS = linux spl sys
 
 COMMON_H = \
        $(top_srcdir)/include/zfeature_common.h \
index 89c2689f6f0c0b2006f89bf900b5d9bad6af7808..efb49520e63cb99d8f7d0b73c72649753578dfeb 100644 (file)
@@ -10,7 +10,8 @@ KERNEL_H = \
        $(top_srcdir)/include/linux/simd_x86.h \
        $(top_srcdir)/include/linux/simd_aarch64.h \
        $(top_srcdir)/include/linux/mod_compat.h \
-       $(top_srcdir)/include/linux/page_compat.h
+       $(top_srcdir)/include/linux/page_compat.h \
+       $(top_srcdir)/include/linux/compiler_compat.h
 
 USER_H =
 
index f99980ab3e0fdb383a1ed006761ecc2ab3567f07..c42cdd37a47b216e6e0b0a020bda22868845190f 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/blkdev.h>
 #include <linux/elevator.h>
 #include <linux/backing-dev.h>
+#include <linux/hdreg.h>
 
 #ifndef HAVE_FMODE_T
 typedef unsigned __bitwise__ fmode_t;
diff --git a/include/linux/compiler_compat.h b/include/linux/compiler_compat.h
new file mode 100644 (file)
index 0000000..921d32f
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * 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
+ */
+
+/*
+ * Copyright (C) 2018 Lawrence Livermore National Security, LLC.
+ */
+
+#ifndef _ZFS_COMPILER_COMPAT_H
+#define        _ZFS_COMPILER_COMPAT_H
+
+#include <linux/compiler.h>
+
+#if !defined(READ_ONCE)
+#define        READ_ONCE(x)            ACCESS_ONCE(x)
+#endif
+
+#endif /* _ZFS_COMPILER_COMPAT_H */
diff --git a/include/spl/Makefile.am b/include/spl/Makefile.am
new file mode 100644 (file)
index 0000000..bd781c0
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS = rpc sys
diff --git a/include/spl/rpc/Makefile.am b/include/spl/rpc/Makefile.am
new file mode 100644 (file)
index 0000000..5110cc0
--- /dev/null
@@ -0,0 +1,7 @@
+KERNEL_H = \
+       $(top_srcdir)/include/spl/rpc/xdr.h
+
+if CONFIG_KERNEL
+kerneldir = @prefix@/src/zfs-$(VERSION)/include/spl/rpc
+kernel_HEADERS = $(KERNEL_H)
+endif
diff --git a/include/spl/sys/Makefile.am b/include/spl/sys/Makefile.am
new file mode 100644 (file)
index 0000000..d58ed0e
--- /dev/null
@@ -0,0 +1,61 @@
+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/dkioc_free_util.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/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
+
+if CONFIG_KERNEL
+kerneldir = @prefix@/src/zfs-$(VERSION)/include/spl/sys
+kernel_HEADERS = $(KERNEL_H)
+endif
index a4a4580666a6e7102a83ce19a261012311525b03..692d6c61ecbefbee69569c8759fb65f0a6511337 100644 (file)
@@ -92,7 +92,6 @@ void spl_dumpstack(void);
  */
 #ifdef NDEBUG
 
-#define        SPL_DEBUG_STR           ""
 #define        ASSERT(x)               ((void)0)
 #define        ASSERTV(x)
 #define        ASSERT3B(x,y,z)         ((void)0)
@@ -108,7 +107,6 @@ void spl_dumpstack(void);
  */
 #else
 
-#define        SPL_DEBUG_STR           " (DEBUG mode)"
 #define        ASSERT(cond)            VERIFY(cond)
 #define        ASSERTV(x)              x
 #define        ASSERT3B(x,y,z)         VERIFY3B(x, y, z)
diff --git a/include/spl/sys/errno.h b/include/spl/sys/errno.h
new file mode 100644 (file)
index 0000000..6015b1a
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (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
+ */
+/*
+ * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*     Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T     */
+/*       All Rights Reserved   */
+
+/*
+ * University Copyright- Copyright (c) 1982, 1986, 1988
+ * The Regents of the University of California
+ * All Rights Reserved
+ *
+ * University Acknowledgment- Portions of this document are derived from
+ * software developed by the University of California, Berkeley, and its
+ * contributors.
+ */
+
+#ifndef _SYS_ERRNO_H
+#define        _SYS_ERRNO_H
+
+#include <linux/errno.h>
+
+#define        ENOTSUP         EOPNOTSUPP
+
+#endif /* _SYS_ERRNO_H */
index f906d49d4a7489867644ee405cdfb88f1115113f..ed0cd4932cfa823702b0a903a8be1cc79d27f687 100644 (file)
@@ -28,6 +28,7 @@
 #include <sys/types.h>
 #include <linux/mutex.h>
 #include <linux/lockdep.h>
+#include <linux/compiler_compat.h>
 
 typedef enum {
        MUTEX_DEFAULT   = 0,
@@ -59,7 +60,7 @@ spl_mutex_clear_owner(kmutex_t *mp)
        mp->m_owner = NULL;
 }
 
-#define        mutex_owner(mp)         (ACCESS_ONCE((mp)->m_owner))
+#define        mutex_owner(mp)         (READ_ONCE((mp)->m_owner))
 #define        mutex_owned(mp)         (mutex_owner(mp) == current)
 #define        MUTEX_HELD(mp)          mutex_owned(mp)
 #define        MUTEX_NOT_HELD(mp)      (!MUTEX_HELD(mp))
index b44ceab667f7cc13e5118865d9afbb3d708cb939..088e28b443ce7f0d223cacda6492168fccd5ecbe 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <sys/types.h>
 #include <linux/rwsem.h>
+#include <linux/sched.h>
 
 /* Linux kernel compatibility */
 #if defined(CONFIG_PREEMPT_RT_FULL)
index 839e7fd8c483a0905fe2f7ce70e00877c6dfddbf..e4bd80aa13209cdfe6a7edf0144d8277771999fe 100644 (file)
@@ -79,7 +79,6 @@
 #define        max_ncpus                       num_possible_cpus()
 #define        boot_ncpus                      num_online_cpus()
 #define        CPU_SEQID                       smp_processor_id()
-#define        _NOTE(x)
 #define        is_system_labeled()             0
 
 #ifndef RLIM64_INFINITY
index a5b478127a78ceec0243e2a7ba3802d065c6302e..3bb3ed3e25efe4dff5cdb6fe2227c29170a70dd5 100644 (file)
 #include <linux/types.h>
 
 #ifndef ULLONG_MAX
-#define        ULLONG_MAX                      (~0ULL)
+#define        ULLONG_MAX              (~0ULL)
 #endif
 
 #ifndef LLONG_MAX
-#define        LLONG_MAX                       ((long long)(~0ULL>>1))
+#define        LLONG_MAX               ((long long)(~0ULL>>1))
 #endif
 
 typedef enum {
index a3f7828e743724acce500ee8d7d793e30a076faf..d3b903f13a570d24100e1273cea8fa308ca132e1 100644 (file)
@@ -86,7 +86,7 @@
 #define        AT_MTIME        ATTR_MTIME
 #define        AT_CTIME        ATTR_CTIME
 
-#define        ATTR_XVATTR     (1 << 31)
+#define        ATTR_XVATTR     (1U << 31)
 #define        AT_XVATTR       ATTR_XVATTR
 
 #define        ATTR_IATTR_MASK (ATTR_MODE | ATTR_UID | ATTR_GID | ATTR_SIZE | \
@@ -120,7 +120,7 @@ typedef enum vtype {
 
 typedef struct vattr {
        enum vtype      va_type;        /* vnode type */
-       uint_t          va_mask;        /* attribute bit-mask */
+       uint32_t        va_mask;        /* attribute bit-mask */
        ushort_t        va_mode;        /* acc mode */
        uid_t           va_uid;         /* owner uid */
        gid_t           va_gid;         /* owner gid */
index e73be52f3ec83f4f1dee2b389fd84fbb3c0b2e24..06306b87643ea0b0e28df0e2d32a733bc871a1bf 100644 (file)
@@ -42,6 +42,7 @@ COMMON_H = \
        $(top_srcdir)/include/sys/mmp.h \
        $(top_srcdir)/include/sys/mntent.h \
        $(top_srcdir)/include/sys/multilist.h \
+       $(top_srcdir)/include/sys/note.h \
        $(top_srcdir)/include/sys/nvpair.h \
        $(top_srcdir)/include/sys/nvpair_impl.h \
        $(top_srcdir)/include/sys/pathname.h \
index cd7105013705e2eb9c2b547541a41db2c0a0367a..077bb9d17618bde4d530fc54375aae5132b25794 100644 (file)
@@ -27,7 +27,6 @@
 #define        _ABD_H
 
 #include <sys/isa_defs.h>
-#include <sys/int_types.h>
 #include <sys/debug.h>
 #include <sys/refcount.h>
 #ifdef _KERNEL
@@ -116,7 +115,7 @@ int abd_cmp(abd_t *, abd_t *);
 int abd_cmp_buf_off(abd_t *, const void *, size_t, size_t);
 void abd_zero_off(abd_t *, size_t, size_t);
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 unsigned int abd_scatter_bio_map_off(struct bio *, abd_t *, unsigned int,
                size_t);
 unsigned long abd_nr_pages_off(abd_t *, unsigned int, size_t);
index 74aef3a92270e06356aaefd730f8eefc7e13efaf..78031f7c15ec390eebf17a9cdd863bca58371d8f 100644 (file)
@@ -31,7 +31,6 @@ extern "C" {
 #endif
 
 #ifdef _KERNEL
-#include <sys/varargs.h>
 #include <sys/nvpair.h>
 #else
 #include <libnvpair.h>
diff --git a/include/sys/note.h b/include/sys/note.h
new file mode 100644 (file)
index 0000000..33b5476
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (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
+ */
+/*
+ * Copyright (c) 1994 by Sun Microsystems, Inc.
+ */
+
+/*
+ * sys/note.h: interface for annotating source with info for tools
+ *
+ * This is the underlying interface; NOTE (/usr/include/note.h) is the
+ * preferred interface, but all exported header files should include this
+ * file directly and use _NOTE so as not to take "NOTE" from the user's
+ * namespace.  For consistency, *all* kernel source should use _NOTE.
+ *
+ * By default, annotations expand to nothing.  This file implements
+ * that.  Tools using annotations will interpose a different version
+ * of this file that will expand annotations as needed.
+ */
+
+#ifndef        _SYS_NOTE_H
+#define        _SYS_NOTE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _NOTE
+#define        _NOTE(s)
+#endif
+
+#define        NOTE(s) _NOTE(s)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SYS_NOTE_H */
index d2dfad5ca2b3f5ef57995d46233a4212c105cad2..a840c4b05b22b7f6f428e73da9d459b76b149bfb 100644 (file)
 #include <sys/types.h>
 #include <sys/time.h>
 #include <sys/errno.h>
-#include <sys/va_list.h>
-
-#if defined(_KERNEL) && !defined(_BOOT)
-#include <sys/kmem.h>
-#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -142,7 +137,7 @@ struct nv_alloc_ops {
 extern const nv_alloc_ops_t *nv_fixed_ops;
 extern nv_alloc_t *nv_alloc_nosleep;
 
-#if defined(_KERNEL) && !defined(_BOOT)
+#if defined(_KERNEL)
 extern nv_alloc_t *nv_alloc_sleep;
 extern nv_alloc_t *nv_alloc_pushpage;
 #endif
index 1c919454d8eb712ee5349bb284d47a40ac4c3c51..68610c496b1410ca466e882dbfeed07922e05875 100644 (file)
@@ -40,6 +40,7 @@
 #define        _SYS_XVATTR_H
 
 #include <sys/vnode.h>
+#include <sys/strings.h>
 
 #define        AV_SCANSTAMP_SZ 32              /* length of anti-virus scanstamp */
 
index 37bdc533c4cf08ebcb4e47c9ed88a4ba2ff54e42..170a909b4e4b8c79273ccbfe2b2a9631ac2a8498 100644 (file)
 
 #include <sys/note.h>
 #include <sys/types.h>
-#include <sys/t_lock.h>
 #include <sys/atomic.h>
 #include <sys/sysmacros.h>
-#include <sys/bitmap.h>
+#include <sys/vmsystm.h>
+#include <sys/condvar.h>
 #include <sys/cmn_err.h>
 #include <sys/kmem.h>
 #include <sys/kmem_cache.h>
 #include <sys/vmem.h>
 #include <sys/taskq.h>
-#include <sys/buf.h>
 #include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/cpuvar.h>
 #include <sys/kobj.h>
-#include <sys/conf.h>
 #include <sys/disp.h>
 #include <sys/debug.h>
 #include <sys/random.h>
+#include <sys/strings.h>
 #include <sys/byteorder.h>
-#include <sys/systm.h>
 #include <sys/list.h>
 #include <sys/uio_impl.h>
-#include <sys/dirent.h>
 #include <sys/time.h>
-#include <vm/seg_kmem.h>
 #include <sys/zone.h>
 #include <sys/sdt.h>
 #include <sys/kstat.h>
@@ -76,8 +70,6 @@
 #define        _SYS_MUTEX_H
 #define        _SYS_RWLOCK_H
 #define        _SYS_CONDVAR_H
-#define        _SYS_SYSTM_H
-#define        _SYS_T_LOCK_H
 #define        _SYS_VNODE_H
 #define        _SYS_VFS_H
 #define        _SYS_SUNDDI_H
index b56a7daa7c639e118f0d1fa8cf0de0560022497e..40e617dba9615a373209d1edefdea5038deb4a37 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef        _SYS_FS_ZFS_DELAY_H
 #define        _SYS_FS_ZFS_DELAY_H
 
-#include <linux/delay_compat.h>
+#include <sys/timer.h>
 
 /*
  * Generic wrapper to sleep until a given time.
index 0feb3ce4bb7caf7c691088b2a41ea44893ea55a2..5c56f7fccc2af89f61bcd3b634060e4829393586 100644 (file)
@@ -27,7 +27,6 @@
 #define        _SYS_FS_ZFS_FUID_H
 
 #ifdef _KERNEL
-#include <sys/kidmap.h>
 #include <sys/sid.h>
 #include <sys/dmu.h>
 #include <sys/zfs_vfsops.h>
index 311babe59151963350f54800a1026c8d61c583eb..3f2bd1fbb149110bad862b3df3a16f3a9ff76f08 100644 (file)
@@ -30,7 +30,6 @@
 #ifdef _KERNEL
 #include <sys/isa_defs.h>
 #include <sys/types32.h>
-#include <sys/attr.h>
 #include <sys/list.h>
 #include <sys/dmu.h>
 #include <sys/sa.h>
index 65ed4313603545988644cf67065f78d8e914d99f..5df7bd1ac9c6e77dbdb0473d3e07a3331f6153ae 100644 (file)
@@ -31,7 +31,6 @@
 #include <linux/dcache_compat.h>
 #include <linux/exportfs.h>
 #include <linux/falloc.h>
-#include <linux/file_compat.h>
 #include <linux/parser.h>
 #include <linux/task_io_accounting_ops.h>
 #include <linux/vfs_compat.h>
index e8a5ddd318bc823a1c1e53fdfe902ab955822527..455fe527da4f6dfaa47494554c0b673e1dea1154 100644 (file)
@@ -27,6 +27,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
+#include <string.h>
 #include <strings.h>
 #include <unistd.h>
 #include <uuid/uuid.h>
index 0cf38c9505c487385a648f84f068ba7cfc111c49..2e9ea1c174e955ce1bbbbd21ea4ced0093e9440b 100644 (file)
@@ -28,8 +28,8 @@
 #include <libintl.h>
 #include <sys/types.h>
 #include <sys/inttypes.h>
+#include <sys/note.h>
 #include <stdarg.h>
-#include <note.h>
 #include "libnvpair.h"
 
 /*
index 0cfd42c1af0e50bac726bfb41db64f5700135217..5c8976e15aa61444f58cf7640bc350ef890b66e0 100644 (file)
  */
 
 #include <stdio.h>
+#include <string.h>
 #include <strings.h>
 #include <fcntl.h>
+#include <errno.h>
 #include <sys/wait.h>
 #include <unistd.h>
 #include <libzfs.h>
index 76145bd9316a147ad5e8f3bf66e13f9ce934faa0..ffae5699c0161f3a87981b345b7692f1ff01f0e4 100644 (file)
@@ -48,6 +48,7 @@
 #include <time.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <strings.h>
 #include <fcntl.h>
 #include <sys/wait.h>
index 7882c1b9c6d3f52f6451bcdf2589587072ef7bfd..7f4098a16aaf7775565a6cd2520b2d0726beb5f9 100644 (file)
@@ -4,19 +4,16 @@ libspldir = $(includedir)/libspl
 libspl_HEADERS = \
        $(top_srcdir)/lib/libspl/include/assert.h \
        $(top_srcdir)/lib/libspl/include/atomic.h \
-       $(top_srcdir)/lib/libspl/include/attr.h \
        $(top_srcdir)/lib/libspl/include/devid.h \
        $(top_srcdir)/lib/libspl/include/libdevinfo.h \
        $(top_srcdir)/lib/libspl/include/libgen.h \
        $(top_srcdir)/lib/libspl/include/libshare.h \
        $(top_srcdir)/lib/libspl/include/limits.h \
        $(top_srcdir)/lib/libspl/include/locale.h \
-       $(top_srcdir)/lib/libspl/include/note.h \
        $(top_srcdir)/lib/libspl/include/statcommon.h \
        $(top_srcdir)/lib/libspl/include/stdio.h \
        $(top_srcdir)/lib/libspl/include/stdlib.h \
        $(top_srcdir)/lib/libspl/include/string.h \
-       $(top_srcdir)/lib/libspl/include/strings.h \
        $(top_srcdir)/lib/libspl/include/stropts.h \
        $(top_srcdir)/lib/libspl/include/synch.h \
        $(top_srcdir)/lib/libspl/include/thread.h \
diff --git a/lib/libspl/include/attr.h b/lib/libspl/include/attr.h
deleted file mode 100644 (file)
index da1671a..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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 _LIBSPL_ATTR_H
-#define        _LIBSPL_ATTR_H
-
-#endif /* _LIBSPL_ATTR_H */
diff --git a/lib/libspl/include/note.h b/lib/libspl/include/note.h
deleted file mode 100644 (file)
index cb6b33e..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- */
-/*
- * Copyright (c) 1994 by Sun Microsystems, Inc.
- */
-
-/*
- * note.h:      interface for annotating source with info for tools
- *
- * NOTE is the default interface, but if the identifier NOTE is in use for
- * some other purpose, you may prepare a similar header file using your own
- * identifier, mapping that identifier to _NOTE.  Also, exported header
- * files should *not* use NOTE, since the name may already be in use in
- * a program's namespace.  Rather, exported header files should include
- * sys/note.h directly and use _NOTE.  For consistency, all kernel source
- * should use _NOTE.
- */
-
-#ifndef _NOTE_H
-#define        _NOTE_H
-
-#include <sys/note.h>
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#define        NOTE    _NOTE
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif  /* _NOTE_H */
diff --git a/lib/libspl/include/strings.h b/lib/libspl/include/strings.h
deleted file mode 100644 (file)
index 3f35af4..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- */
-/*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _LIBSPL_STRINGS_H
-#define        _LIBSPL_STRINGS_H
-
-#include <string.h>
-#include_next <strings.h>
-
-#endif
index 9c67e14b079e6a54accbefbc36c7a0cd659bac4b..e7af317e0c6ca9078b61d5ba65f7bbbd93301416 100644 (file)
@@ -8,7 +8,6 @@ libspl_HEADERS = \
        $(top_srcdir)/lib/libspl/include/sys/byteorder.h \
        $(top_srcdir)/lib/libspl/include/sys/callb.h \
        $(top_srcdir)/lib/libspl/include/sys/cmn_err.h \
-       $(top_srcdir)/lib/libspl/include/sys/compress.h \
        $(top_srcdir)/lib/libspl/include/sys/cred.h \
        $(top_srcdir)/lib/libspl/include/sys/debug.h \
        $(top_srcdir)/lib/libspl/include/sys/dkio.h \
@@ -28,7 +27,6 @@ libspl_HEADERS = \
        $(top_srcdir)/lib/libspl/include/sys/mkdev.h \
        $(top_srcdir)/lib/libspl/include/sys/mnttab.h \
        $(top_srcdir)/lib/libspl/include/sys/mount.h \
-       $(top_srcdir)/lib/libspl/include/sys/note.h \
        $(top_srcdir)/lib/libspl/include/sys/param.h \
        $(top_srcdir)/lib/libspl/include/sys/policy.h \
        $(top_srcdir)/lib/libspl/include/sys/poll.h \
@@ -37,11 +35,12 @@ libspl_HEADERS = \
        $(top_srcdir)/lib/libspl/include/sys/signal.h \
        $(top_srcdir)/lib/libspl/include/sys/stack.h \
        $(top_srcdir)/lib/libspl/include/sys/stat.h \
+       $(top_srcdir)/lib/libspl/include/sys/stdtypes.h \
+       $(top_srcdir)/lib/libspl/include/sys/strings.h \
        $(top_srcdir)/lib/libspl/include/sys/stropts.h \
        $(top_srcdir)/lib/libspl/include/sys/sunddi.h \
        $(top_srcdir)/lib/libspl/include/sys/sysmacros.h \
        $(top_srcdir)/lib/libspl/include/sys/systeminfo.h \
-       $(top_srcdir)/lib/libspl/include/sys/systm.h \
        $(top_srcdir)/lib/libspl/include/sys/time.h \
        $(top_srcdir)/lib/libspl/include/sys/types32.h \
        $(top_srcdir)/lib/libspl/include/sys/types.h \
diff --git a/lib/libspl/include/sys/compress.h b/lib/libspl/include/sys/compress.h
deleted file mode 100644 (file)
index 282f178..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- */
-/*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _LIBSPL_SYS_COMPRESS_H
-#define        _LIBSPL_SYS_COMPRESS_H
-
-#endif /* _LIBSPL_SYS_COMPRESS_H */
diff --git a/lib/libspl/include/sys/note.h b/lib/libspl/include/sys/note.h
deleted file mode 100644 (file)
index 6625b68..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- */
-/*
- * Copyright (c) 1994 by Sun Microsystems, Inc.
- */
-
-/*
- * sys/note.h: interface for annotating source with info for tools
- *
- * This is the underlying interface; NOTE (/usr/include/note.h) is the
- * preferred interface, but all exported header files should include this
- * file directly and use _NOTE so as not to take "NOTE" from the user's
- * namespace.  For consistency, *all* kernel source should use _NOTE.
- *
- * By default, annotations expand to nothing.  This file implements
- * that.  Tools using annotations will interpose a different version
- * of this file that will expand annotations as needed.
- */
-
-#ifndef        _SYS_NOTE_H
-#define        _SYS_NOTE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _NOTE
-#define        _NOTE(s)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SYS_NOTE_H */
diff --git a/lib/libspl/include/sys/stdtypes.h b/lib/libspl/include/sys/stdtypes.h
new file mode 100644 (file)
index 0000000..c26e2dc
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (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        __SYS_STDTYPES_H
+#define        __SYS_STDTYPES_H
+
+typedef enum {
+       B_FALSE = 0,
+       B_TRUE = 1
+} boolean_t;
+
+typedef unsigned char          uchar_t;
+typedef unsigned short         ushort_t;
+typedef unsigned int           uint_t;
+typedef unsigned long          ulong_t;
+typedef unsigned long long     u_longlong_t;
+typedef long long              longlong_t;
+
+typedef longlong_t             offset_t;
+typedef u_longlong_t           u_offset_t;
+typedef u_longlong_t           len_t;
+typedef longlong_t             diskaddr_t;
+
+typedef ulong_t                        pgcnt_t;        /* number of pages */
+typedef long                   spgcnt_t;       /* signed number of pages */
+
+typedef short                  pri_t;
+typedef ushort_t               o_mode_t;       /* old file attribute type */
+
+typedef int                    major_t;
+typedef int                    minor_t;
+
+typedef short                  index_t;
+
+#endif /* __SYS_STDTYPES_H */
diff --git a/lib/libspl/include/sys/strings.h b/lib/libspl/include/sys/strings.h
new file mode 100644 (file)
index 0000000..c142047
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (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
+ */
+/*
+ * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef _LIBSPL_SYS_STRINGS_H
+#define        _LIBSPL_SYS_STRINGS_H
+
+#include <string.h>
+#include <strings.h>
+
+#endif
index 31f347c6fd5a26876d1a37c4cc77c5d191e394c7..22fcb04b94e0eb08239f760c312dbacdec9ed6b2 100644 (file)
@@ -98,4 +98,6 @@
 #define        offsetof(s, m)  ((size_t)(&(((s *)0)->m)))
 #endif
 
+#define        _NOTE(x)
+
 #endif /* _LIBSPL_SYS_SYSMACROS_H */
diff --git a/lib/libspl/include/sys/systm.h b/lib/libspl/include/sys/systm.h
deleted file mode 100644 (file)
index 1ed031d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- */
-/*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _LIBSPL_SYS_SYSTM_H
-#define        _LIBSPL_SYS_SYSTM_H
-
-#endif /* _LIBSPL_SYS_SYSTM_H */
index 7fb53730f850f8490d22944de4e1c4c657050d9d..ea02ffac93ac956ed7b77ccac7237e04d03ca81f 100644 (file)
 #include_next <sys/types.h>
 #include <sys/types32.h>
 #include <sys/va_list.h>
+#include <sys/stdtypes.h>
 
 #ifndef HAVE_INTTYPES
 #include <inttypes.h>
-
-typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
-
-typedef unsigned char  uchar_t;
-typedef unsigned short ushort_t;
-typedef unsigned int   uint_t;
-typedef unsigned long  ulong_t;
-
-typedef long long      longlong_t;
-typedef unsigned long long u_longlong_t;
 #endif /* HAVE_INTTYPES */
 
-typedef longlong_t     offset_t;
-typedef u_longlong_t   u_offset_t;
-typedef u_longlong_t   len_t;
-typedef longlong_t     diskaddr_t;
-
-typedef ulong_t                pgcnt_t;        /* number of pages */
-typedef long           spgcnt_t;       /* signed number of pages */
-
-typedef short          pri_t;
-
 typedef int            zoneid_t;
 typedef int            projid_t;
 
-typedef int            major_t;
-typedef int            minor_t;
-
-typedef ushort_t o_mode_t; /* old file attribute type */
-typedef short          index_t;
-
 /*
  * Definitions remaining from previous partial support for 64-bit file
  * offsets.  This partial support for devices greater than 2gb requires
index 9ab3b0782faf49504f76b03c05b89480dbe6b6ff..bb41aa34bee0b0d21a2d38e8dd1ff6c451bae638 100644 (file)
@@ -26,8 +26,6 @@
 #ifndef _SYS_TYPES32_H
 #define        _SYS_TYPES32_H
 
-
-
 #include <sys/inttypes.h>
 
 #ifdef __cplusplus
index 5b10ac801de7b052b3934db3dfec7aaf53738732..59dc931442675a4d68a9dded40fe25659f788695 100644 (file)
@@ -39,6 +39,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 
 #ifdef  __cplusplus
 extern "C" {
index d51fa81e897b08a752dda90e26282d3db9f72b7f..6958057b29c43e3d0978dda51d7158bcb9395200 100644 (file)
@@ -33,6 +33,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <strings.h>
 
 #define        FACILITY_FMT    "%s (%s): "
index 249334acd9552588782df821a16d4fd654403ced..fb7a1fcf4196ee1e839fc61752f8bdcf2b61a95e 100644 (file)
@@ -37,7 +37,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <attr.h>
 #include <stddef.h>
 #include <unistd.h>
 #include <stdio.h>
@@ -49,7 +48,7 @@
 #include "libzfs_impl.h"
 
 #define        ZDIFF_SNAPDIR           "/.zfs/snapshot/"
-#define        ZDIFF_SHARESDIR         "/.zfs/shares/"
+#define        ZDIFF_SHARESDIR         "/.zfs/shares/"
 #define        ZDIFF_PREFIX            "zfs-diff-%d"
 
 #define        ZDIFF_ADDED     '+'
index 96910119c13ccc78db961ca0ccd03b9e7f1844e1..11d300b700148112d5991f771f6956dd61ef24af 100644 (file)
@@ -93,7 +93,6 @@ descriptions_obj:
 .SH AUTHORS
 This man page was written by Darik Horn <dajhorn@vanadac.com>.
 .SH SEE ALSO
-.BR splat (1),
 .BR zfs (8),
 .BR zpool-features (5),
 .BR ztest (1)
index 4746914c593c82d9a742d4ce9d903bff86514850..1c0683ee309b461a99e04abb98b0dfec839fbd72 100644 (file)
@@ -1,4 +1,9 @@
-dist_man_MANS = vdev_id.conf.5 zpool-features.5 zfs-module-parameters.5 zfs-events.5
+dist_man_MANS = \
+       vdev_id.conf.5 \
+       zpool-features.5 \
+       spl-module-parameters.5 \
+       zfs-module-parameters.5 \
+       zfs-events.5
 
 install-data-local:
        $(INSTALL) -d -m 0755 "$(DESTDIR)$(mandir)/man5"
index 4cd6988bbacb95be016ef10a71ec3c0caf05a3fe..82d155dd31ac4341c5bb8cbfdc8867ffb09b8684 100644 (file)
@@ -2,6 +2,7 @@ subdir-m += avl
 subdir-m += icp
 subdir-m += lua
 subdir-m += nvpair
+subdir-m += spl
 subdir-m += unicode
 subdir-m += zcommon
 subdir-m += zfs
@@ -10,11 +11,11 @@ INSTALL_MOD_DIR ?= extra
 
 ZFS_MODULE_CFLAGS += -std=gnu99 -Wno-declaration-after-statement
 ZFS_MODULE_CFLAGS += @KERNEL_DEBUG_CFLAGS@
-ZFS_MODULE_CFLAGS += -include @SPL_OBJ@/spl_config.h
 ZFS_MODULE_CFLAGS += -include @abs_top_builddir@/zfs_config.h
-ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include -I@SPL@/include -I@SPL@
+ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include/spl
+ZFS_MODULE_CFLAGS += -I@abs_top_srcdir@/include
 
-ZFS_MODULE_CPPFLAGS += -DHAVE_SPL -D_KERNEL
+ZFS_MODULE_CPPFLAGS += -D_KERNEL
 ZFS_MODULE_CPPFLAGS += @KERNEL_DEBUG_CPPFLAGS@
 
 @CONFIG_QAT_TRUE@ZFS_MODULE_CFLAGS += -I@QAT_SRC@/include
@@ -25,21 +26,6 @@ export ZFS_MODULE_CFLAGS ZFS_MODULE_CPPFLAGS
 SUBDIR_TARGETS = icp lua
 
 modules:
-       @# Make the exported SPL symbols available to these modules.
-       @# They may be in the root of SPL_OBJ when building against
-       @# installed devel headers, or they may be in the module
-       @# subdirectory when building against the spl source tree.
-       @if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \
-               cp @SPL_OBJ@/@SPL_SYMBOLS@ .; \
-       elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \
-               cp @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \
-       else \
-               echo -e "\n" \
-               "*** Missing spl symbols ensure you have built the spl:\n" \
-               "*** - @SPL_OBJ@/@SPL_SYMBOLS@, or\n" \
-               "*** - @SPL_OBJ@/module/@SPL_SYMBOLS@\n"; \
-               exit 1; \
-       fi
        list='$(SUBDIR_TARGETS)'; for targetdir in $$list; do \
                $(MAKE) -C $$targetdir; \
        done
@@ -50,7 +36,6 @@ clean:
        @# is defined.  This indicates that kernel modules should be built.
 @CONFIG_KERNEL_TRUE@   $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNEL_MAKE@ $@
 
-       if [ -f @SPL_SYMBOLS@ ]; then $(RM) @SPL_SYMBOLS@; fi
        if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi
        if [ -f Module.markers ]; then $(RM) Module.markers; fi
 
index f024cdf61cb6ce7093820da751045b1bdb1daade..736dcee84579826c1468518b403b48ca0f2acc55 100644 (file)
@@ -992,7 +992,9 @@ done:
        return (AVL_NODE2DATA(node, off));
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
+#include <linux/module.h>
+
 static int __init
 avl_init(void)
 {
index 8ae9898908674e89dd4c0569e86ead8a4eac09d5..7c677095f1ef3541d33f98c58e7f8f2734736be6 100644 (file)
  * Portions copyright (c) 2013, Saso Kiselkov, All rights reserved
  */
 
-/* determine where we can get bcopy/bzero declarations */
-#ifdef _KERNEL
-#include <sys/systm.h>
-#else
-#include <strings.h>
-#endif
+#include <sys/strings.h>
 #include <sys/edonr.h>
 #include <sys/debug.h>
 
index d17e8f1fd4beecbfecf529b4fc1018679c87b1c9..532dfd7434c91ac7b9a8e20e9901663a282064ec 100644 (file)
@@ -34,7 +34,7 @@
 #ifndef _CRYPTO_EDONR_BYTEORDER_H
 #define        _CRYPTO_EDONR_BYTEORDER_H
 
-
+#include <sys/sysmacros.h>
 #include <sys/param.h>
 
 #if defined(__BYTE_ORDER)
index 0981eee089293477b579d6ac0f11b81e06d6a166..0187f7be6ca777aebdb23a952c0818c9732228fb 100644 (file)
@@ -7,8 +7,8 @@
 
 #define        SKEIN_PORT_CODE         /* instantiate any code in skein_port.h */
 
+#include <sys/sysmacros.h>
 #include <sys/types.h>
-#include <sys/note.h>
 #include <sys/skein.h>         /* get the Skein API definitions   */
 #include "skein_impl.h"                /* get internal definitions */
 
index e83a06971bb1dc89ee1fed06ea7aa660dc9120af..ea834e6199fbb5429715a20b9877644192070942 100644 (file)
 #define        _SKEIN_IMPL_H_
 
 #include <sys/skein.h>
+#include <sys/strings.h>
+#include <sys/note.h>
 #include "skein_impl.h"
 #include "skein_port.h"
 
-/* determine where we can get bcopy/bzero declarations */
-#ifdef _KERNEL
-#include <sys/systm.h>
-#else
-#include <strings.h>
-#endif
-
 /*
  * "Internal" Skein definitions
  *    -- not needed for sequential hashing API, but will be
index 1b0225236993e750191d8a9612eff65e10ef4d59..4fe268bb5a40998a4dbd7e43c992de278652640b 100644 (file)
@@ -16,7 +16,6 @@
 #define        _SKEIN_PORT_H_
 
 #include <sys/types.h> /* get integer type definitions */
-#include <sys/systm.h> /* for bcopy() */
 
 #ifndef        RotL_64
 #define        RotL_64(x, N)   (((x) << (N)) | ((x) >> (64 - (N))))
index 2585b7fedae747c0423ff26362a788b69392a7fb..1c9f6873e2c4b4d5ffd182925a24c032a66ec60d 100644 (file)
@@ -915,7 +915,7 @@ crypto_decrypt_single(crypto_context_t context, crypto_data_t *ciphertext,
        return (error);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(crypto_cipher_init_prov);
 EXPORT_SYMBOL(crypto_cipher_init);
 EXPORT_SYMBOL(crypto_encrypt_prov);
index 3f90674b0a33cc9fd965043e2c2049dd3aa7ddff..b9b9cb74e04fcf1de131db753740cf7b3fa94274 100644 (file)
@@ -145,7 +145,7 @@ crypto_destroy_ctx_template(crypto_ctx_template_t tmpl)
        kmem_free(ctx_tmpl, sizeof (kcf_ctx_template_t));
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(crypto_create_ctx_template);
 EXPORT_SYMBOL(crypto_destroy_ctx_template);
 #endif
index b58d3b452829895d3e1bc83295d5c87d17d20f44..87090fd527d5ab43edf210d72b0081b06cf99df0 100644 (file)
@@ -482,7 +482,7 @@ crypto_digest_single(crypto_context_t context, crypto_data_t *data,
        return (error);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(crypto_digest_prov);
 EXPORT_SYMBOL(crypto_digest);
 EXPORT_SYMBOL(crypto_digest_init_prov);
index 2b4691c0371efadf0813a76e3498fb529f0d2bb8..21ab94fa5bd79b73eb2c94108ac144d34ec5f2b9 100644 (file)
@@ -635,7 +635,7 @@ crypto_mac_single(crypto_context_t context, crypto_data_t *data,
        return (error);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(crypto_mac_prov);
 EXPORT_SYMBOL(crypto_mac);
 EXPORT_SYMBOL(crypto_mac_verify_prov);
index 09d50f7be1766a55485aa60ecda8abdf927b7d99..c0f415b264a78e26006310b3f97fc49fed07206a 100644 (file)
@@ -122,6 +122,6 @@ kcf_walk_ntfylist(uint32_t event, void *event_arg)
        mutex_exit(&ntfy_list_lock);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(crypto_mech2id);
 #endif
index a3986a2e5c5a88f67f1ff4441935ff96d6b8f929..c2fcf1ff729c921097b39109052a6db80ddf2d25 100644 (file)
@@ -149,7 +149,7 @@ icp_init(void)
        return (0);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 module_exit(icp_fini);
 module_init(icp_init);
 MODULE_AUTHOR(ZFS_META_AUTHOR);
index cb748a954e254874f23db7ca60524e77b1117ef9..544814a98479a693f4b14ff4904cdff29b0fcd92 100644 (file)
@@ -27,7 +27,6 @@
 #include <sys/crypto/common.h>
 #include <sys/crypto/spi.h>
 #include <sys/sysmacros.h>
-#include <sys/systm.h>
 #include <sys/edonr.h>
 
 /*
index 90e8a6a0252b16563a3ac0ef0f5d46dff0d64c25..88215fe89b4e6da4937f9005f9cb0a98e13668dd 100644 (file)
@@ -27,7 +27,6 @@
 #include <sys/crypto/common.h>
 #include <sys/crypto/spi.h>
 #include <sys/sysmacros.h>
-#include <sys/systm.h>
 #define        SKEIN_MODULE_IMPL
 #include <sys/skein.h>
 
index 54c74d38e91bd5ffaf9e3f888b53f733b1f3244c..81969673b9ef5c2316989c4cfc8cbe398a5d207b 100644 (file)
@@ -1279,7 +1279,7 @@ LUA_API void lua_upvaluejoin (lua_State *L, int fidx1, int n1,
   luaC_objbarrier(L, f1, *up2);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 
 static int __init
 lua_init(void)
index 85ed00c64e23a29686d2ec0ee0a4a8a4cc7bea67..1e0356e7c00e663e69bc549cc606f9909476ea94 100644 (file)
@@ -788,7 +788,7 @@ LUALIB_API void luaL_checkversion_ (lua_State *L, lua_Number ver) {
   lua_pop(L, 1);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 
 EXPORT_SYMBOL(luaL_argerror);
 EXPORT_SYMBOL(luaL_error);
index 004a1939d270d56707118d45a460ce5771593631..854649a0fb4d34c21dbb0d5dda593d8852894f22 100644 (file)
@@ -288,7 +288,7 @@ LUAMOD_API int luaopen_base (lua_State *L) {
   return 1;
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 
 EXPORT_SYMBOL(luaopen_base);
 
index af8bea6951441425bf049418b809bbca040fd35f..0300e7ee17d5e0c0dae07b1b48bbcc4ca2a3bb01 100644 (file)
@@ -151,7 +151,7 @@ LUAMOD_API int luaopen_coroutine (lua_State *L) {
   return 1;
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 
 EXPORT_SYMBOL(luaopen_coroutine);
 
index 24a3321bdefe0f1db09e6f120877a9b705e29ea0..49ba70fafdb8f7ff49593b419a5742407e56a181 100644 (file)
@@ -1032,7 +1032,7 @@ LUAMOD_API int luaopen_string (lua_State *L) {
   return 1;
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 
 EXPORT_SYMBOL(luaopen_string);
 
index d01b5ba076bfc3d6b770aa7d2e6d18b44c87188b..be5b6375e4a80a087a8c2a81d9c3d23971f6605a 100644 (file)
@@ -281,7 +281,7 @@ LUAMOD_API int luaopen_table (lua_State *L) {
   return 1;
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 
 EXPORT_SYMBOL(luaopen_table);
 
index a91b9524d8a081515ae9ea82b4db3a37400f999d..ce151d6920f197310743ce7c2d1a3d519d5948c2 100644 (file)
@@ -508,7 +508,7 @@ fnvpair_value_nvlist(nvpair_t *nvp)
        return (rv);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 
 EXPORT_SYMBOL(fnvlist_alloc);
 EXPORT_SYMBOL(fnvlist_free);
index 512f9a998426c85f1b6d73de0051fe3c4d10825c..97ab7de40ebb83a3a39dd7fe1174d6f99e0ba045 100644 (file)
  * Copyright (c) 2015, 2017 by Delphix. All rights reserved.
  */
 
-#include <sys/stropts.h>
 #include <sys/debug.h>
 #include <sys/isa_defs.h>
-#include <sys/int_limits.h>
 #include <sys/nvpair.h>
 #include <sys/nvpair_impl.h>
-#include <rpc/types.h>
+#include <sys/types.h>
+#include <sys/strings.h>
 #include <rpc/xdr.h>
 
-#if defined(_KERNEL) && !defined(_BOOT)
-#include <sys/varargs.h>
-#include <sys/ddi.h>
+#if defined(_KERNEL)
 #include <sys/sunddi.h>
 #include <sys/sysmacros.h>
 #else
 #include <stdarg.h>
 #include <stdlib.h>
-#include <string.h>
-#include <strings.h>
 #include <stddef.h>
 #endif
 
@@ -270,7 +265,7 @@ nvlist_nvflag(nvlist_t *nvl)
 static nv_alloc_t *
 nvlist_nv_alloc(int kmflag)
 {
-#if defined(_KERNEL) && !defined(_BOOT)
+#if defined(_KERNEL)
        switch (kmflag) {
        case KM_SLEEP:
                return (nv_alloc_sleep);
@@ -281,7 +276,7 @@ nvlist_nv_alloc(int kmflag)
        }
 #else
        return (nv_alloc_nosleep);
-#endif /* _KERNEL && !_BOOT */
+#endif /* _KERNEL */
 }
 
 /*
@@ -1680,7 +1675,7 @@ nvlist_lookup_nvpair_ei_sep(nvlist_t *nvl, const char *name, const char sep,
                        sepp = idxp;
 
                        /* determine the index value */
-#if defined(_KERNEL) && !defined(_BOOT)
+#if defined(_KERNEL)
                        if (ddi_strtol(idxp, &idxep, 0, &idx))
                                goto fail;
 #else
@@ -3320,7 +3315,7 @@ nvs_xdr(nvstream_t *nvs, nvlist_t *nvl, char *buf, size_t *buflen)
        return (err);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 static int __init
 nvpair_init(void)
 {
index 0d4e12b972bb88788658850db001bef91e725854..c8a604a2bfac2f8e57bb14c9b0839e86c09fb669 100644 (file)
  * Use is subject to license terms.
  */
 
-
-
-#include <sys/stropts.h>
 #include <sys/isa_defs.h>
 #include <sys/nvpair.h>
 #include <sys/sysmacros.h>
-#if defined(_KERNEL) && !defined(_BOOT)
-#include <sys/varargs.h>
-#else
-#include <stdarg.h>
-#include <strings.h>
-#endif
 
 /*
  * This allocator is very simple.
@@ -119,6 +110,6 @@ const nv_alloc_ops_t nv_fixed_ops_def = {
 
 const nv_alloc_ops_t *nv_fixed_ops = &nv_fixed_ops_def;
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(nv_fixed_ops);
 #endif
diff --git a/module/spl/Makefile.in b/module/spl/Makefile.in
new file mode 100644 (file)
index 0000000..97a431f
--- /dev/null
@@ -0,0 +1,28 @@
+src = @abs_top_srcdir@/module/spl
+obj = @abs_builddir@
+
+MODULE := spl
+
+obj-$(CONFIG_ZFS) := $(MODULE).o
+
+ccflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS)
+
+$(MODULE)-objs += spl-atomic.o
+$(MODULE)-objs += spl-condvar.o
+$(MODULE)-objs += spl-cred.o
+$(MODULE)-objs += spl-err.o
+$(MODULE)-objs += spl-generic.o
+$(MODULE)-objs += spl-kmem.o
+$(MODULE)-objs += spl-kmem-cache.o
+$(MODULE)-objs += spl-kobj.o
+$(MODULE)-objs += spl-kstat.o
+$(MODULE)-objs += spl-mutex.o
+$(MODULE)-objs += spl-proc.o
+$(MODULE)-objs += spl-rwlock.o
+$(MODULE)-objs += spl-taskq.o
+$(MODULE)-objs += spl-thread.o
+$(MODULE)-objs += spl-tsd.o
+$(MODULE)-objs += spl-vmem.o
+$(MODULE)-objs += spl-vnode.o
+$(MODULE)-objs += spl-xdr.o
+$(MODULE)-objs += spl-zlib.o
diff --git a/module/spl/README.md b/module/spl/README.md
new file mode 100644 (file)
index 0000000..57f635a
--- /dev/null
@@ -0,0 +1,16 @@
+The Solaris Porting Layer, SPL, is a Linux kernel module which provides a
+compatibility layer used by the [ZFS on Linux](http://zfsonlinux.org) project.
+
+# Installation
+
+The latest version of the SPL is maintained as part of this repository.
+Only when building ZFS version 0.7.x or earlier must an external SPL release
+be used.  These releases can be found at:
+
+  * Version 0.7.x: https://github.com/zfsonlinux/spl/tree/spl-0.7-release  
+  * Version 0.6.5.x: https://github.com/zfsonlinux/spl/tree/spl-0.6.5-release  
+
+# Release
+
+The SPL is released under a GPLv2 license.  
+For more details see the NOTICE and THIRDPARTYLICENSE files; `UCRL-CODE-235197`
index f0060bbdcd6cb92e452f2971bf800f7ccd3e6297..1e6e38b7874b1dd2683dc5dfaf56a4fcef02b7f9 100644 (file)
@@ -27,6 +27,7 @@
 #include <sys/condvar.h>
 #include <sys/time.h>
 #include <linux/hrtimer.h>
+#include <linux/compiler_compat.h>
 
 void
 __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg)
@@ -89,7 +90,7 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state, int io)
        ASSERT(mutex_owned(mp));
        atomic_inc(&cvp->cv_refs);
 
-       m = ACCESS_ONCE(cvp->cv_mutex);
+       m = READ_ONCE(cvp->cv_mutex);
        if (!m)
                m = xchg(&cvp->cv_mutex, mp);
        /* Ensure the same mutex is used by all callers */
@@ -202,7 +203,7 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp, clock_t expire_time,
                return (-1);
 
        atomic_inc(&cvp->cv_refs);
-       m = ACCESS_ONCE(cvp->cv_mutex);
+       m = READ_ONCE(cvp->cv_mutex);
        if (!m)
                m = xchg(&cvp->cv_mutex, mp);
        /* Ensure the same mutex is used by all callers */
@@ -290,7 +291,7 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t expire_time,
                return (-1);
 
        atomic_inc(&cvp->cv_refs);
-       m = ACCESS_ONCE(cvp->cv_mutex);
+       m = READ_ONCE(cvp->cv_mutex);
        if (!m)
                m = xchg(&cvp->cv_mutex, mp);
        /* Ensure the same mutex is used by all callers */
index 6b71296e8a676d62d5dc663cbe77ec045c5757b6..4c8f818a9c7c9eb2806a52fe2d70d09ebdaefda7 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <sys/sysmacros.h>
 #include <sys/cmn_err.h>
-#include <linux/ratelimit.h>
 
 /*
  * It is often useful to actually have the panic crash the node so you
@@ -40,19 +39,11 @@ module_param(spl_panic_halt, uint, 0644);
 MODULE_PARM_DESC(spl_panic_halt, "Cause kernel panic on assertion failures");
 /* END CSTYLED */
 
-/*
- * Limit the number of stack traces dumped to not more than 5 every
- * 60 seconds to prevent denial-of-service attacks from debug code.
- */
-DEFINE_RATELIMIT_STATE(dumpstack_ratelimit_state, 60 * HZ, 5);
-
 void
 spl_dumpstack(void)
 {
-       if (__ratelimit(&dumpstack_ratelimit_state)) {
-               printk("Showing stack for process %d\n", current->pid);
-               dump_stack();
-       }
+       printk("Showing stack for process %d\n", current->pid);
+       dump_stack();
 }
 EXPORT_SYMBOL(spl_dumpstack);
 
index b38fe254cf0340ef070fd5f0363017bc8d1ae63c..7c1ad390be4d26aedc5c14b936ec899846897153 100644 (file)
 #include <sys/strings.h>
 #include <linux/kmod.h>
 
-char spl_version[32] = "SPL v" SPL_META_VERSION "-" SPL_META_RELEASE;
+char spl_version[32] = "SPL v" ZFS_META_VERSION "-" ZFS_META_RELEASE;
 EXPORT_SYMBOL(spl_version);
 
 /* BEGIN CSTYLED */
 unsigned long spl_hostid = 0;
 EXPORT_SYMBOL(spl_hostid);
+/* BEGIN CSTYLED */
 module_param(spl_hostid, ulong, 0644);
 MODULE_PARM_DESC(spl_hostid, "The system hostid.");
 /* END CSTYLED */
@@ -719,8 +720,6 @@ spl_init(void)
        if ((rc = spl_zlib_init()))
                goto out10;
 
-       printk(KERN_NOTICE "SPL: Loaded module v%s-%s%s\n", SPL_META_VERSION,
-           SPL_META_RELEASE, SPL_DEBUG_STR);
        return (rc);
 
 out10:
@@ -742,18 +741,12 @@ out3:
 out2:
        spl_kvmem_fini();
 out1:
-       printk(KERN_NOTICE "SPL: Failed to Load Solaris Porting Layer "
-           "v%s-%s%s, rc = %d\n", SPL_META_VERSION, SPL_META_RELEASE,
-           SPL_DEBUG_STR, rc);
-
        return (rc);
 }
 
 static void __exit
 spl_fini(void)
 {
-       printk(KERN_NOTICE "SPL: Unloaded module v%s-%s%s\n",
-           SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR);
        spl_zlib_fini();
        spl_kstat_fini();
        spl_proc_fini();
@@ -770,6 +763,6 @@ module_init(spl_init);
 module_exit(spl_fini);
 
 MODULE_DESCRIPTION("Solaris Porting Layer");
-MODULE_AUTHOR(SPL_META_AUTHOR);
-MODULE_LICENSE(SPL_META_LICENSE);
-MODULE_VERSION(SPL_META_VERSION "-" SPL_META_RELEASE);
+MODULE_AUTHOR(ZFS_META_AUTHOR);
+MODULE_LICENSE("GPL");
+MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);
index e0d551041fd37ce80ad4837cf44ad3002f754905..1fdb61e6fce1f4d5c9691f0ff1721988a5981b09 100644 (file)
@@ -27,7 +27,6 @@
 #include <sys/kmem.h>
 #include <sys/vmem.h>
 #include <linux/mm.h>
-#include <linux/ratelimit.h>
 
 /*
  * As a general rule kmem_alloc() allocations should be small, preferably
@@ -134,12 +133,6 @@ strfree(char *str)
 }
 EXPORT_SYMBOL(strfree);
 
-/*
- * Limit the number of large allocation stack traces dumped to not more than
- * 5 every 60 seconds to prevent denial-of-service attacks from debug code.
- */
-DEFINE_RATELIMIT_STATE(kmem_alloc_ratelimit_state, 60 * HZ, 5);
-
 /*
  * General purpose unified implementation of kmem_alloc(). It is an
  * amalgamation of Linux and Illumos allocator design. It should never be
@@ -160,7 +153,7 @@ spl_kmem_alloc_impl(size_t size, int flags, int node)
         * through the vmem_alloc()/vmem_zalloc() interfaces.
         */
        if ((spl_kmem_alloc_warn > 0) && (size > spl_kmem_alloc_warn) &&
-           !(flags & KM_VMEM) && __ratelimit(&kmem_alloc_ratelimit_state)) {
+           !(flags & KM_VMEM)) {
                printk(KERN_WARNING
                    "Large kmem_alloc(%lu, 0x%x), please file an issue at:\n"
                    "https://github.com/zfsonlinux/zfs/issues/new\n",
@@ -207,14 +200,6 @@ spl_kmem_alloc_impl(size_t size, int flags, int node)
                        continue;
                }
 
-               if (unlikely(__ratelimit(&kmem_alloc_ratelimit_state))) {
-                       printk(KERN_WARNING
-                           "Possible memory allocation deadlock: "
-                           "size=%lu lflags=0x%x",
-                           (unsigned long)size, lflags);
-                       dump_stack();
-               }
-
                /*
                 * Use cond_resched() instead of congestion_wait() to avoid
                 * deadlocking systems where there are no block devices.
@@ -535,9 +520,12 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock)
 int
 spl_kmem_init(void)
 {
+
 #ifdef DEBUG_KMEM
        kmem_alloc_used_set(0);
 
+
+
 #ifdef DEBUG_KMEM_TRACKING
        spl_kmem_init_tracking(&kmem_list, &kmem_lock, KMEM_TABLE_SIZE);
 #endif /* DEBUG_KMEM_TRACKING */
index 9a992cc3ab386235a782b9245624266955ca78e0..cf03bc593f997916e5f1b2ff2262d03094f5cd04 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include <sys/rwlock.h>
+#include <linux/module.h>
 
 #if defined(CONFIG_PREEMPT_RT_FULL)
 
index 2919a942a1c768d2aed39937f20f1fd229e0a3d6..7684257be7adebce9d8e3a0c34e525e18b2c54d8 100644 (file)
@@ -60,7 +60,7 @@ static taskq_thread_t *taskq_thread_create(taskq_t *);
 
 /* List of all taskqs */
 LIST_HEAD(tq_list);
-DECLARE_RWSEM(tq_list_sem);
+struct rw_semaphore tq_list_sem;
 static uint_t taskq_tsd;
 
 static int
@@ -1257,6 +1257,7 @@ MODULE_PARM_DESC(spl_taskq_kick,
 int
 spl_taskq_init(void)
 {
+       init_rwsem(&tq_list_sem);
        tsd_create(&taskq_tsd, NULL);
 
        system_taskq = taskq_create("spl_system_taskq", MAX(boot_ncpus, 64),
index 28ce21276e402b9a3ebabc9275293436a00ea88d..aebee0a826075992618f53fa25d822e4afa8cf4b 100644 (file)
@@ -40,7 +40,7 @@ EXPORT_SYMBOL(rootdir);
 static spl_kmem_cache_t *vn_cache;
 static spl_kmem_cache_t *vn_file_cache;
 
-static DEFINE_SPINLOCK(vn_file_lock);
+static spinlock_t vn_file_lock;
 static LIST_HEAD(vn_file_list);
 
 static int
@@ -744,6 +744,8 @@ vn_file_cache_destructor(void *buf, void *cdrarg)
 int
 spl_vn_init(void)
 {
+       vn_file_lock = __SPIN_LOCK_UNLOCKED(vn_file_lock);
+
        vn_cache = kmem_cache_create("spl_vn_cache",
            sizeof (struct vnode), 64, vn_cache_constructor,
            vn_cache_destructor, NULL, NULL, NULL, 0);
index 2cc3e2a0360e93ddf2e9d78d78e2449bfa88d55c..1dd31ffc148371ce37e67adc728fe92120b0e430 100644 (file)
 static struct xdr_ops xdrmem_encode_ops;
 static struct xdr_ops xdrmem_decode_ops;
 
-typedef int bool_t;
-
 void
 xdrmem_create(XDR *xdrs, const caddr_t addr, const uint_t size,
     const enum xdr_op op)
index 0330032fa0ef2fcaf5b5a33c0711486ba9f3db10..4e6105b2e8d4036eb760295e185794a4f484c6ca 100644 (file)
  */
 
 #include <sys/types.h>
-#ifdef _KERNEL
+#include <sys/strings.h>
 #include <sys/param.h>
 #include <sys/sysmacros.h>
-#include <sys/systm.h>
 #include <sys/debug.h>
 #include <sys/kmem.h>
-#include <sys/ddi.h>
 #include <sys/sunddi.h>
-#else
 #include <sys/u8_textprep.h>
-#include <strings.h>
-#endif /* _KERNEL */
 #include <sys/byteorder.h>
 #include <sys/errno.h>
 #include <sys/u8_textprep_data.h>
@@ -2130,7 +2125,7 @@ u8_textprep_str(char *inarray, size_t *inlen, char *outarray, size_t *outlen,
        return (ret_val);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 static int __init
 unicode_init(void)
 {
index 7a827832262aac13a7666154bffddc01d2d181e6..d812d5f9695102130db36c11540e336bddd87116 100644 (file)
@@ -38,7 +38,6 @@
 #ifdef _KERNEL
 #include <sys/param.h>
 #include <sys/sysmacros.h>
-#include <sys/systm.h>
 #include <sys/debug.h>
 #include <sys/kmem.h>
 #include <sys/sunddi.h>
@@ -854,7 +853,7 @@ uconv_u8tou32(const uchar_t *u8s, size_t *utf8len,
        return (0);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(uconv_u16tou32);
 EXPORT_SYMBOL(uconv_u16tou8);
 EXPORT_SYMBOL(uconv_u32tou16);
index 6ab3abe119144354c0f810ed73135833c2cee498..ea1bccf5092939f894989613a3673fe097dd1246 100644 (file)
@@ -26,9 +26,7 @@
  * Copyright (c) 2014, Nexenta Systems, Inc. All rights reserved.
  */
 
-#ifdef _KERNEL
-#include <sys/systm.h>
-#else
+#ifndef _KERNEL
 #include <errno.h>
 #include <string.h>
 #endif
@@ -351,7 +349,7 @@ zpool_feature_init(void)
        }
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(zfeature_lookup_name);
 EXPORT_SYMBOL(zfeature_is_supported);
 EXPORT_SYMBOL(zfeature_is_valid_guid);
index 685a20c448ea4506c3847125c465a3659c3dff7d..b31e0ab2749ad7c9a110525296218969f9d678a0 100644 (file)
  * then a separate file should to be created.
  */
 
-#if defined(_KERNEL)
-#include <sys/systm.h>
-#else
+#if !defined(_KERNEL)
 #include <string.h>
 #endif
 
 #include <sys/types.h>
 #include <sys/fs/zfs.h>
-#include <sys/int_limits.h>
 #include <sys/nvpair.h>
 #include "zfs_comutil.h"
 #include <sys/zfs_ratelimit.h>
@@ -207,7 +204,7 @@ const char *zfs_history_event_names[ZFS_NUM_LEGACY_HISTORY_EVENTS] = {
        "pool split",
 };
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(zfs_allocatable_devs);
 EXPORT_SYMBOL(zpool_get_rewind_policy);
 EXPORT_SYMBOL(zfs_zpl_version_map);
index c6ba278cffd8134295a29e958e66d01cbc69ca11..8d98f720a6c4c6ff719f809357d51e44b72a5c39 100644 (file)
 #include <sys/zfs_context.h>
 
 #if defined(_KERNEL)
-#include <sys/systm.h>
 #include <sys/sunddi.h>
 #include <sys/ctype.h>
 #else
 #include <stdio.h>
 #include <unistd.h>
-#include <strings.h>
 #include <libnvpair.h>
 #include <ctype.h>
 #endif
+#include <sys/strings.h>
 #include <sys/dsl_deleg.h>
 #include "zfs_prop.h"
 #include "zfs_deleg.h"
@@ -244,7 +243,7 @@ zfs_deleg_whokey(char *attr, zfs_deleg_who_type_t type,
        }
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(zfs_deleg_verify_nvlist);
 EXPORT_SYMBOL(zfs_deleg_whokey);
 EXPORT_SYMBOL(zfs_deleg_canonicalize_perm);
index 0cd992979cefd772a6ad198c08517682f2bfad7f..5a991ba6073a6ccdd76c791423a757e068b6d068 100644 (file)
@@ -867,7 +867,7 @@ zio_abd_checksum_func_t fletcher_4_abd_ops = {
 };
 
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 #include <linux/mod_compat.h>
 
 static int
index b72c1bafd2d1f74e62570f605d2d7d32fa23206a..bd2db2b20fe23ad178a201890c506ad3dbc11ff9 100644 (file)
@@ -45,8 +45,8 @@
 
 #include <linux/simd_aarch64.h>
 #include <sys/spa_checksum.h>
+#include <sys/strings.h>
 #include <zfs_fletcher.h>
-#include <strings.h>
 
 static void
 fletcher_4_aarch64_neon_init(fletcher_4_ctx_t *ctx)
index ed93c11592334b0453ae5407615786b5d97c2f48..7260a9864be105d68c20aff69a66bbc0598b9631 100644 (file)
@@ -28,8 +28,8 @@
 #include <sys/byteorder.h>
 #include <sys/frame.h>
 #include <sys/spa_checksum.h>
+#include <sys/strings.h>
 #include <zfs_fletcher.h>
-#include <strings.h>
 
 #define        __asm __asm__ __volatile__
 
index a479b9d5694f6fed1c317ee41734beab328cb0a4..6dac047dad0e3d15074043de664501f9c4ceccbd 100644 (file)
@@ -44,8 +44,8 @@
 
 #include <linux/simd_x86.h>
 #include <sys/spa_checksum.h>
+#include <sys/strings.h>
 #include <zfs_fletcher.h>
-#include <strings.h>
 
 static void
 fletcher_4_avx2_init(fletcher_4_ctx_t *ctx)
index 90b7d7d4ef722f1c0fa63f85fe573e7d9b9db1b0..a0b42e5f5fa8c25f4113598bbb7de985f950659d 100644 (file)
@@ -46,8 +46,8 @@
 #include <linux/simd_x86.h>
 #include <sys/spa_checksum.h>
 #include <sys/byteorder.h>
+#include <sys/strings.h>
 #include <zfs_fletcher.h>
-#include <strings.h>
 
 static void
 fletcher_4_sse2_init(fletcher_4_ctx_t *ctx)
index 02c5d53c7d99195b04e168bc6efa6bd7ccb20759..fbbbf80603abc8b64e60beb379f12ea7ff24edc3 100644 (file)
@@ -43,8 +43,8 @@
 
 #include <sys/byteorder.h>
 #include <sys/spa_checksum.h>
+#include <sys/strings.h>
 #include <zfs_fletcher.h>
-#include <strings.h>
 
 static void
 fletcher_4_superscalar_init(fletcher_4_ctx_t *ctx)
index 4fd37d91c41fba9f717f16c833b9287bc385c40e..97fdb7b7d30a73a89fba11f53275684b9b38055f 100644 (file)
@@ -43,8 +43,8 @@
 
 #include <sys/byteorder.h>
 #include <sys/spa_checksum.h>
+#include <sys/strings.h>
 #include <zfs_fletcher.h>
-#include <strings.h>
 
 static void
 fletcher_4_superscalar4_init(fletcher_4_ctx_t *ctx)
index 42a7c6c93bed9992dab650cefb379be791c017be..aefde90876ae98a872987e16233df223220c3458 100644 (file)
@@ -38,9 +38,7 @@
  * Each function returns 0 on success, -1 on error.
  */
 
-#if defined(_KERNEL)
-#include <sys/systm.h>
-#else
+#if !defined(_KERNEL)
 #include <string.h>
 #endif
 
@@ -349,7 +347,7 @@ pool_namecheck(const char *pool, namecheck_err_t *why, char *what)
        return (0);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(pool_namecheck);
 EXPORT_SYMBOL(dataset_namecheck);
 EXPORT_SYMBOL(zfs_component_namecheck);
index 34b7228ec9be5fe614c4010d4936723740493247..698fb8e214ff1dd538ff15571a843514036a37c6 100644 (file)
@@ -39,9 +39,7 @@
 #include "zfs_deleg.h"
 #include "zfs_fletcher.h"
 
-#if defined(_KERNEL)
-#include <sys/systm.h>
-#else
+#if !defined(_KERNEL)
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
@@ -847,7 +845,7 @@ zfs_prop_align_right(zfs_prop_t prop)
 
 #endif
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 static int __init
 zcommon_init(void)
 {
index 7b4175bbeeeb4e3631f470e18353a1cc4637dff9..af9716126f6d3f3f729631c5c2827fb6d6c2b8e2 100644 (file)
@@ -49,6 +49,8 @@
 
 #include <sys/types.h>
 #include <sys/uio_impl.h>
+#include <sys/sysmacros.h>
+#include <sys/strings.h>
 #include <linux/kmap_compat.h>
 
 /*
index fd21f31176a57db9269db10ede962d0a8707aead..bc38eca7de904c719bf2a5c2450f19b72a072a5e 100644 (file)
@@ -32,9 +32,7 @@
 
 #include "zfs_prop.h"
 
-#if defined(_KERNEL)
-#include <sys/systm.h>
-#else
+#if !defined(_KERNEL)
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
@@ -244,7 +242,7 @@ zpool_prop_align_right(zpool_prop_t prop)
 }
 #endif
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 /* zpool property functions */
 EXPORT_SYMBOL(zpool_prop_init);
 EXPORT_SYMBOL(zpool_prop_get_type);
index a4528d248e145928c66ae259bb12e9f001d19c04..838988a4cde1589b2be1e7ae3aba2045a4fefb22 100644 (file)
@@ -41,8 +41,9 @@
 #include "zfs_deleg.h"
 
 #if defined(_KERNEL)
-#include <sys/systm.h>
-#include <util/qsort.h>
+#include <linux/sort.h>
+#define        qsort(base, num, size, cmp) \
+    sort(base, num, size, cmp, NULL)
 #else
 #include <stdlib.h>
 #include <string.h>
@@ -435,7 +436,7 @@ zprop_width(int prop, boolean_t *fixed, zfs_type_t type)
 
 #endif
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 /* Common routines to initialize property tables */
 EXPORT_SYMBOL(zprop_register_impl);
 EXPORT_SYMBOL(zprop_register_string);
index 0bd7a262f79d801a66d0f301323d16f7537aaba8..555e8c1d253d1764cd80d17fc0711eacf8184892 100644 (file)
@@ -1466,7 +1466,7 @@ abd_raidz_rec_iterate(abd_t **cabds, abd_t **tabds,
        local_irq_restore(flags);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 /*
  * bio_nr_pages for ABD.
  * @off is the offset in @abd
index 6662e0fae30e2b727ef3fe50ff95b463cc10a0a1..be9964bff21895c0e89fe4438368994de72033ce 100644 (file)
 #include <sys/zil.h>
 #include <sys/fm/fs/zfs.h>
 #ifdef _KERNEL
+#include <sys/shrinker.h>
 #include <sys/vmsystm.h>
-#include <vm/anon.h>
-#include <sys/fs/swapnode.h>
 #include <sys/zpl.h>
-#include <linux/mm_compat.h>
 #include <linux/page_compat.h>
 #endif
 #include <sys/callb.h>
@@ -1199,7 +1197,7 @@ buf_fini(void)
 {
        int i;
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
        /*
         * Large allocations which do not require contiguous pages
         * should be using vmem_free() in the linux kernel\
@@ -1360,7 +1358,7 @@ buf_init(void)
                hsize <<= 1;
 retry:
        buf_hash_table.ht_mask = hsize - 1;
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
        /*
         * Large allocations which do not require contiguous pages
         * should be using vmem_alloc() in the linux kernel
@@ -9050,7 +9048,7 @@ l2arc_stop(void)
        mutex_exit(&l2arc_feed_thr_lock);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(arc_buf_size);
 EXPORT_SYMBOL(arc_write);
 EXPORT_SYMBOL(arc_read);
index bc03317a26c8095951caabb6720d8d03d5fa3d6f..a8c48167ad1c8ff9c51e20eca0f3301254aa79be 100644 (file)
@@ -762,7 +762,7 @@ dbuf_init(void)
 
 retry:
        h->hash_table_mask = hsize - 1;
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
        /*
         * Large allocations which do not require contiguous pages
         * should be using vmem_alloc() in the linux kernel
@@ -847,7 +847,7 @@ dbuf_fini(void)
 
        for (i = 0; i < DBUF_MUTEXES; i++)
                mutex_destroy(&h->hash_mutexes[i]);
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
        /*
         * Large allocations which do not require contiguous pages
         * should be using vmem_free() in the linux kernel
@@ -4341,7 +4341,7 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx)
        }
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(dbuf_find);
 EXPORT_SYMBOL(dbuf_is_metadata);
 EXPORT_SYMBOL(dbuf_destroy);
index 6c26718f2d8a0384b79df725b4b5865200e8ad79..84232338fcaf0649c947dbf931c6d915def3d652 100644 (file)
@@ -225,7 +225,7 @@ dbuf_stats_destroy(void)
        dbuf_stats_hash_table_destroy();
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 module_param(zfs_dbuf_state_index, int, 0644);
 MODULE_PARM_DESC(zfs_dbuf_state_index, "Calculate arc header index");
 #endif
index 681033d717889cc24e808afe7d1746b0e2609131..f7fe2ae8089d1b53f34a198dba19bfb7fd91c2f4 100644 (file)
@@ -1236,7 +1236,7 @@ ddt_walk(spa_t *spa, ddt_bookmark_t *ddb, ddt_entry_t *dde)
        return (SET_ERROR(ENOENT));
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 module_param(zfs_dedup_prefetch, int, 0644);
 MODULE_PARM_DESC(zfs_dedup_prefetch, "Enable prefetching dedup-ed blks");
 #endif
index fc9cfec045a265234f6976d63d2d96ad468a3554..77c0784cca0b4697eef32260728acdfe81c5196a 100644 (file)
@@ -29,7 +29,6 @@
 #include <sys/ddt.h>
 #include <sys/zap.h>
 #include <sys/dmu_tx.h>
-#include <util/sscanf.h>
 
 int ddt_zap_leaf_blockshift = 12;
 int ddt_zap_indirect_blockshift = 12;
index 2d2586a8c6b9ec8c854da56a0cbb9397259f56da..32a8fd319ac254040a188592a024688a60d68bc6 100644 (file)
@@ -2505,7 +2505,7 @@ dmu_fini(void)
        abd_fini();
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(dmu_bonus_hold);
 EXPORT_SYMBOL(dmu_buf_hold_array_by_bonus);
 EXPORT_SYMBOL(dmu_buf_rele_array);
index 1fc71d1036f9dcf9e8d3ff7ed2656bd2ec0c362b..21e8e5a9475e126c0f1d846aef33059ade5b4275 100644 (file)
@@ -411,7 +411,7 @@ dmu_object_free_zapified(objset_t *mos, uint64_t object, dmu_tx_t *tx)
        VERIFY0(dmu_object_free(mos, object, tx));
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(dmu_object_alloc);
 EXPORT_SYMBOL(dmu_object_alloc_dnsize);
 EXPORT_SYMBOL(dmu_object_claim);
index b6371d3823ca3987691479c06e648b5024fd270b..92de370573414c729fa66e00553208c10195a621 100644 (file)
@@ -2950,7 +2950,7 @@ dmu_objset_willuse_space(objset_t *os, int64_t space, dmu_tx_t *tx)
        }
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(dmu_objset_zil);
 EXPORT_SYMBOL(dmu_objset_pool);
 EXPORT_SYMBOL(dmu_objset_ds);
index cffcd2d00ec876fa16e7c210956d2ea5983eeba0..a5f468ac8db0785c04797c7fca2e7c4ec6b9ee2d 100644 (file)
@@ -769,7 +769,7 @@ traverse_pool(spa_t *spa, uint64_t txg_start, int flags,
        return (err);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(traverse_dataset);
 EXPORT_SYMBOL(traverse_pool);
 
index 861769b4065817d7254ffe6790d80090523d888e..374bb710c0630f4ed98e905705f1e906fc149396 100644 (file)
@@ -37,7 +37,6 @@
 #include <sys/sa.h>
 #include <sys/sa_impl.h>
 #include <sys/zfs_context.h>
-#include <sys/varargs.h>
 #include <sys/trace_dmu.h>
 
 typedef void (*dmu_tx_hold_func_t)(dmu_tx_t *tx, struct dnode *dn,
@@ -1372,7 +1371,7 @@ dmu_tx_fini(void)
        }
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(dmu_tx_create);
 EXPORT_SYMBOL(dmu_tx_hold_write);
 EXPORT_SYMBOL(dmu_tx_hold_write_by_dnode);
index e22560ed1d43f7e53b3a5bc791e1e3525153f447..2133518ff4ef5a97e42e28061468aecc45d214c9 100644 (file)
@@ -357,7 +357,7 @@ dmu_zfetch(zfetch_t *zf, uint64_t blkid, uint64_t nblks, boolean_t fetch_data)
        ZFETCHSTAT_BUMP(zfetchstat_hits);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 /* BEGIN CSTYLED */
 module_param(zfs_prefetch_disable, int, 0644);
 MODULE_PARM_DESC(zfs_prefetch_disable, "Disable all ZFS prefetching");
index 9823f3183d1421b19128587354597e149a9fb1fd..7a4721e17f1c0a8cfe7b57a8cb432e0e29b2ef5e 100644 (file)
@@ -4237,7 +4237,7 @@ dsl_dataset_create_remap_deadlist(dsl_dataset_t *ds, dmu_tx_t *tx)
        spa_feature_incr(spa, SPA_FEATURE_OBSOLETE_COUNTS, tx);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 #if defined(_LP64)
 module_param(zfs_max_recordsize, int, 0644);
 MODULE_PARM_DESC(zfs_max_recordsize, "Max allowed record size");
index f17cedb082137db51a4e169c3fa89e05e15de950..cef460f020416d96393a8d5c6982eaa9456c42e2 100644 (file)
@@ -768,7 +768,7 @@ dsl_delegation_on(objset_t *os)
        return (!!spa_delegation(os->os_spa));
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(dsl_deleg_get);
 EXPORT_SYMBOL(dsl_deleg_set);
 #endif
index e11508c90d0f260551eeee4740160a3f24671ac8..b3296ceee3b377db19ff002cfb134d3a68667a43 100644 (file)
@@ -1095,7 +1095,7 @@ dsl_destroy_inconsistent(const char *dsname, void *arg)
 }
 
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(dsl_destroy_head);
 EXPORT_SYMBOL(dsl_destroy_head_sync_impl);
 EXPORT_SYMBOL(dsl_dataset_user_hold_check_one);
index a866c3074d3c5c83632aaeb1f133dbbfb4b37a01..4b85208d87e92ff951801a8d3370905024de5455 100644 (file)
@@ -2165,7 +2165,7 @@ dsl_dir_is_zapified(dsl_dir_t *dd)
        return (doi.doi_type == DMU_OTN_ZAP_METADATA);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(dsl_dir_set_quota);
 EXPORT_SYMBOL(dsl_dir_set_reservation);
 #endif
index 094b6bec01032b3752e62f6a7a102cf0fc095cc4..1bb49c13ae15cced8c3b625235ee5002c8f8c926 100644 (file)
@@ -1208,7 +1208,7 @@ dsl_pool_config_held_writer(dsl_pool_t *dp)
        return (RRW_WRITE_HELD(&dp->dp_config_rwlock));
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(dsl_pool_config_enter);
 EXPORT_SYMBOL(dsl_pool_config_exit);
 
index 57b8eb7941d87f6cdea8b1fe112eb853cce2d431..9f892acdbf80c2f235f28c8550e217bdc25f0bf3 100644 (file)
@@ -1251,7 +1251,7 @@ dsl_prop_nvlist_add_string(nvlist_t *nv, zfs_prop_t prop, const char *value)
        nvlist_free(propval);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(dsl_prop_register);
 EXPORT_SYMBOL(dsl_prop_unregister);
 EXPORT_SYMBOL(dsl_prop_unregister_all);
index c19a1b75cd64e309d1855ee15c868c185a14519d..2c349474618907b1986d470281d711cc51d956ab 100644 (file)
@@ -3909,7 +3909,7 @@ dsl_scan_freed(spa_t *spa, const blkptr_t *bp)
                dsl_scan_freed_dva(spa, bp, i);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 /* CSTYLED */
 module_param(zfs_scan_vdev_limit, ulong, 0644);
 MODULE_PARM_DESC(zfs_scan_vdev_limit,
index 28130d25711a8dfca04059963a247a107d02d139..d8eb10d37685bf14e4f4d81415ed61997e95b9b0 100644 (file)
@@ -185,7 +185,7 @@ dsl_sync_task_sync(dsl_sync_task_t *dst, dmu_tx_t *tx)
                kmem_free(dst, sizeof (*dst));
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(dsl_sync_task);
 EXPORT_SYMBOL(dsl_sync_task_nowait);
 #endif
index 52d4acaa23ed2a82387068ef654e07ee0ebcb887..5c30066700cc9a5d8b80d5cc5fd24965f42e47d9 100644 (file)
@@ -57,7 +57,6 @@
 #include <sys/nvpair.h>
 #include <sys/cmn_err.h>
 #include <sys/sysmacros.h>
-#include <sys/compress.h>
 #include <sys/sunddi.h>
 #include <sys/systeminfo.h>
 #include <sys/fm/util.h>
 #ifdef _KERNEL
 #include <sys/atomic.h>
 #include <sys/condvar.h>
-#include <sys/cpuvar.h>
-#include <sys/systm.h>
-#include <sys/dumphdr.h>
-#include <sys/cpuvar.h>
 #include <sys/console.h>
 #include <sys/kobj.h>
 #include <sys/time.h>
index 40166b3fe5275d9227be37c1d3ef0ebdca9d2c2a..5cac2a7de62f8d0bddd78e7affec3ee9ef000186 100644 (file)
 
 #include <sys/debug.h>
 #include <sys/types.h>
+#include <sys/strings.h>
 #include "qat.h"
 
 #ifdef _KERNEL
 
-#include <sys/systm.h>
 #include <sys/zmod.h>
-
 typedef size_t zlen_t;
 #define        compress_func   z_compress_level
 #define        uncompress_func z_uncompress
 
 #else /* _KERNEL */
 
-#include <strings.h>
 #include <zlib.h>
-
 typedef uLongf zlen_t;
 #define        compress_func   compress2
 #define        uncompress_func uncompress
index 9f0065b532d20de31741f77c9d2a65822b956354..c11e459e0f0bfd9290359ec9ac61270ece95cef0 100644 (file)
@@ -3850,7 +3850,7 @@ metaslab_check_free(spa_t *spa, const blkptr_t *bp)
        spa_config_exit(spa, SCL_VDEV, FTAG);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 /* CSTYLED */
 module_param(metaslab_aliquot, ulong, 0644);
 MODULE_PARM_DESC(metaslab_aliquot,
@@ -3904,4 +3904,4 @@ MODULE_PARM_DESC(zfs_metaslab_switch_threshold,
 module_param(metaslab_force_ganging, ulong, 0644);
 MODULE_PARM_DESC(metaslab_force_ganging,
        "blocks larger than this size are forced to be gang blocks");
-#endif /* _KERNEL && HAVE_SPL */
+#endif
index f51952ee40820c354823e00b3e4a9b323d3ff752..6fd5d3e9a4f32aa0f590f4a0a443b38bba1418c3 100644 (file)
@@ -597,7 +597,7 @@ mmp_signal_all_threads(void)
        mutex_exit(&spa_namespace_lock);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 #include <linux/mod_compat.h>
 
 static int
index 48137b3fc1e129306e15ab603ecaac0e7e19d612..2a594c56cbd58ea304a1f4fc4ce4235a89cbefb4 100644 (file)
@@ -403,7 +403,7 @@ multilist_link_active(multilist_node_t *link)
        return (list_link_active(link));
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 
 /* BEGIN CSTYLED */
 
index 4ec1320661f5fe384c3ae2cd17671ad0b2e58bd2..e3e97c9bb365e7fb6d7cc9024458e7b90bdc4c40 100644 (file)
@@ -38,9 +38,9 @@
 
 
 #include <sys/types.h>
-#include <sys/systm.h>
 #include <sys/pathname.h>
 #include <sys/kmem.h>
+#include <sys/sysmacros.h>
 
 /*
  * Pathname utilities.
index 4a863f9a56458af0bb9dc5424aead54ec599a67f..5b6b90642d6f9d31bf9f93dfa6f8afc6fada1c44 100644 (file)
@@ -28,7 +28,6 @@
 #include <sys/zfs_context.h>
 #include <sys/types.h>
 #include <sys/param.h>
-#include <sys/systm.h>
 #include <sys/sysmacros.h>
 #include <sys/dmu.h>
 #include <sys/dmu_impl.h>
index dba6efe7be9d54fc23bc40fd3b72c2f06686140d..50862adcd95f3051fec4a5df1d1675bb2b59b092 100644 (file)
 #ifdef _KERNEL
 #include <sys/fm/protocol.h>
 #include <sys/fm/util.h>
-#include <sys/bootprops.h>
 #include <sys/callb.h>
-#include <sys/cpupart.h>
-#include <sys/pool.h>
-#include <sys/sysdc.h>
 #include <sys/zone.h>
 #endif /* _KERNEL */
 
@@ -162,7 +158,6 @@ static int spa_load_impl(spa_t *spa, spa_import_type_t type, char **ereport,
 static void spa_vdev_resilver_done(spa_t *spa);
 
 uint_t         zio_taskq_batch_pct = 75;       /* 1 thread per cpu in pset */
-id_t           zio_taskq_psrset_bind = PS_NONE;
 boolean_t      zio_taskq_sysdc = B_TRUE;       /* use SDC scheduling class */
 uint_t         zio_taskq_basedc = 80;          /* base duty cycle */
 
@@ -1088,6 +1083,7 @@ spa_create_zio_taskqs(spa_t *spa)
 static void
 spa_thread(void *arg)
 {
+       psetid_t zio_taskq_psrset_bind = PS_NONE;
        callb_cpr_t cprinfo;
 
        spa_t *spa = arg;
@@ -7795,7 +7791,7 @@ spa_event_notify(spa_t *spa, vdev_t *vd, nvlist_t *hist_nvl, const char *name)
        spa_event_post(spa_event_create(spa, vd, hist_nvl, name));
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 /* state manipulation functions */
 EXPORT_SYMBOL(spa_open);
 EXPORT_SYMBOL(spa_open_rewind);
@@ -7852,7 +7848,7 @@ EXPORT_SYMBOL(spa_prop_clear_bootfs);
 EXPORT_SYMBOL(spa_event_notify);
 #endif
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 module_param(spa_load_verify_maxinflight, int, 0644);
 MODULE_PARM_DESC(spa_load_verify_maxinflight,
        "Max concurrent traversal I/Os while verifying pool during import -X");
index 50bba234540a9e45c9688b3cb6578f96e3a8b258..b94f0fc8445dcf6daa37da2718bf5dc3f3004665 100644 (file)
@@ -600,7 +600,7 @@ spa_config_update(spa_t *spa, int what)
                spa_config_update(spa, SPA_CONFIG_UPDATE_VDEVS);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(spa_config_load);
 EXPORT_SYMBOL(spa_all_configs);
 EXPORT_SYMBOL(spa_config_set);
index 1299faa58b330abad55056694fe76bad628ead3f..e42f8a0212f61a2cc7288532bb384df0be56a265 100644 (file)
@@ -404,7 +404,7 @@ spa_errlog_sync(spa_t *spa, uint64_t txg)
        mutex_exit(&spa->spa_errlog_lock);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 /* error handling */
 EXPORT_SYMBOL(spa_log_error);
 EXPORT_SYMBOL(spa_get_errlog_size);
index 511bf1094247c75d2258224cf191c464740e4f27..969fdb000d29e52810be387d87e1f3139e3568ba 100644 (file)
@@ -183,11 +183,7 @@ static char *
 spa_history_zone(void)
 {
 #ifdef _KERNEL
-#ifdef HAVE_SPL
        return ("linux");
-#else
-       return (curproc->p_zone->zone_name);
-#endif
 #else
        return (NULL);
 #endif
@@ -626,7 +622,7 @@ spa_history_log_version(spa_t *spa, const char *operation, dmu_tx_t *tx)
            u->nodename, u->release, u->version, u->machine);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(spa_history_create_obj);
 EXPORT_SYMBOL(spa_history_get);
 EXPORT_SYMBOL(spa_history_log);
index 234e5c60d80b0a472ccf119619c7b96680f0e45c..288e5378b0a01dc2ec81a3a7ae9577cb9f6212bd 100644 (file)
@@ -2254,7 +2254,7 @@ spa_set_missing_tvds(spa_t *spa, uint64_t missing)
        spa->spa_missing_tvds = missing;
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 
 #include <linux/mod_compat.h>
 
index f604836c823fc06ee28e946618a3c379fa98eaea..3f137d9c75b49b54797459e1358b060ee87be81f 100644 (file)
@@ -1017,7 +1017,7 @@ spa_stats_destroy(spa_t *spa)
        spa_mmp_history_destroy(spa);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 /* CSTYLED */
 module_param(zfs_read_history, int, 0644);
 MODULE_PARM_DESC(zfs_read_history,
index 2c7f5303b1fcf893d69164ec1ac38be51ef6b44f..30f25157300347f516d00e730a99fcda9d1bbcd8 100644 (file)
@@ -934,7 +934,7 @@ txg_list_next(txg_list_t *tl, void *p, uint64_t txg)
        return (tn == NULL ? NULL : (char *)tn - tl->tl_offset);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(txg_init);
 EXPORT_SYMBOL(txg_fini);
 EXPORT_SYMBOL(txg_sync_start);
index 7bb27f0ec7e495417b4bbed849958a5b9b18cd55..388be36179576773a73b01bdd0780f71dd982c99 100644 (file)
@@ -4237,7 +4237,7 @@ vdev_deadman(vdev_t *vd, char *tag)
        }
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(vdev_fault);
 EXPORT_SYMBOL(vdev_degrade);
 EXPORT_SYMBOL(vdev_online);
index 0570ceb2e68762893e0029c54468fa4149b10aae..0f1d9448b590036984ccf4e88251c689afa041eb 100644 (file)
@@ -425,7 +425,7 @@ vdev_cache_stat_fini(void)
        }
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 module_param(zfs_vdev_cache_max, int, 0644);
 MODULE_PARM_DESC(zfs_vdev_cache_max, "Inflate reads small than max");
 
index 9c3a1ba802102de8c9e541ec61d5cb008880f3dc..5cdfd960c89bd71816f3662a9d57bdcd79b4527e 100644 (file)
@@ -33,7 +33,6 @@
 #include <sys/abd.h>
 #include <sys/fs/zfs.h>
 #include <sys/zio.h>
-#include <sys/sunldi.h>
 #include <linux/mod_compat.h>
 
 char *zfs_vdev_scheduler = VDEV_SCHEDULER;
index ff0968384c7775a21d5e9c207b859f053604c412..a93e412589b487c0bd5bd90bf8a279d52a971186 100644 (file)
@@ -1687,7 +1687,7 @@ vdev_ops_t vdev_indirect_ops = {
        B_FALSE                 /* leaf vdev */
 };
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(rs_alloc);
 EXPORT_SYMBOL(spa_condense_fini);
 EXPORT_SYMBOL(spa_start_indirect_condensing_thread);
index a0163b2e5d6349c861fdf3b48de8996b7ba954be..1c44a64287d353d5dc6ccab9ef221f47e6586440 100644 (file)
@@ -213,7 +213,7 @@ vdev_indirect_births_physbirth(vdev_indirect_births_t *vib, uint64_t offset,
        return (-1);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(vdev_indirect_births_add_entry);
 EXPORT_SYMBOL(vdev_indirect_births_alloc);
 EXPORT_SYMBOL(vdev_indirect_births_close);
index dbd6a7635b498426078c99319fd145fc6c7ccc81..d91f2338366fbaaf36e147a198e5021eacb84f4f 100644 (file)
@@ -596,7 +596,7 @@ vdev_indirect_mapping_free_obsolete_counts(vdev_indirect_mapping_t *vim,
        vmem_free(counts, vim->vim_phys->vimp_num_entries * sizeof (uint32_t));
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(vdev_indirect_mapping_add_entries);
 EXPORT_SYMBOL(vdev_indirect_mapping_alloc);
 EXPORT_SYMBOL(vdev_indirect_mapping_bytes_mapped);
index 1c591cd6472ee4d7fb44d1ae2eab9b8a77093ea9..65357d841805917876d023afe444cf9a118e5809 100644 (file)
@@ -774,7 +774,7 @@ vdev_ops_t vdev_spare_ops = {
        B_FALSE                 /* not a leaf vdev */
 };
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 /* BEGIN CSTYLED */
 module_param(zfs_vdev_mirror_rotating_inc, int, 0644);
 MODULE_PARM_DESC(zfs_vdev_mirror_rotating_inc,
index 3ac31a87278a20207d276acb36e14b24b57b8c64..4f29d0043b070b38e7ec618da5102e530e5ed091 100644 (file)
@@ -883,7 +883,7 @@ vdev_queue_last_offset(vdev_t *vd)
        return (vd->vdev_queue.vq_last_offset);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 module_param(zfs_vdev_aggregation_limit, int, 0644);
 MODULE_PARM_DESC(zfs_vdev_aggregation_limit, "Max vdev I/O aggregation size");
 
index ba4dcc480d9cd449c65eaedf66999de1b7880c35..e6112bc0213730fb0f82a2d6b614f329d687fba8 100644 (file)
@@ -614,7 +614,7 @@ vdev_raidz_impl_set(const char *val)
        return (err);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 #include <linux/mod_compat.h>
 
 static int
index 07c556ed059af44e7b88aebb55610fea2e090a06..f9084e8cf653b7cf874be6bb021598b52145889c 100644 (file)
@@ -2102,7 +2102,7 @@ spa_removal_get_stats(spa_t *spa, pool_removal_stat_t *prs)
        return (0);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 module_param(zfs_remove_max_segment, int, 0644);
 MODULE_PARM_DESC(zfs_remove_max_segment,
        "Largest contiguous segment to allocate when removing device");
index 791cbee88812696a6456ac10870ab352fadbc768..6ab2551b62c125273e555532dfde9dcaf1793dc2 100644 (file)
@@ -1629,7 +1629,7 @@ zap_get_stats(objset_t *os, uint64_t zapobj, zap_stats_t *zs)
        return (0);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(zap_create);
 EXPORT_SYMBOL(zap_create_dnsize);
 EXPORT_SYMBOL(zap_create_norm);
index 31230dc52b0b694f665460075eddf3cc2c106488..e7194344b7d8c2ce03ad713eabb80cb2fd08985a 100644 (file)
 #include <sys/zcp_iter.h>
 #include <sys/zcp_prop.h>
 #include <sys/zcp_global.h>
-#include <util/sscanf.h>
 
 #ifndef KM_NORMALPRI
 #define        KM_NORMALPRI    0
index 9fee4744517e6cf4560494b4acd37a6fcabe1a4b..b1af4da2f4a5f8e0fd8e816e94e376717eaf6f08 100644 (file)
@@ -27,9 +27,7 @@
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/time.h>
-#include <sys/systm.h>
 #include <sys/sysmacros.h>
-#include <sys/resource.h>
 #include <sys/vfs.h>
 #include <sys/vnode.h>
 #include <sys/sid.h>
@@ -38,7 +36,6 @@
 #include <sys/kmem.h>
 #include <sys/cmn_err.h>
 #include <sys/errno.h>
-#include <sys/unistd.h>
 #include <sys/sdt.h>
 #include <sys/fs/zfs.h>
 #include <sys/mode.h>
@@ -54,7 +51,6 @@
 #include <sys/sa.h>
 #include <sys/trace_acl.h>
 #include <sys/zpl.h>
-#include "fs/fs_subr.h"
 
 #define        ALLOW   ACE_ACCESS_ALLOWED_ACE_TYPE
 #define        DENY    ACE_ACCESS_DENIED_ACE_TYPE
@@ -98,6 +94,8 @@
 
 #define        ALL_MODE_EXECS (S_IXUSR | S_IXGRP | S_IXOTH)
 
+#define        IDMAP_WK_CREATOR_OWNER_UID      2147483648U
+
 static uint16_t
 zfs_ace_v0_get_type(void *acep)
 {
index 16327a2250583fdc7693642ea64605dac5e00cfb..7893bde4e2dbf813f5bf3d955ea56bd8da2e84bc 100644 (file)
@@ -198,7 +198,7 @@ zfs_znode_byteswap(void *buf, size_t size)
        }
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(zfs_oldacl_byteswap);
 EXPORT_SYMBOL(zfs_acl_byteswap);
 EXPORT_SYMBOL(zfs_znode_byteswap);
index 2b7272d4ffd518b06ffd6778d30e335a2481194e..f0720e58a12cbbd3548a684a22d0ed389ee33d78 100644 (file)
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/time.h>
-#include <sys/systm.h>
 #include <sys/sysmacros.h>
 #include <sys/pathname.h>
 #include <sys/vfs.h>
-#include <sys/vfs_opreg.h>
 #include <sys/zfs_ctldir.h>
 #include <sys/zfs_ioctl.h>
 #include <sys/zfs_vfsops.h>
@@ -85,7 +83,6 @@
 #include <sys/dmu_objset.h>
 #include <sys/dsl_destroy.h>
 #include <sys/dsl_deleg.h>
-#include <sys/mount.h>
 #include <sys/zpl.h>
 #include "zfs_namecheck.h"
 
index 7eb426b781191370722e16498546fa653019c062..8a591904f6ab857cdbdc337a5dfb0cb20cf7d87d 100644 (file)
@@ -28,9 +28,7 @@
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/time.h>
-#include <sys/systm.h>
 #include <sys/sysmacros.h>
-#include <sys/resource.h>
 #include <sys/vfs.h>
 #include <sys/vnode.h>
 #include <sys/file.h>
@@ -41,7 +39,6 @@
 #include <sys/cmn_err.h>
 #include <sys/errno.h>
 #include <sys/stat.h>
-#include <sys/unistd.h>
 #include <sys/sunddi.h>
 #include <sys/random.h>
 #include <sys/policy.h>
@@ -49,7 +46,6 @@
 #include <sys/zfs_acl.h>
 #include <sys/zfs_vnops.h>
 #include <sys/fs/zfs.h>
-#include "fs/fs_subr.h"
 #include <sys/zap.h>
 #include <sys/dmu.h>
 #include <sys/atomic.h>
@@ -57,8 +53,6 @@
 #include <sys/zfs_fuid.h>
 #include <sys/sa.h>
 #include <sys/zfs_sa.h>
-#include <sys/dnlc.h>
-#include <sys/extdirent.h>
 
 /*
  * zfs_match_find() is used by zfs_dirent_lock() to peform zap lookups
index e28e46e7ad3181509de844d72bb0ccdce0b8113d..e604f33c83894028837bf2c7c9dad2041e3e3f1c 100644 (file)
@@ -1041,7 +1041,7 @@ zfs_post_state_change(spa_t *spa, vdev_t *vd, uint64_t laststate)
 #endif
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(zfs_ereport_post);
 EXPORT_SYMBOL(zfs_ereport_post_checksum);
 EXPORT_SYMBOL(zfs_post_remove);
index 5cfb0c975c6e7927cbba68e17e2db8918ac8b7ae..e57753593c6ee536e064ac180cf1eb08f956fe86 100644 (file)
@@ -29,7 +29,6 @@
 #include <sys/refcount.h>
 #include <sys/nvpair.h>
 #ifdef _KERNEL
-#include <sys/kidmap.h>
 #include <sys/sid.h>
 #include <sys/zfs_vfsops.h>
 #include <sys/zfs_znode.h>
index eacbf930d50a9c4480fc3898e57b213fef7f9205..f95b77db72eecf1f9a0ce75e0248cd4c6ac9d8ed 100644 (file)
 #include <sys/param.h>
 #include <sys/errno.h>
 #include <sys/uio.h>
-#include <sys/buf.h>
-#include <sys/modctl.h>
-#include <sys/open.h>
 #include <sys/file.h>
 #include <sys/kmem.h>
-#include <sys/conf.h>
 #include <sys/cmn_err.h>
 #include <sys/stat.h>
 #include <sys/zfs_ioctl.h>
 #include <sys/spa_impl.h>
 #include <sys/vdev.h>
 #include <sys/vdev_impl.h>
-#include <sys/priv_impl.h>
 #include <sys/dmu.h>
 #include <sys/dsl_dir.h>
 #include <sys/dsl_dataset.h>
 #include <sys/dmu_objset.h>
 #include <sys/dmu_impl.h>
 #include <sys/dmu_tx.h>
-#include <sys/ddi.h>
 #include <sys/sunddi.h>
-#include <sys/sunldi.h>
 #include <sys/policy.h>
 #include <sys/zone.h>
 #include <sys/nvpair.h>
 #include <sys/pathname.h>
-#include <sys/mount.h>
 #include <sys/sdt.h>
 #include <sys/fs/zfs.h>
 #include <sys/zfs_ctldir.h>
 #include <sys/zfs_onexit.h>
 #include <sys/zvol.h>
 #include <sys/dsl_scan.h>
-#include <sharefs/share.h>
 #include <sys/fm/util.h>
 #include <sys/dsl_crypt.h>
 
@@ -7115,7 +7106,7 @@ _fini(void)
            ZFS_META_VERSION, ZFS_META_RELEASE, ZFS_DEBUG_STR);
 }
 
-#ifdef HAVE_SPL
+#if defined(_KERNEL)
 module_init(_init);
 module_exit(_fini);
 
@@ -7123,4 +7114,4 @@ MODULE_DESCRIPTION("ZFS");
 MODULE_AUTHOR(ZFS_META_AUTHOR);
 MODULE_LICENSE(ZFS_META_LICENSE);
 MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);
-#endif /* HAVE_SPL */
+#endif
index ce7b84927e1e1c3efa99f36622299b179b7ef87f..15c396ce0329eb1d32508fcfdaa9802605cdbf3f 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <sys/types.h>
 #include <sys/param.h>
-#include <sys/systm.h>
 #include <sys/sysmacros.h>
 #include <sys/cmn_err.h>
 #include <sys/kmem.h>
@@ -45,7 +44,6 @@
 #include <sys/dmu.h>
 #include <sys/spa.h>
 #include <sys/zfs_fuid.h>
-#include <sys/ddi.h>
 #include <sys/dsl_dataset.h>
 
 /*
@@ -720,7 +718,7 @@ zfs_log_acl(zilog_t *zilog, dmu_tx_t *tx, znode_t *zp,
        zil_itx_assign(zilog, itx, tx);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 module_param(zfs_immediate_write_sz, long, 0644);
 MODULE_PARM_DESC(zfs_immediate_write_sz, "Largest data block to write to zil");
 #endif
index bc3892645fe1071db24670e46a22483c62e86931..31f77ce81b37799ac3647f864db23f17f43d4581 100644 (file)
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/errno.h>
-#include <sys/open.h>
 #include <sys/kmem.h>
-#include <sys/conf.h>
-#include <sys/ddi.h>
 #include <sys/sunddi.h>
 #include <sys/zfs_ioctl.h>
-#include <sys/mkdev.h>
 #include <sys/zfs_onexit.h>
 #include <sys/zvol.h>
 
index e2ff0078935f6df5396c58cec553b86527f8d062..ba103084f0c51e28465dac6f09cccd0a6bfecfef 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <sys/types.h>
 #include <sys/param.h>
-#include <sys/systm.h>
 #include <sys/sysmacros.h>
 #include <sys/cmn_err.h>
 #include <sys/kmem.h>
index d7fc014968bf0438bebe75dcc1c86ee3bb28bdb9..7ecc353d262cf3e658f054053df2a2e3c87017f5 100644 (file)
@@ -96,6 +96,7 @@
  */
 
 #include <sys/zfs_rlock.h>
+#include <sys/sysmacros.h>
 
 /*
  * Check if a write lock can be grabbed, or wait and recheck until available.
index 2577860acb0e6f5c96bd2ed474321420b3d16c14..b890bbaf942e23ec48819d027b39a042258e27e3 100644 (file)
 
 #include <sys/types.h>
 #include <sys/param.h>
-#include <sys/systm.h>
 #include <sys/sysmacros.h>
 #include <sys/kmem.h>
 #include <sys/pathname.h>
 #include <sys/vnode.h>
 #include <sys/vfs.h>
-#include <sys/vfs_opreg.h>
 #include <sys/mntent.h>
-#include <sys/mount.h>
 #include <sys/cmn_err.h>
-#include "fs/fs_subr.h"
 #include <sys/zfs_znode.h>
 #include <sys/zfs_vnops.h>
 #include <sys/zfs_dir.h>
 #include <sys/zap.h>
 #include <sys/sa.h>
 #include <sys/sa_impl.h>
-#include <sys/varargs.h>
 #include <sys/policy.h>
 #include <sys/atomic.h>
-#include <sys/mkdev.h>
-#include <sys/modctl.h>
-#include <sys/refstr.h>
 #include <sys/zfs_ioctl.h>
 #include <sys/zfs_ctldir.h>
 #include <sys/zfs_fuid.h>
-#include <sys/bootconf.h>
 #include <sys/sunddi.h>
-#include <sys/dnlc.h>
 #include <sys/dmu_objset.h>
 #include <sys/spa_boot.h>
 #include <sys/zpl.h>
@@ -2341,7 +2331,7 @@ zfs_fini(void)
        zfsctl_fini();
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(zfs_suspend_fs);
 EXPORT_SYMBOL(zfs_resume_fs);
 EXPORT_SYMBOL(zfs_userspace_one);
index d7d73201dbaf8257c15ac794ae6bc5024139f039..832e4bfc9b612d856c4f55440376d23d1d8375c5 100644 (file)
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/time.h>
-#include <sys/systm.h>
 #include <sys/sysmacros.h>
-#include <sys/resource.h>
 #include <sys/vfs.h>
-#include <sys/vfs_opreg.h>
 #include <sys/file.h>
 #include <sys/stat.h>
 #include <sys/kmem.h>
 #include <sys/uio.h>
 #include <sys/vmsystm.h>
 #include <sys/atomic.h>
-#include <vm/pvn.h>
 #include <sys/pathname.h>
 #include <sys/cmn_err.h>
 #include <sys/errno.h>
-#include <sys/unistd.h>
 #include <sys/zfs_dir.h>
 #include <sys/zfs_acl.h>
 #include <sys/zfs_ioctl.h>
 #include <sys/dbuf.h>
 #include <sys/zap.h>
 #include <sys/sa.h>
-#include <sys/dirent.h>
 #include <sys/policy.h>
 #include <sys/sunddi.h>
 #include <sys/sid.h>
 #include <sys/mode.h>
-#include "fs/fs_subr.h"
 #include <sys/zfs_ctldir.h>
 #include <sys/zfs_fuid.h>
 #include <sys/zfs_sa.h>
 #include <sys/zfs_vnops.h>
-#include <sys/dnlc.h>
 #include <sys/zfs_rlock.h>
-#include <sys/extdirent.h>
-#include <sys/kidmap.h>
 #include <sys/cred.h>
-#include <sys/attr.h>
 #include <sys/zpl.h>
 #include <sys/zil.h>
 #include <sys/sa_impl.h>
@@ -5234,7 +5223,7 @@ zfs_retzcbuf(struct inode *ip, xuio_t *xuio, cred_t *cr)
 }
 #endif /* HAVE_UIO_ZEROCOPY */
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(zfs_open);
 EXPORT_SYMBOL(zfs_close);
 EXPORT_SYMBOL(zfs_read);
index c8a613f14f7738ef4b57df667173181a0e18e0d7..bb18c1b9a35afbea407344130e664a140d4cd1aa 100644 (file)
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/time.h>
-#include <sys/systm.h>
 #include <sys/sysmacros.h>
-#include <sys/resource.h>
 #include <sys/mntent.h>
-#include <sys/mkdev.h>
 #include <sys/u8_textprep.h>
 #include <sys/dsl_dataset.h>
 #include <sys/vfs.h>
-#include <sys/vfs_opreg.h>
 #include <sys/vnode.h>
 #include <sys/file.h>
 #include <sys/kmem.h>
 #include <sys/errno.h>
-#include <sys/unistd.h>
 #include <sys/mode.h>
 #include <sys/atomic.h>
-#include <vm/pvn.h>
-#include "fs/fs_subr.h"
 #include <sys/zfs_dir.h>
 #include <sys/zfs_acl.h>
 #include <sys/zfs_ioctl.h>
@@ -56,7 +49,6 @@
 #include <sys/zfs_ctldir.h>
 #include <sys/dnode.h>
 #include <sys/fs/zfs.h>
-#include <sys/kidmap.h>
 #include <sys/zpl.h>
 #endif /* _KERNEL */
 
@@ -2243,7 +2235,7 @@ zfs_obj_to_stats(objset_t *osp, uint64_t obj, zfs_stat_t *sb,
        return (error);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(zfs_create_fs);
 EXPORT_SYMBOL(zfs_obj_to_path);
 
index d0a1002525d28d11c97a91ea4dade4b52041c9f3..da3ee4500055da78a7da021fec17cb53d5d2dc5d 100644 (file)
@@ -32,7 +32,6 @@
 #include <sys/zap.h>
 #include <sys/arc.h>
 #include <sys/stat.h>
-#include <sys/resource.h>
 #include <sys/zil.h>
 #include <sys/zil_impl.h>
 #include <sys/dsl_dataset.h>
@@ -3406,7 +3405,7 @@ zil_reset(const char *osname, void *arg)
        return (0);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(zil_alloc);
 EXPORT_SYMBOL(zil_free);
 EXPORT_SYMBOL(zil_open);
index 81ae65c31910c5a2ea3e1ad6bed0c064858e962f..8a495988b2adc385b9abdbc973505b903f8277a3 100644 (file)
@@ -4712,7 +4712,7 @@ zbookmark_subtree_completed(const dnode_phys_t *dnp,
            last_block) <= 0);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(zio_type_name);
 EXPORT_SYMBOL(zio_buf_alloc);
 EXPORT_SYMBOL(zio_data_buf_alloc);
index 974af03d12c669cb77d614ce00e7b2af2f0ffdb4..971e8de8b5a05e6863ecc49f8abd86b66d72eccf 100644 (file)
@@ -32,7 +32,6 @@
  */
 
 #include <sys/zfs_context.h>
-#include <sys/compress.h>
 #include <sys/spa.h>
 #include <sys/zfeature.h>
 #include <sys/zio.h>
index 2e617678290cf4ea58464e392c2719c369551074..2533aee139f6dbe1fb5e2680385cd76e4e69314d 100644 (file)
@@ -2026,7 +2026,7 @@ error:
        return (ret);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 /* BEGIN CSTYLED */
 module_param(zfs_key_max_salt_uses, ulong, 0644);
 MODULE_PARM_DESC(zfs_key_max_salt_uses, "Max number of times a salt value "
index 26f255c7b2c5b54e510f11a7117c19fb04613d7e..87d32a11556ba87ad8f9e8456a89c6a93b795a2b 100644 (file)
@@ -855,7 +855,7 @@ zio_inject_fini(void)
        rw_destroy(&inject_lock);
 }
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 EXPORT_SYMBOL(zio_injection_enabled);
 EXPORT_SYMBOL(zio_inject_fault);
 EXPORT_SYMBOL(zio_inject_list_next);
index e03a0481cff0dfd589475913134dcc774e538012..5b6839dd478f7b67e26197462db2186d24a8cb39 100644 (file)
@@ -27,6 +27,7 @@
 #ifdef CONFIG_COMPAT
 #include <linux/compat.h>
 #endif
+#include <sys/file.h>
 #include <sys/dmu_objset.h>
 #include <sys/zfs_vfsops.h>
 #include <sys/zfs_vnops.h>
index ebb6e7be2cac5498e7ae1b57f04a8bab41733136..09e38ee8bda80a3931a122360c706f68b5da6217 100644 (file)
@@ -1498,7 +1498,7 @@ zpl_posix_acl_free(void *arg)
                         * a is not last node, make sure next pointer is set
                         * by the adder and advance the head.
                         */
-                       while (ACCESS_ONCE(a->next) == NULL)
+                       while (READ_ONCE(a->next) == NULL)
                                cpu_relax();
                        acl_rel_head = a->next;
                        a->next = freelist;
index 4f4854436e4ff2f2e8e158a1352f4cc1f7c6895b..014a5cc6c7e04203d2f19f0b11a1e8958e30a7db 100644 (file)
@@ -189,7 +189,7 @@ zrl_owner(zrlock_t *zrl)
 }
 #endif
 
-#if defined(_KERNEL) && defined(HAVE_SPL)
+#if defined(_KERNEL)
 
 EXPORT_SYMBOL(zrl_add_impl);
 EXPORT_SYMBOL(zrl_remove);
index 58cbce477be5da23b87f4b673b59f045d2ff2f8d..6c800dcb8780e6e0520e718ceb7fc16a4ea3b150 100644 (file)
@@ -21,10 +21,10 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 
 Requires:       dkms >= 2.2.0.3
-Requires:       spl-dkms = %{version}
 Requires:       gcc, make, perl
 %if 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version}
 Requires:       kernel-devel
+Obsoletes:      spl-dkms
 %endif
 Provides:       %{module}-kmod = %{version}
 AutoReqProv:    no
index e8d91b4e9438d89737182276a63e16638a8c76fa..f7f462a11d58da76a1bf54c5cdc55e65031d5938 100644 (file)
@@ -79,13 +79,6 @@ BuildRequires:  %{_bindir}/kmodtool
 %endif
 %endif
 
-%if 0%{?rhel}%{?fedora}%{?suse_version}
-BuildRequires:             kmod-spl-devel = %{version}
-%global KmodsRequires      kmod-spl
-%global KmodsDevelRequires kmod-spl-devel
-%global KmodsMetaRequires  spl-kmod
-%endif
-
 # LDFLAGS are not sanitized by arch/*/Makefile for these architectures.
 %ifarch ppc ppc64 ppc64le aarch64
 %global __global_ldflags %{nil}
@@ -98,7 +91,7 @@ BuildRequires:             kmod-spl-devel = %{version}
 # Kmodtool does its magic here.  A patched version of kmodtool is shipped
 # with the source rpm until kmod development packages are supported upstream.
 # https://bugzilla.rpmfusion.org/show_bug.cgi?id=2714
-%{expand:%(bash %{SOURCE10} --target %{_target_cpu} %{?repo:--repo %{?repo}} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null) }
+%{expand:%(bash %{SOURCE10} --target %{_target_cpu} %{?repo:--repo %{?repo}} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} --obsolete-name spl --obsolete-version 0.8 2>/dev/null) }
 
 
 %description
@@ -109,7 +102,7 @@ This package contains the ZFS kernel modules.
 %{?kmodtool_check}
 
 # Print kmodtool output for debugging purposes:
-bash %{SOURCE10}  --target %{_target_cpu} %{?repo:--repo %{?repo}} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null
+bash %{SOURCE10}  --target %{_target_cpu} %{?repo:--repo %{?repo}} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} --obsolete-name spl --obsolete-version 0.8 2>/dev/null
 
 %if %{with debug}
     %define debug --enable-debug
@@ -123,28 +116,6 @@ bash %{SOURCE10}  --target %{_target_cpu} %{?repo:--repo %{?repo}} --kmodname %{
     %define debuginfo --disable-debuginfo
 %endif
 
-#
-# Allow the overriding of spl locations
-#
-%if %{defined require_splver}
-%define splver %{require_splver}
-%else
-%define splver %{version}
-%endif
-
-%if %{defined require_spldir}
-%define spldir %{require_spldir}
-%else
-%define spldir %{_usrsrc}/spl-%{splver}
-%endif
-
-%if %{defined require_splobj}
-%define splobj %{require_splobj}
-%else
-%define splobj %{spldir}/${kernel_version%%___*}
-%endif
-
-
 # Leverage VPATH from configure to avoid making multiple copies.
 %define _configure ../%{module}-%{version}/configure
 
@@ -161,8 +132,6 @@ for kernel_version in %{?kernel_versions}; do
         --with-config=kernel \
         --with-linux=%{ksrc} \
         --with-linux-obj=%{kobj} \
-        --with-spl="%{spldir}" \
-        --with-spl-obj="%{splobj}" \
         %{debug} \
         %{debuginfo}
     make %{?_smp_mflags}
index e0862b14b6b5307882f7d4643840e3e3d3d2714e..deca786f44b72e13d3dd4fe4e876d60bade28b54 100644 (file)
@@ -80,13 +80,13 @@ License:        @ZFS_META_LICENSE@
 URL:            http://zfsonlinux.org/
 Source0:        %{name}-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires:       spl = %{version}
 Requires:       libzpool2 = %{version}
 Requires:       libnvpair1 = %{version}
 Requires:       libuutil1 = %{version}
 Requires:       libzfs2 = %{version}
 Requires:       %{name}-kmod = %{version}
 Provides:       %{name}-kmod-common = %{version}
+Obsoletes:      spl
 
 # zfs-fuse provides the same commands and man pages that ZoL does. Renaming
 # those on either side would conflict with all available documentation.
@@ -396,8 +396,7 @@ systemctl --system daemon-reload >/dev/null || true
 %{_datadir}/pkgconfig/libzfs_core.pc
 %{_libdir}/*.so
 %{_includedir}/*
-%doc AUTHORS COPYRIGHT DISCLAIMER
-%doc OPENSOLARIS.LICENSE README.markdown
+%doc AUTHORS COPYRIGHT LICENSE NOTICE README.md
 
 %files test
 %{_datadir}/%{name}
index f43adba7625b8238b208e6cd0a91009f76d3d45e..28a64841800d43fcfed58519152777ef494526b8 100644 (file)
@@ -10,16 +10,15 @@ Group:          System Environment/Kernel
 License:        @ZFS_META_LICENSE@
 URL:            http://zfsonlinux.org/
 BuildRequires:  %kernel_module_package_buildreqs
-BuildRequires:  kmod-spl-devel = %{version}
 Source0:        @PACKAGE@-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 # Additional dependency information for the kmod sub-package must be specified
 # by generating a preamble text file which kmodtool can append to the spec file.
 %(/bin/echo -e "\
-Requires:       spl-kmod\n\
 Requires:       @PACKAGE@ = %{version}\n\
-Conflicts:      @PACKAGE@-dkms\n\n" > %{_sourcedir}/kmod-preamble)
+Conflicts:      @PACKAGE@-dkms\n\n" > %{_sourcedir}/kmod-preamble\n\
+Obsoletes:      spl-kmod)
 
 # LDFLAGS are not sanitized by arch/*/Makefile for these architectures.
 %ifarch ppc ppc64 ppc64le aarch64
@@ -35,17 +34,13 @@ This package contains the ZFS kernel modules.
 
 %define ksrc %{_usrsrc}/kernels/%{kverrel}
 %define kobj %{ksrc}
-%define splsrc %{_usrsrc}/spl-%{version}
-%define splobj %{splsrc}/%{kverrel}
 
 %package -n kmod-%{kmod_name}-devel
 Summary:        ZFS kernel module(s) devel common
 Group:          System Environment/Kernel
-Requires:       kmod-spl-devel = %{version}
 
 %description -n  kmod-%{kmod_name}-devel
-This package provides the header files and objects to build kernel modules
-which depend on the spl kernel module.
+This package provides the header files and objects to build kernel modules.
 
 %prep
 if ! [ -d "%{ksrc}"  ]; then
@@ -71,8 +66,6 @@ fi
         --with-config=kernel \
         --with-linux=%{ksrc} \
         --with-linux-obj=%{kobj} \
-        --with-spl="%{splsrc}" \
-        --with-spl-obj="%{splobj}" \
         %{debug} \
         %{debuginfo}
 make %{?_smp_mflags}
@@ -91,3 +84,4 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -n kmod-%{kmod_name}-devel
 %{_usrsrc}/%{kmod_name}-%{version}
+%{_usrsrc}/spl-%{version}
index 093cb1f90dfb07f147dcf2a0defabf66149ee32f..28d6185628b4cc5bbe04610ec4905e10faf6ed08 100644 (file)
@@ -40,8 +40,7 @@ export INSTALL_MOUNT_HELPER_DIR=@mounthelperdir@
 export INSTALL_SYSCONF_DIR=@sysconfdir@
 export INSTALL_PYTHON_DIR=@pythonsitedir@
 
-export KMOD_SPL=@SPL_OBJ@/module/spl/spl.ko
-export KMOD_SPLAT=@SPL_OBJ@/module/splat/splat.ko
+export KMOD_SPL=@abs_top_builddir@/module/spl/spl.ko
 export KMOD_ZAVL=@abs_top_builddir@/module/avl/zavl.ko
 export KMOD_ZNVPAIR=@abs_top_builddir@/module/nvpair/znvpair.ko
 export KMOD_ZUNICODE=@abs_top_builddir@/module/unicode/zunicode.ko
index fbbdc5cdb1b3756c2f5dd309e4af10aa8d6abbc5..c40d0e828d7476c96b416da44c01ce330a7a5ba7 100755 (executable)
@@ -42,9 +42,6 @@ PRE_BUILD="configure
     esac
   )
   --with-linux-obj=\${kernel_source_dir}
-  --with-spl=\${source_tree}/spl-\${PACKAGE_VERSION}
-  --with-spl-obj=\${dkms_tree}/spl/\${PACKAGE_VERSION}/\${kernelver}/\${arch}
-  --with-spl-timeout=300
   \$(
     [[ -n \"\${ICP_ROOT}\" ]] && \\
     {
@@ -71,7 +68,6 @@ POST_BUILD="scripts/dkms.postbuild
   -k \${kernelver}
   -t \${dkms_tree}
 "
-BUILD_DEPENDS[0]="spl"
 AUTOINSTALL="yes"
 REMAKE_INITRD="no"
 MAKE[0]="make"
@@ -88,6 +84,7 @@ STRIP[3]="\${STRIP[0]}"
 STRIP[4]="\${STRIP[0]}"
 STRIP[5]="\${STRIP[0]}"
 STRIP[6]="\${STRIP[0]}"
+STRIP[7]="\${STRIP[0]}"
 BUILT_MODULE_NAME[0]="zavl"
 BUILT_MODULE_LOCATION[0]="module/avl/"
 DEST_MODULE_LOCATION[0]="/extra/avl/avl"
@@ -109,4 +106,7 @@ DEST_MODULE_LOCATION[5]="/extra/icp/icp"
 BUILT_MODULE_NAME[6]="zlua"
 BUILT_MODULE_LOCATION[6]="module/lua/"
 DEST_MODULE_LOCATION[6]="/extra/lua/zlua"
+BUILT_MODULE_NAME[7]="spl"
+BUILT_MODULE_LOCATION[7]="module/spl/"
+DEST_MODULE_LOCATION[7]="/extra/spl/spl"
 EOF
index ce3f042947a5f14acc4ced6c3cfbda7881cb0155..27a14cdac23a8e1a381953c5a505485148df1b09 100755 (executable)
@@ -237,10 +237,16 @@ the ${kmodname}-devel-<kernel> objects for the newest kernel.
 %defattr(644,root,root,755)
 %{_usrsrc}/${kmodname}-%{version}
 EOF
+       if [[ ${obsolete_name} ]]; then
+               echo "%{_usrsrc}/${obsolete_name}-%{version}"
+       fi
 
        for kernel in ${1}; do
                local kernel_uname_r=${kernel}
                echo "%exclude %{_usrsrc}/${kmodname}-%{version}/${kernel_uname_r}"
+               if [[ ${obsolete_name} ]]; then
+                       echo "%exclude %{_usrsrc}/${obsolete_name}-%{version}/${kernel_uname_r}"
+               fi
        done
 
        echo
@@ -295,9 +301,10 @@ kernel ${kernel_uname_r} for the %{_target_cpu} family of processors.
 %files        -n kmod-${kmodname}-devel-${kernel_uname_r}
 %defattr(644,root,root,755)
 %{_usrsrc}/${kmodname}-%{version}/${kernel_uname_r}
-
-
 EOF
+       if [[ ${obsolete_name} ]]; then
+               echo "%{_usrsrc}/${obsolete_name}-%{version}/${kernel_uname_r}"
+       fi
 }
 
 print_rpmtemplate_kmodmetapkg ()
index 185eb5279a3e2b96cbd9a5e743155ac60cf58c6f..5ff181fb9e357b8de730cc45e3c40d557d591d18 100755 (executable)
@@ -21,7 +21,6 @@ LDMOD=${LDMOD:-/sbin/modprobe}
 KMOD_ZLIB_DEFLATE=${KMOD_ZLIB_DEFLATE:-zlib_deflate}
 KMOD_ZLIB_INFLATE=${KMOD_ZLIB_INFLATE:-zlib_inflate}
 KMOD_SPL=${KMOD_SPL:-spl}
-KMOD_SPLAT=${KMOD_SPLAT:-splat}
 KMOD_ZAVL=${KMOD_ZAVL:-zavl}
 KMOD_ZNVPAIR=${KMOD_ZNVPAIR:-znvpair}
 KMOD_ZUNICODE=${KMOD_ZUNICODE:-zunicode}
@@ -76,7 +75,7 @@ check_modules() {
        LOADED_MODULES=""
        MISSING_MODULES=""
 
-       for KMOD in $KMOD_SPL $KMOD_SPLAT $KMOD_ZAVL $KMOD_ZNVPAIR \
+       for KMOD in $KMOD_SPL $KMOD_ZAVL $KMOD_ZNVPAIR \
            $KMOD_ZUNICODE $KMOD_ZCOMMON $KMOD_ZLUA $KMOD_ICP $KMOD_ZFS; do
                NAME=$(basename "$KMOD" .ko)
 
@@ -135,7 +134,7 @@ load_modules() {
                modprobe "$KMOD_ZLIB_INFLATE" >/dev/null 2>&1
        fi
 
-       for KMOD in $KMOD_SPL $KMOD_SPLAT $KMOD_ZAVL $KMOD_ZNVPAIR \
+       for KMOD in $KMOD_SPL $KMOD_ZAVL $KMOD_ZNVPAIR \
            $KMOD_ZUNICODE $KMOD_ZCOMMON $KMOD_ZLUA $KMOD_ICP $KMOD_ZFS; do
                load_module "$KMOD" || return 1
        done
@@ -165,7 +164,7 @@ unload_module() {
 
 unload_modules() {
        for KMOD in $KMOD_ZFS $KMOD_ICP $KMOD_ZLUA $KMOD_ZCOMMON $KMOD_ZUNICODE \
-           $KMOD_ZNVPAIR  $KMOD_ZAVL $KMOD_SPLAT $KMOD_SPL; do
+           $KMOD_ZNVPAIR  $KMOD_ZAVL $KMOD_SPL; do
                NAME=$(basename "$KMOD" .ko)
                USE_COUNT=$(lsmod | grep -E "^${NAME} " | awk '{print $3}')
 
index 61c9aba4a6ef0a58e91965e5861856e23ed4f87a..426c329c9e1e32337b4332f8b34ce04225bbe17c 100755 (executable)
@@ -42,9 +42,7 @@
 # --------------------- ZFS on Linux Source Versions --------------
 #                 zfs-0.6.2       master          0.6.2-175_g36eb554
 # -----------------------------------------------------------------
-# Clone SPL       Local                Local           Skip
 # Clone ZFS       Local                Local           Skip
-# Build SPL       Pass         Pass            Skip
 # Build ZFS       Pass         Pass            Skip
 # -----------------------------------------------------------------
 # zevo-1.1.1      Pass         Pass            Pass
@@ -190,7 +188,6 @@ trap 'rm -Rf "$SRC_DIR"' INT TERM EXIT
 populate "$SRC_DIR" 10 100
 
 SRC_DIR="$TEST_DIR/src"
-SRC_DIR_SPL="$SRC_DIR/spl"
 SRC_DIR_ZFS="$SRC_DIR/zfs"
 
 if [ "$COLOR" = "no" ]; then
@@ -224,9 +221,6 @@ fail() {
 #
 # Set several helper variables which are derived from a source tag.
 #
-# SPL_TAG - The tag zfs-x.y.z is translated to spl-x.y.z.
-# SPL_DIR - The spl directory name.
-# SPL_URL - The spl github URL to fetch the tarball.
 # ZFS_TAG - The passed zfs-x.y.z tag
 # ZFS_DIR - The zfs directory name
 # ZFS_URL - The zfs github URL to fetch the tarball
@@ -234,10 +228,6 @@ fail() {
 src_set_vars() {
        local TAG=$1
 
-       SPL_TAG="${TAG//zfs/spl}"
-       SPL_DIR="$SRC_DIR_SPL/$SPL_TAG"
-       SPL_URL="$REPO/spl/tarball/$SPL_TAG"
-
        ZFS_TAG="$TAG"
        ZFS_DIR="$SRC_DIR_ZFS/$ZFS_TAG"
        ZFS_URL="$REPO/zfs/tarball/$ZFS_TAG"
@@ -393,43 +383,6 @@ for TAG in $SRC_TAGS; do
 done
 echo -e "\n-----------------------------------------------------------------"
 
-#
-# Attempt to generate the tarball from your local git repository, if that
-# fails then attempt to download the tarball from Github.
-#
-printf "%-16s" "Clone SPL"
-for TAG in $SRC_TAGS; do
-       src_set_vars "$TAG"
-
-       if [ -d "$SPL_DIR" ]; then
-               skip_nonewline
-       elif  [ "$SPL_TAG" = "installed" ]; then
-               skip_nonewline
-       else
-               cd "$SRC_DIR" || fail "Failed 'cd $SRC_DIR'"
-
-               if [ ! -d "$SRC_DIR_SPL" ]; then
-                       mkdir -p "$SRC_DIR_SPL"
-               fi
-
-               git archive --format=tar --prefix="$SPL_TAG/ $SPL_TAG" \
-                   -o "$SRC_DIR_SPL/$SPL_TAG.tar" &>/dev/null || \
-                   rm "$SRC_DIR_SPL/$SPL_TAG.tar"
-               if [ -s "$SRC_DIR_SPL/$SPL_TAG.tar" ]; then
-                       tar -xf "$SRC_DIR_SPL/$SPL_TAG.tar" -C "$SRC_DIR_SPL"
-                       rm "$SRC_DIR_SPL/$SPL_TAG.tar"
-                       echo -n -e "${COLOR_GREEN}Local${COLOR_RESET}\t\t"
-               else
-                       mkdir -p "$SPL_DIR" || fail "Failed to create $SPL_DIR"
-                       curl -sL "$SPL_URL" | tar -xz -C "$SPL_DIR" \
-                           --strip-components=1 || \
-                           fail "Failed to download $SPL_URL"
-                       echo -n -e "${COLOR_GREEN}Remote${COLOR_RESET}\t\t"
-               fi
-       fi
-done
-printf "\n"
-
 #
 # Attempt to generate the tarball from your local git repository, if that
 # fails then attempt to download the tarball from Github.
@@ -467,31 +420,6 @@ for TAG in $SRC_TAGS; do
 done
 printf "\n"
 
-# Build the listed tags
-printf "%-16s" "Build SPL"
-for TAG in $SRC_TAGS; do
-       src_set_vars "$TAG"
-
-       if [ -f "$SPL_DIR/module/spl/spl.ko" ]; then
-               skip_nonewline
-       elif  [ "$SPL_TAG" = "installed" ]; then
-               skip_nonewline
-       else
-               cd "$SPL_DIR" || fail "Failed 'cd $SPL_DIR'"
-               make distclean &>/dev/null
-               ./autogen.sh >>"$CONFIG_LOG" 2>&1 || \
-                   fail "Failed SPL 'autogen.sh'"
-               # shellcheck disable=SC2086
-               ./configure $CONFIG_OPTIONS >>"$CONFIG_LOG" 2>&1 || \
-                   fail "Failed SPL 'configure $CONFIG_OPTIONS'"
-               # shellcheck disable=SC2086
-               make $MAKE_OPTIONS >>"$MAKE_LOG" 2>&1 || \
-                   fail "Failed SPL 'make $MAKE_OPTIONS'"
-               pass_nonewline
-       fi
-done
-printf "\n"
-
 # Build the listed tags
 printf "%-16s" "Build ZFS"
 for TAG in $SRC_TAGS; do
@@ -507,8 +435,7 @@ for TAG in $SRC_TAGS; do
                ./autogen.sh >>"$CONFIG_LOG" 2>&1 || \
                    fail "Failed ZFS 'autogen.sh'"
                # shellcheck disable=SC2086
-               ./configure --with-spl="$SPL_DIR" $CONFIG_OPTIONS \
-                   >>"$CONFIG_LOG" 2>&1 || \
+               ./configure $CONFIG_OPTIONS >>"$CONFIG_LOG" 2>&1 || \
                    fail "Failed ZFS 'configure $CONFIG_OPTIONS'"
                # shellcheck disable=SC2086
                make $MAKE_OPTIONS >>"$MAKE_LOG" 2>&1 || \
index 1ea8e991e978ee5c00460ffb88071ae8cb8ad1e9..a2a924e5d89aaf1cd71d9330a14f362ee5038afe 100644 (file)
@@ -36,8 +36,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
+#include <sys/note.h>
 #include <sys/time.h>
-#define NOTE(x) 
+
 typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
 typedef        unsigned long long      u_longlong_t;