OpenZFS on Linux and FreeBSD
Go to file
Olaf Faaland cd2209b75e glibc 2.5 compat: use correct header for makedev() et al.
In glibc 2.5, makedev(), major(), and minor() are defined in
sys/sysmacros.h.  They are also defined in types.h for backward
compatability, but using these definitions triggers a compile warning.
This breaks the ZFS build, as it builds with -Werror.

autoconf email threads indicate these macros may be defined in
sys/mkdev.h in some cases.

This commit adds configure checks to detect where makedev() is defined:
  sys/sysmacros.h
  sys/mkdev.h

It assumes major() and minor() are defined in the same place.

The libspl types.h then includes
	sys/sysmacros.h (preferred) or
	sys/mkdev.h (2nd choice)
if one of those defines makedev().

This is done before including the system types.h.

An alternative would be to remove uses of major, minor, and makedev,
instead comparing the st_dev returned from stat64.  These configure
checks would then be unnecessary.

This change revealed that __NORETURN was being defined unnecessarily in
libspl/include/sys/sysmacros.h.  That definition is removed.

The files in which __NORETURN are used all include types.h, and so all
will get the definition provided by feature_tests.h

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #5945
2017-07-06 15:25:39 -07:00
cmd Add MS_MANDLOCK mount failure message 2017-06-09 14:05:15 -07:00
config glibc 2.5 compat: use correct header for makedev() et al. 2017-07-06 15:25:39 -07:00
contrib Init script fixes 2015-09-29 15:27:14 -07:00
etc Fix zfs-mount.service failure on boot 2017-06-09 14:05:15 -07:00
include Linux 4.12 compat: fix super_setup_bdi_name() call 2017-06-09 14:05:15 -07:00
lib glibc 2.5 compat: use correct header for makedev() et al. 2017-07-06 15:25:39 -07:00
man Add tunable to ignore hole_birth (enabled by default) 2016-09-09 13:20:54 -07:00
module OpenZFS 8005 - poor performance of 1MB writes on certain RAID-Z configurations 2017-06-09 14:05:15 -07:00
rpm Prepare to release 0.6.5.10 2017-06-12 15:31:33 -04:00
scripts Add support for asynchronous zvol minor operations 2016-03-22 18:08:04 -07:00
udev Support parallel build trees (VPATH builds) 2015-07-17 13:42:51 -07:00
.gitignore Ignore *.{deb,rpm,tar.gz} files in the top directory. 2013-04-24 16:18:59 -07:00
.gitmodules Add zimport.sh compatibility test script 2014-02-21 12:10:31 -08:00
AUTHORS Add a missing > to AUTHORS 2014-09-02 14:18:53 -07:00
COPYRIGHT Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
DISCLAIMER Fix minor typos and update marketing copy. 2013-03-21 12:51:06 -07:00
META Prepare to release 0.6.5.10 2017-06-12 15:31:33 -04:00
Makefile.am Add `make lint` target 2016-09-05 16:07:08 -07:00
OPENSOLARIS.LICENSE Add CDDL license file 2008-12-01 14:49:34 -08:00
README.markdown Fix minor typos and update marketing copy. 2013-03-21 12:51:06 -07:00
TEST Follow 0/-E convention for module load errors 2015-12-23 17:29:35 -08:00
autogen.sh build: do not call boilerplate ourself 2013-04-02 10:55:20 -07:00
configure.ac Move dracut directory to contrib 2015-07-09 13:59:37 -07:00
copy-builtin Fix --enable-linux-builtin 2015-12-23 17:29:34 -08:00
zfs-script-config.sh.in Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
zfs.release.in Move zfs.release generation to configure step 2012-07-12 12:22:51 -07:00

README.markdown

Native ZFS for Linux!

ZFS is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the Illumos community.

ZFS on Linux, which is also known as ZoL, is currently feature complete. It includes fully functional and stable SPA, DMU, ZVOL, and ZPL layers.

Full documentation for installing ZoL on your favorite Linux distribution can be found at: http://zfsonlinux.org