Merge tag 'upstream/0.6.4.1'

Upstream version 0.6.4.1
This commit is contained in:
Aron Xu 2015-05-17 05:41:13 +08:00
commit af6b2c9d73
147 changed files with 14027 additions and 21726 deletions

4
META
View File

@ -1,6 +1,8 @@
Meta: 1 Meta: 1
Name: spl Name: spl
Branch: 1.0 Branch: 1.0
Version: 0.6.2 Version: 0.6.4.1
Release: 1 Release: 1
Release-Tags: relext Release-Tags: relext
License: GPL
Author: OpenZFS on Linux

View File

@ -12,10 +12,10 @@ endif
if CONFIG_KERNEL if CONFIG_KERNEL
SUBDIRS += module SUBDIRS += module
extradir = /usr/src/spl-$(VERSION) extradir = @prefix@/src/spl-$(VERSION)
extra_HEADERS = spl.release.in spl_config.h.in extra_HEADERS = spl.release.in spl_config.h.in
kerneldir = /usr/src/spl-$(VERSION)/$(LINUX_VERSION) kerneldir = @prefix@/src/spl-$(VERSION)/$(LINUX_VERSION)
nodist_kernel_HEADERS = spl.release spl_config.h module/$(LINUX_SYMBOLS) nodist_kernel_HEADERS = spl.release spl_config.h module/$(LINUX_SYMBOLS)
endif endif

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -101,11 +101,11 @@ CONFIG_HEADER = spl_config.h
CONFIG_CLEAN_FILES = module/Makefile module/spl/Makefile \ CONFIG_CLEAN_FILES = module/Makefile module/spl/Makefile \
module/splat/Makefile spl.release module/splat/Makefile spl.release
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
@ -138,6 +138,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(extradir)" "$(DESTDIR)$(kerneldir)" am__installdirs = "$(DESTDIR)$(extradir)" "$(DESTDIR)$(kerneldir)"
HEADERS = $(extra_HEADERS) $(nodist_kernel_HEADERS) HEADERS = $(extra_HEADERS) $(nodist_kernel_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
@ -152,9 +158,11 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION) distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir) top_distdir = $(distdir)
am__remove_distdir = \ am__remove_distdir = \
{ test ! -d "$(distdir)" \ if test -d "$(distdir)"; then \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; } && rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__relativize = \ am__relativize = \
dir0=`pwd`; \ dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@ -183,6 +191,8 @@ am__relativize = \
DIST_ARCHIVES = $(distdir).tar.gz DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
ALIEN = @ALIEN@ ALIEN = @ALIEN@
@ -203,11 +213,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -238,7 +248,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -248,6 +257,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -281,6 +291,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -298,6 +309,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -330,7 +342,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -352,9 +363,9 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I config ACLOCAL_AMFLAGS = -I config
SUBDIRS = include rpm $(am__append_1) $(am__append_2) SUBDIRS = include rpm $(am__append_1) $(am__append_2)
@CONFIG_KERNEL_TRUE@extradir = /usr/src/spl-$(VERSION) @CONFIG_KERNEL_TRUE@extradir = @prefix@/src/spl-$(VERSION)
@CONFIG_KERNEL_TRUE@extra_HEADERS = spl.release.in spl_config.h.in @CONFIG_KERNEL_TRUE@extra_HEADERS = spl.release.in spl_config.h.in
@CONFIG_KERNEL_TRUE@kerneldir = /usr/src/spl-$(VERSION)/$(LINUX_VERSION) @CONFIG_KERNEL_TRUE@kerneldir = @prefix@/src/spl-$(VERSION)/$(LINUX_VERSION)
@CONFIG_KERNEL_TRUE@nodist_kernel_HEADERS = spl.release spl_config.h module/$(LINUX_SYMBOLS) @CONFIG_KERNEL_TRUE@nodist_kernel_HEADERS = spl.release spl_config.h module/$(LINUX_SYMBOLS)
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = autogen.sh META DISCLAIMER copy-builtin config/config.awk \ EXTRA_DIST = autogen.sh META DISCLAIMER copy-builtin config/config.awk \
@ -363,7 +374,7 @@ all: spl_config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive $(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES: .SUFFIXES:
am--refresh: am--refresh: Makefile
@: @:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/rpm.am $(top_srcdir)/config/deb.am $(top_srcdir)/config/tgz.am $(am__configure_deps) $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/rpm.am $(top_srcdir)/config/deb.am $(top_srcdir)/config/tgz.am $(am__configure_deps)
@for dep in $?; do \ @for dep in $?; do \
@ -388,6 +399,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac; esac;
$(top_srcdir)/config/rpm.am $(top_srcdir)/config/deb.am $(top_srcdir)/config/tgz.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck $(SHELL) ./config.status --recheck
@ -399,10 +411,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps): $(am__aclocal_m4_deps):
spl_config.h: stamp-h1 spl_config.h: stamp-h1
@if test ! -f $@; then \ @if test ! -f $@; then rm -f stamp-h1; else :; fi
rm -f stamp-h1; \ @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/spl_config.h.in $(top_builddir)/config.status stamp-h1: $(srcdir)/spl_config.h.in $(top_builddir)/config.status
@rm -f stamp-h1 @rm -f stamp-h1
@ -448,9 +458,7 @@ uninstall-extraHEADERS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(extra_HEADERS)'; test -n "$(extradir)" || list=; \ @list='$(extra_HEADERS)'; test -n "$(extradir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \ dir='$(DESTDIR)$(extradir)'; $(am__uninstall_files_from_dir)
echo " ( cd '$(DESTDIR)$(extradir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(extradir)" && rm -f $$files
install-nodist_kernelHEADERS: $(nodist_kernel_HEADERS) install-nodist_kernelHEADERS: $(nodist_kernel_HEADERS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(kerneldir)" || $(MKDIR_P) "$(DESTDIR)$(kerneldir)" test -z "$(kerneldir)" || $(MKDIR_P) "$(DESTDIR)$(kerneldir)"
@ -468,9 +476,7 @@ uninstall-nodist_kernelHEADERS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(nodist_kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \ @list='$(nodist_kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \ dir='$(DESTDIR)$(kerneldir)'; $(am__uninstall_files_from_dir)
echo " ( cd '$(DESTDIR)$(kerneldir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(kerneldir)" && rm -f $$files
# This directory's subdirectories are mostly independent; you can cd # This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile. # into them and run `make' without going through this Makefile.
@ -680,7 +686,11 @@ dist-gzip: distdir
$(am__remove_distdir) $(am__remove_distdir)
dist-bzip2: distdir dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__remove_distdir) $(am__remove_distdir)
dist-lzma: distdir dist-lzma: distdir
@ -688,7 +698,7 @@ dist-lzma: distdir
$(am__remove_distdir) $(am__remove_distdir)
dist-xz: distdir dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__remove_distdir) $(am__remove_distdir)
dist-tarZ: distdir dist-tarZ: distdir
@ -719,6 +729,8 @@ distcheck: dist
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \ *.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \ *.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \ *.tar.Z*) \
@ -738,6 +750,7 @@ distcheck: dist
&& am__cwd=`pwd` \ && am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \ && $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) dvi \
@ -766,8 +779,16 @@ distcheck: dist
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck: distuninstallcheck:
@$(am__cd) '$(distuninstallcheck_dir)' \ @test -n '$(distuninstallcheck_dir)' || { \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \ || { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \ if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \ echo " (check DESTDIR support)"; \
@ -801,10 +822,15 @@ install-am: all-am
installcheck: installcheck-recursive installcheck: installcheck-recursive
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
@ -892,9 +918,9 @@ uninstall-am: uninstall-extraHEADERS uninstall-nodist_kernelHEADERS
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \ all all-am am--refresh check check-am clean clean-generic \
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \ dist-gzip dist-hook dist-lzip dist-lzma dist-shar dist-tarZ \
dist-zip distcheck distclean distclean-generic distclean-hdr \ dist-xz dist-zip distcheck distclean distclean-generic \
distclean-libtool distclean-local distclean-tags \ distclean-hdr distclean-libtool distclean-local distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \ distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \ html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \ install-data-am install-dvi install-dvi-am install-exec \
@ -966,7 +992,7 @@ srpm-common: dist
rpmbuild="$$rpmbuild" \ rpmbuild="$$rpmbuild" \
rpmspec="$$rpmspec" \ rpmspec="$$rpmspec" \
rpm-local || exit 1; \ rpm-local || exit 1; \
$(RPMBUILD) \ LANG=C $(RPMBUILD) \
--define "_tmppath $$rpmbuild/TMP" \ --define "_tmppath $$rpmbuild/TMP" \
--define "_topdir $$rpmbuild" \ --define "_topdir $$rpmbuild" \
$(def) -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \ $(def) -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \
@ -982,7 +1008,7 @@ rpm-common:
rpmbuild="$$rpmbuild" \ rpmbuild="$$rpmbuild" \
rpmspec="$$rpmspec" \ rpmspec="$$rpmspec" \
rpm-local || exit 1; \ rpm-local || exit 1; \
${RPMBUILD} \ LANG=C ${RPMBUILD} \
--define "_tmppath $$rpmbuild/TMP" \ --define "_tmppath $$rpmbuild/TMP" \
--define "_topdir $$rpmbuild" \ --define "_topdir $$rpmbuild" \
$(def) --rebuild $$rpmpkg || exit 1; \ $(def) --rebuild $$rpmpkg || exit 1; \

112
aclocal.m4 vendored
View File

@ -1,7 +1,8 @@
# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # generated automatically by aclocal 1.11.3 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
# Inc.
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -13,18 +14,21 @@
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
[m4_warning([this file was generated for autoconf 2.67. [m4_warning([this file was generated for autoconf 2.68.
You have another version of autoconf. It may work, but is not guaranteed to. You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])]) To do so, use the procedure documented by the package, typically `autoreconf'.])])
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
# Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
# serial 1
# AM_AUTOMAKE_VERSION(VERSION) # AM_AUTOMAKE_VERSION(VERSION)
# ---------------------------- # ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been # Automake X.Y traces this macro to ensure aclocal.m4 has been
@ -34,7 +38,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11' [am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro. dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.11.1], [], m4_if([$1], [1.11.3], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
]) ])
@ -50,19 +54,21 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.11.1])dnl [AM_AUTOMAKE_VERSION([1.11.3])dnl
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*- # AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
# serial 1
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
@ -144,14 +150,14 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]]) Usually this means the macro was only invoked conditionally.]])
fi])]) fi])])
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
# Free Software Foundation, Inc. # 2010, 2011 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
# serial 10 # serial 12
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4, # written in clear, in which case automake, when reading aclocal.m4,
@ -191,6 +197,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
# instance it was reported that on HP-UX the gcc test will end up # instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output # making a dummy file named `D' -- because `-MD' means `put the output
# in D'. # in D'.
rm -rf conftest.dir
mkdir conftest.dir mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're # Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory. # using a relative directory.
@ -255,7 +262,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
break break
fi fi
;; ;;
msvisualcpp | msvcmsys) msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has # This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and # not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted. # so weak that their functioning should not be impacted.
@ -320,10 +327,13 @@ AC_DEFUN([AM_DEP_TRACK],
if test "x$enable_dependency_tracking" != xno; then if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp" am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\' AMDEPBACKSLASH='\'
am__nodep='_no'
fi fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
AC_SUBST([am__nodep])dnl
_AM_SUBST_NOTMAKE([am__nodep])dnl
]) ])
# Generate code to set up dependency tracking. -*- Autoconf -*- # Generate code to set up dependency tracking. -*- Autoconf -*-
@ -545,12 +555,15 @@ for _am_header in $config_headers :; do
done done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
# Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
# serial 1
# AM_PROG_INSTALL_SH # AM_PROG_INSTALL_SH
# ------------------ # ------------------
# Define $install_sh. # Define $install_sh.
@ -590,8 +603,8 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering # From Jim Meyering
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
# Free Software Foundation, Inc. # 2011 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -611,7 +624,7 @@ AC_DEFUN([AM_MAINTAINER_MODE],
[disable], [m4_define([am_maintainer_other], [enable])], [disable], [m4_define([am_maintainer_other], [enable])],
[m4_define([am_maintainer_other], [enable]) [m4_define([am_maintainer_other], [enable])
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode], AC_ARG_ENABLE([maintainer-mode],
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
@ -722,12 +735,15 @@ else
fi fi
]) ])
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
# Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
# serial 1
# AM_PROG_MKDIR_P # AM_PROG_MKDIR_P
# --------------- # ---------------
# Check for `mkdir -p'. # Check for `mkdir -p'.
@ -750,13 +766,14 @@ esac
# Helper functions for option handling. -*- Autoconf -*- # Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
# Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
# serial 4 # serial 5
# _AM_MANGLE_OPTION(NAME) # _AM_MANGLE_OPTION(NAME)
# ----------------------- # -----------------------
@ -764,13 +781,13 @@ AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME) # _AM_SET_OPTION(NAME)
# ------------------------------ # --------------------
# Set option NAME. Presently that only means defining a flag for this option. # Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION], AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS) # _AM_SET_OPTIONS(OPTIONS)
# ---------------------------------- # ------------------------
# OPTIONS is a space-separated list of Automake options. # OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_SET_OPTIONS],
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
@ -846,13 +863,13 @@ Check your system clock])
fi fi
AC_MSG_RESULT(yes)]) AC_MSG_RESULT(yes)])
# Copyright (C) 2009 Free Software Foundation, Inc. # Copyright (C) 2009, 2011 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
# serial 1 # serial 2
# AM_SILENT_RULES([DEFAULT]) # AM_SILENT_RULES([DEFAULT])
# -------------------------- # --------------------------
@ -867,18 +884,50 @@ yes) AM_DEFAULT_VERBOSITY=0;;
no) AM_DEFAULT_VERBOSITY=1;; no) AM_DEFAULT_VERBOSITY=1;;
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
esac esac
dnl
dnl A few `make' implementations (e.g., NonStop OS and NextStep)
dnl do not support nested variable expansions.
dnl See automake bug#9928 and bug#10237.
am_make=${MAKE-make}
AC_CACHE_CHECK([whether $am_make supports nested variables],
[am_cv_make_support_nested_variables],
[if AS_ECHO([['TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
am__doit:
@$(TRUE)
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
am_cv_make_support_nested_variables=yes
else
am_cv_make_support_nested_variables=no
fi])
if test $am_cv_make_support_nested_variables = yes; then
dnl Using `$V' instead of `$(V)' breaks IRIX make.
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
AM_V=$AM_DEFAULT_VERBOSITY
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
fi
AC_SUBST([AM_V])dnl
AM_SUBST_NOTMAKE([AM_V])dnl
AC_SUBST([AM_DEFAULT_V])dnl
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
AM_BACKSLASH='\' AM_BACKSLASH='\'
AC_SUBST([AM_BACKSLASH])dnl AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
]) ])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
# serial 1
# AM_PROG_INSTALL_STRIP # AM_PROG_INSTALL_STRIP
# --------------------- # ---------------------
# One issue with vendor `install' (even GNU) is that you can't # One issue with vendor `install' (even GNU) is that you can't
@ -901,13 +950,13 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006, 2008 Free Software Foundation, Inc. # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
# serial 2 # serial 3
# _AM_SUBST_NOTMAKE(VARIABLE) # _AM_SUBST_NOTMAKE(VARIABLE)
# --------------------------- # ---------------------------
@ -916,13 +965,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
AC_DEFUN([_AM_SUBST_NOTMAKE]) AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE) # AM_SUBST_NOTMAKE(VARIABLE)
# --------------------------- # --------------------------
# Public sister of _AM_SUBST_NOTMAKE. # Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*- # Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005 Free Software Foundation, Inc. # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -944,10 +993,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# a tarball read from stdin. # a tarball read from stdin.
# $(am__untar) < result.tar # $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR], AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility. [# Always define AMTAR for backward compatibility. Yes, it's still used
AM_MISSING_PROG([AMTAR], [tar]) # in the wild :-( We should find a proper way to deprecate it ...
AC_SUBST([AMTAR], ['$${TAR-tar}'])
m4_if([$1], [v7], m4_if([$1], [v7],
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1], [ustar],, [pax],, [m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])]) [m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive]) AC_MSG_CHECKING([how to create a $1 tar archive])

View File

@ -3,11 +3,8 @@ include $(top_srcdir)/config/Rules.am
DEFAULT_INCLUDES += \ DEFAULT_INCLUDES += \
-I$(top_srcdir)/lib -I$(top_srcdir)/lib
noinst_PROGRAMS = spl
sbin_PROGRAMS = splat sbin_PROGRAMS = splat
spl_SOURCES = spl.c
splat_SOURCES = splat.c splat_SOURCES = splat.c
splat_LDFLAGS = $(top_builddir)/lib/libcommon.la splat_LDFLAGS = $(top_builddir)/lib/libcommon.la

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -45,7 +45,6 @@ host_triplet = @host@
target_triplet = @target@ target_triplet = @target@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/config/Rules.am $(top_srcdir)/config/Rules.am
noinst_PROGRAMS = spl$(EXEEXT)
sbin_PROGRAMS = splat$(EXEEXT) sbin_PROGRAMS = splat$(EXEEXT)
subdir = cmd subdir = cmd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@ -63,16 +62,13 @@ CONFIG_HEADER = $(top_builddir)/spl_config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(sbindir)" am__installdirs = "$(DESTDIR)$(sbindir)"
PROGRAMS = $(noinst_PROGRAMS) $(sbin_PROGRAMS) PROGRAMS = $(sbin_PROGRAMS)
am_spl_OBJECTS = spl.$(OBJEXT)
spl_OBJECTS = $(am_spl_OBJECTS)
spl_LDADD = $(LDADD)
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
am_splat_OBJECTS = splat.$(OBJEXT) am_splat_OBJECTS = splat.$(OBJEXT)
splat_OBJECTS = $(am_splat_OBJECTS) splat_OBJECTS = $(am_splat_OBJECTS)
splat_LDADD = $(LDADD) splat_LDADD = $(LDADD)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
splat_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ splat_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(splat_LDFLAGS) $(LDFLAGS) -o $@ $(splat_LDFLAGS) $(LDFLAGS) -o $@
@ -85,24 +81,24 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS) $(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_$(V)) AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@; am__v_CC_0 = @echo " CC " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
CCLD = $(CC) CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@ $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_$(V)) AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(spl_SOURCES) $(splat_SOURCES) SOURCES = $(splat_SOURCES)
DIST_SOURCES = $(spl_SOURCES) $(splat_SOURCES) DIST_SOURCES = $(splat_SOURCES)
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@ -125,11 +121,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -160,7 +156,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -170,6 +165,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -203,6 +199,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -220,6 +217,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -252,7 +250,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -278,7 +275,6 @@ AM_LIBTOOLFLAGS = --silent
AM_CPPFLAGS = -D__USE_LARGEFILE64 AM_CPPFLAGS = -D__USE_LARGEFILE64
AM_CFLAGS = -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing \ AM_CFLAGS = -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing \
${DEBUG_CFLAGS} ${DEBUG_CFLAGS}
spl_SOURCES = spl.c
splat_SOURCES = splat.c splat_SOURCES = splat.c
splat_LDFLAGS = $(top_builddir)/lib/libcommon.la splat_LDFLAGS = $(top_builddir)/lib/libcommon.la
EXTRA_DIST = splat.h EXTRA_DIST = splat.h
@ -307,6 +303,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac; esac;
$(top_srcdir)/config/Rules.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@ -316,15 +313,6 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps): $(am__aclocal_m4_deps):
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS) install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@ -368,10 +356,7 @@ clean-sbinPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \ echo " rm -f" $$list; \
rm -f $$list rm -f $$list
spl$(EXEEXT): $(spl_OBJECTS) $(spl_DEPENDENCIES) splat$(EXEEXT): $(splat_OBJECTS) $(splat_DEPENDENCIES) $(EXTRA_splat_DEPENDENCIES)
@rm -f spl$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(spl_OBJECTS) $(spl_LDADD) $(LIBS)
splat$(EXEEXT): $(splat_OBJECTS) $(splat_DEPENDENCIES)
@rm -f splat$(EXEEXT) @rm -f splat$(EXEEXT)
$(AM_V_CCLD)$(splat_LINK) $(splat_OBJECTS) $(splat_LDADD) $(LIBS) $(AM_V_CCLD)$(splat_LINK) $(splat_OBJECTS) $(splat_LDADD) $(LIBS)
@ -381,32 +366,28 @@ mostlyclean-compile:
distclean-compile: distclean-compile:
-rm -f *.tab.c -rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splat.Po@am__quote@
.c.o: .c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $< @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
.c.obj: .c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo: .c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool: mostlyclean-libtool:
-rm -f *.lo -rm -f *.lo
@ -513,10 +494,15 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
@ -530,8 +516,8 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
clean: clean-am clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
clean-sbinPROGRAMS mostlyclean-am mostlyclean-am
distclean: distclean-am distclean: distclean-am
-rm -rf ./$(DEPDIR) -rm -rf ./$(DEPDIR)
@ -602,15 +588,15 @@ uninstall-am: uninstall-sbinPROGRAMS
.MAKE: install-am install-strip .MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS clean-sbinPROGRAMS ctags \ clean-libtool clean-sbinPROGRAMS ctags distclean \
distclean distclean-compile distclean-generic \ distclean-compile distclean-generic distclean-libtool \
distclean-libtool distclean-tags distdir dvi dvi-am html \ distclean-tags distdir dvi dvi-am html html-am info info-am \
html-am info info-am install install-am install-data \ install install-am install-data install-data-am install-dvi \
install-data-am install-dvi install-dvi-am install-exec \ install-dvi-am install-exec install-exec-am install-html \
install-exec-am install-html install-html-am install-info \ install-html-am install-info install-info-am install-man \
install-info-am install-man install-pdf install-pdf-am \ install-pdf install-pdf-am install-ps install-ps-am \
install-ps install-ps-am install-sbinPROGRAMS install-strip \ install-sbinPROGRAMS install-strip installcheck \
installcheck installcheck-am installdirs maintainer-clean \ installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \ maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-sbinPROGRAMS tags uninstall uninstall-am uninstall-sbinPROGRAMS

243
cmd/spl.c
View File

@ -1,243 +0,0 @@
/*****************************************************************************\
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************
* Solaris Porting Layer (SPL) User Space Interface.
\*****************************************************************************/
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>
#include "../include/spl-ctl.h"
static int spl_debug_mask = ~0;
static int spl_debug_subsystem = ~0;
/* all strings nul-terminated; only the struct and hdr need to be freed */
struct dbg_line {
struct spl_debug_header *hdr;
char *file;
char *fn;
char *text;
};
static int
cmp_rec(const void *p1, const void *p2)
{
struct dbg_line *d1 = *(struct dbg_line **)p1;
struct dbg_line *d2 = *(struct dbg_line **)p2;
if (d1->hdr->ph_sec < d2->hdr->ph_sec)
return -1;
if (d1->hdr->ph_sec == d2->hdr->ph_sec &&
d1->hdr->ph_usec < d2->hdr->ph_usec)
return -1;
if (d1->hdr->ph_sec == d2->hdr->ph_sec &&
d1->hdr->ph_usec == d2->hdr->ph_usec)
return 0;
return 1;
}
static void
print_rec(struct dbg_line **linev, int used, FILE *out)
{
int i;
for (i = 0; i < used; i++) {
struct dbg_line *line = linev[i];
struct spl_debug_header *hdr = line->hdr;
fprintf(out, "%08x:%08x:%u:%u.%06llu:%u:%u:%u:(%s:%u:%s()) %s",
hdr->ph_subsys, hdr->ph_mask, hdr->ph_cpu_id,
hdr->ph_sec, (unsigned long long)hdr->ph_usec,
hdr->ph_stack, hdr->ph_pid, hdr->ph_stack, line->file,
hdr->ph_line_num, line->fn, line->text);
free(line->hdr);
free(line);
}
free(linev);
}
static int
add_rec(struct dbg_line *line, struct dbg_line ***linevp, int *lenp, int used)
{
struct dbg_line **linev = *linevp;
if (used == *lenp) {
int nlen = *lenp + 512;
int nsize = nlen * sizeof(struct dbg_line *);
linev = *linevp ? realloc(*linevp, nsize) : malloc(nsize);
if (!linev)
return 0;
*linevp = linev;
*lenp = nlen;
}
linev[used] = line;
return 1;
}
static int
parse_buffer(FILE *in, FILE *out)
{
struct dbg_line *line;
struct spl_debug_header *hdr;
char buf[4097], *p;
unsigned long dropped = 0, kept = 0;
struct dbg_line **linev = NULL;
const int phl = sizeof(hdr->ph_len);
const int phf = sizeof(hdr->ph_flags);
int rc, linev_len = 0;
while (1) {
rc = fread(buf, phl + phf, 1, in);
if (rc <= 0)
break;
hdr = (void *)buf;
if (hdr->ph_len == 0)
break;
if (hdr->ph_len > 4094) {
fprintf(stderr, "unexpected large record: %d bytes. "
"aborting.\n", hdr->ph_len);
break;
}
rc = fread(buf + phl + phf, 1, hdr->ph_len - phl - phf, in);
if (rc <= 0)
break;
if (hdr->ph_mask &&
(!(spl_debug_subsystem & hdr->ph_subsys) ||
(!(spl_debug_mask & hdr->ph_mask)))) {
dropped++;
continue;
}
line = malloc(sizeof(*line));
if (line == NULL) {
fprintf(stderr, "malloc failed; printing accumulated "
"records and exiting.\n");
break;
}
line->hdr = malloc(hdr->ph_len + 1);
if (line->hdr == NULL) {
free(line);
fprintf(stderr, "malloc failed; printing accumulated "
"records and exiting.\n");
break;
}
p = (void *)line->hdr;
memcpy(line->hdr, buf, hdr->ph_len);
p[hdr->ph_len] = '\0';
p += sizeof(*hdr);
line->file = p;
p += strlen(line->file) + 1;
line->fn = p;
p += strlen(line->fn) + 1;
line->text = p;
if (!add_rec(line, &linev, &linev_len, kept)) {
fprintf(stderr, "malloc failed; printing accumulated "
"records and exiting.\n");
break;
}
kept++;
}
if (linev) {
qsort(linev, kept, sizeof(struct dbg_line *), cmp_rec);
print_rec(linev, kept, out);
}
printf("Debug log: %lu lines, %lu kept, %lu dropped.\n",
dropped + kept, kept, dropped);
return 0;
}
int
main(int argc, char *argv[])
{
int fdin, fdout;
FILE *in, *out = stdout;
int rc, o_lf = 0;
if (argc > 3 || argc < 2) {
fprintf(stderr, "usage: %s <input> [output]\n", argv[0]);
return 0;
}
#ifdef __USE_LARGEFILE64
o_lf = O_LARGEFILE;
#endif
fdin = open(argv[1], O_RDONLY | o_lf);
if (fdin == -1) {
fprintf(stderr, "open(%s) failed: %s\n", argv[1],
strerror(errno));
return 1;
}
in = fdopen(fdin, "r");
if (in == NULL) {
fprintf(stderr, "fopen(%s) failed: %s\n", argv[1],
strerror(errno));
close(fdin);
return 1;
}
if (argc > 2) {
fdout = open(argv[2], O_CREAT | O_TRUNC | O_WRONLY | o_lf, 0600);
if (fdout == -1) {
fprintf(stderr, "open(%s) failed: %s\n", argv[2],
strerror(errno));
fclose(in);
return 1;
}
out = fdopen(fdout, "w");
if (out == NULL) {
fprintf(stderr, "fopen(%s) failed: %s\n", argv[2],
strerror(errno));
fclose(in);
close(fdout);
return 1;
}
}
rc = parse_buffer(in, out);
fclose(in);
if (out != stdout)
fclose(out);
return rc;
}

258
config/config.guess vendored
View File

@ -1,10 +1,10 @@
#! /bin/sh #! /bin/sh
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# Free Software Foundation, Inc. # 2011, 2012 Free Software Foundation, Inc.
timestamp='2009-12-30' timestamp='2012-02-10'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -17,9 +17,7 @@ timestamp='2009-12-30'
# General Public License for more details. # General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
# #
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
@ -57,8 +55,8 @@ GNU config.guess ($timestamp)
Originally written by Per Bothner. Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Software Foundation, Inc. Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -145,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*) *:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or # NetBSD (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old # switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward # object file format. This provides both forward
@ -181,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
fi fi
;; ;;
*) *)
os=netbsd os=netbsd
;; ;;
esac esac
# The OS release # The OS release
@ -224,7 +222,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;; ;;
*5.*) *5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;; ;;
esac esac
# According to Compaq, /usr/sbin/psrinfo has been available on # According to Compaq, /usr/sbin/psrinfo has been available on
@ -270,7 +268,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Xn.n version is an unreleased experimental baselevel. # A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r. # 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit ;; # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
Alpha\ *:Windows_NT*:*) Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem? # How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead # Should we change UNAME_MACHINE based on the output of uname instead
@ -296,7 +297,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo s390-ibm-zvmoe echo s390-ibm-zvmoe
exit ;; exit ;;
*:OS400:*:*) *:OS400:*:*)
echo powerpc-ibm-os400 echo powerpc-ibm-os400
exit ;; exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE} echo arm-acorn-riscix${UNAME_RELEASE}
@ -395,23 +396,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should # MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem. # be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE} echo m68k-atari-mint${UNAME_RELEASE}
exit ;; exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE} echo m68k-atari-mint${UNAME_RELEASE}
exit ;; exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE} echo m68k-atari-mint${UNAME_RELEASE}
exit ;; exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE} echo m68k-milan-mint${UNAME_RELEASE}
exit ;; exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE} echo m68k-hades-mint${UNAME_RELEASE}
exit ;; exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE} echo m68k-unknown-mint${UNAME_RELEASE}
exit ;; exit ;;
m68k:machten:*:*) m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE} echo m68k-apple-machten${UNAME_RELEASE}
exit ;; exit ;;
@ -481,8 +482,8 @@ EOF
echo m88k-motorola-sysv3 echo m88k-motorola-sysv3
exit ;; exit ;;
AViiON:dgux:*:*) AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures # DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p` UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@ -495,7 +496,7 @@ EOF
else else
echo i586-dg-dgux${UNAME_RELEASE} echo i586-dg-dgux${UNAME_RELEASE}
fi fi
exit ;; exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3) M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3 echo m88k-dolphin-sysv3
exit ;; exit ;;
@ -552,7 +553,7 @@ EOF
echo rs6000-ibm-aix3.2 echo rs6000-ibm-aix3.2
fi fi
exit ;; exit ;;
*:AIX:*:[456]) *:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000 IBM_ARCH=rs6000
@ -595,52 +596,52 @@ EOF
9000/[678][0-9][0-9]) 9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0 532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;; 32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;; 64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;; esac ;;
esac esac
fi fi
if [ "${HP_ARCH}" = "" ]; then if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE #define _HPUX_SOURCE
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
int main () int main ()
{ {
#if defined(_SC_KERNEL_BITS) #if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS); long bits = sysconf(_SC_KERNEL_BITS);
#endif #endif
long cpu = sysconf (_SC_CPU_VERSION); long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu) switch (cpu)
{ {
case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0: case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS) #if defined(_SC_KERNEL_BITS)
switch (bits) switch (bits)
{ {
case 64: puts ("hppa2.0w"); break; case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break; case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break; default: puts ("hppa2.0"); break;
} break; } break;
#else /* !defined(_SC_KERNEL_BITS) */ #else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break; puts ("hppa2.0"); break;
#endif #endif
default: puts ("hppa1.0"); break; default: puts ("hppa1.0"); break;
} }
exit (0); exit (0);
} }
EOF EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa test -z "$HP_ARCH" && HP_ARCH=hppa
@ -731,22 +732,22 @@ EOF
exit ;; exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd echo c1-convex-bsd
exit ;; exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc if getsysinfo -f scalar_acc
then echo c32-convex-bsd then echo c32-convex-bsd
else echo c2-convex-bsd else echo c2-convex-bsd
fi fi
exit ;; exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd echo c34-convex-bsd
exit ;; exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd echo c38-convex-bsd
exit ;; exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd echo c4-convex-bsd
exit ;; exit ;;
CRAY*Y-MP:*:*:*) CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;; exit ;;
@ -770,14 +771,14 @@ EOF
exit ;; exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;; exit ;;
5000:UNIX_System_V:4.*:*) 5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;; exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@ -789,13 +790,12 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;; exit ;;
*:FreeBSD:*:*) *:FreeBSD:*:*)
case ${UNAME_MACHINE} in UNAME_PROCESSOR=`/usr/bin/uname -p`
pc98) case ${UNAME_PROCESSOR} in
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
amd64) amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*) *)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac esac
exit ;; exit ;;
i*:CYGWIN*:*) i*:CYGWIN*:*)
@ -804,15 +804,18 @@ EOF
*:MINGW*:*) *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32 echo ${UNAME_MACHINE}-pc-mingw32
exit ;; exit ;;
i*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*) i*:windows32*:*)
# uname -m includes "-pc" on this system. # uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32 echo ${UNAME_MACHINE}-mingw32
exit ;; exit ;;
i*:PW*:*) i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32 echo ${UNAME_MACHINE}-pc-pw32
exit ;; exit ;;
*:Interix*:*) *:Interix*:*)
case ${UNAME_MACHINE} in case ${UNAME_MACHINE} in
x86) x86)
echo i586-pc-interix${UNAME_RELEASE} echo i586-pc-interix${UNAME_RELEASE}
exit ;; exit ;;
@ -858,6 +861,13 @@ EOF
i*86:Minix:*:*) i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix echo ${UNAME_MACHINE}-pc-minix
exit ;; exit ;;
aarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
alpha:Linux:*:*) alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;; EV5) UNAME_MACHINE=alphaev5 ;;
@ -867,7 +877,7 @@ EOF
EV6) UNAME_MACHINE=alphaev6 ;; EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;; EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;; EV68*) UNAME_MACHINE=alphaev68 ;;
esac esac
objdump --private-headers /bin/sh | grep -q ld.so.1 objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
@ -879,20 +889,29 @@ EOF
then then
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
else else
echo ${UNAME_MACHINE}-unknown-linux-gnueabi if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
fi
fi fi
exit ;; exit ;;
avr32*:Linux:*:*) avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
cris:Linux:*:*) cris:Linux:*:*)
echo cris-axis-linux-gnu echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;; exit ;;
crisv32:Linux:*:*) crisv32:Linux:*:*)
echo crisv32-axis-linux-gnu echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;; exit ;;
frv:Linux:*:*) frv:Linux:*:*)
echo frv-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
hexagon:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
i*86:Linux:*:*) i*86:Linux:*:*)
LIBC=gnu LIBC=gnu
@ -934,7 +953,7 @@ EOF
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;; ;;
or32:Linux:*:*) or32:Linux:*:*)
echo or32-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
padre:Linux:*:*) padre:Linux:*:*)
echo sparc-unknown-linux-gnu echo sparc-unknown-linux-gnu
@ -960,7 +979,7 @@ EOF
echo ${UNAME_MACHINE}-ibm-linux echo ${UNAME_MACHINE}-ibm-linux
exit ;; exit ;;
sh64*:Linux:*:*) sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
sh*:Linux:*:*) sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
@ -968,14 +987,17 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*) sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
vax:Linux:*:*) vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;; exit ;;
x86_64:Linux:*:*) x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
xtensa*:Linux:*:*) xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;; exit ;;
i*86:DYNIX/ptx:4*:*) i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@ -984,11 +1006,11 @@ EOF
echo i386-sequent-sysv4 echo i386-sequent-sysv4
exit ;; exit ;;
i*86:UNIX_SV:4.2MP:2.*) i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version # Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2... # number series starting with 2...
# I am not positive that other SVR4 systems won't match this, # I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms. # I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it. # Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;; exit ;;
i*86:OS/2:*:*) i*86:OS/2:*:*)
@ -1020,7 +1042,7 @@ EOF
fi fi
exit ;; exit ;;
i*86:*:5:[678]*) i*86:*:5:[678]*)
# UnixWare 7.x, OpenUNIX and OpenServer 6. # UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;; *486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;; *Pentium) UNAME_MACHINE=i586 ;;
@ -1048,13 +1070,13 @@ EOF
exit ;; exit ;;
pc:*:*:*) pc:*:*:*)
# Left here for compatibility: # Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about # uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586. # the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub # Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that # prints for the "djgpp" host, or else GDB configury will decide that
# this is a cross-build. # this is a cross-build.
echo i586-pc-msdosdjgpp echo i586-pc-msdosdjgpp
exit ;; exit ;;
Intel:Mach:3*:*) Intel:Mach:3*:*)
echo i386-pc-mach3 echo i386-pc-mach3
exit ;; exit ;;
@ -1089,8 +1111,8 @@ EOF
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;; && { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*) NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3' OS_REL='.3'
test -r /etc/.relid \ test -r /etc/.relid \
@ -1133,10 +1155,10 @@ EOF
echo ns32k-sni-sysv echo ns32k-sni-sysv
fi fi
exit ;; exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV> # says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4 echo i586-unisys-sysv4
exit ;; exit ;;
*:UNIX_System_V:4*:FTX*) *:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>. # From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm # How about differentiating between stratus architectures? -djm
@ -1162,11 +1184,11 @@ EOF
exit ;; exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE} echo mips-nec-sysv${UNAME_RELEASE}
else else
echo mips-unknown-sysv${UNAME_RELEASE} echo mips-unknown-sysv${UNAME_RELEASE}
fi fi
exit ;; exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos echo powerpc-be-beos
exit ;; exit ;;
@ -1231,6 +1253,9 @@ EOF
*:QNX:*:4*) *:QNX:*:4*)
echo i386-pc-qnx echo i386-pc-qnx
exit ;; exit ;;
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-?:NONSTOP_KERNEL:*:*) NSE-?:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE} echo nse-tandem-nsk${UNAME_RELEASE}
exit ;; exit ;;
@ -1276,13 +1301,13 @@ EOF
echo pdp10-unknown-its echo pdp10-unknown-its
exit ;; exit ;;
SEI:*:*:SEIUX) SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE} echo mips-sei-seiux${UNAME_RELEASE}
exit ;; exit ;;
*:DragonFly:*:*) *:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;; exit ;;
*:*VMS:*:*) *:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null` UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;; A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;;
@ -1300,6 +1325,9 @@ EOF
i*86:AROS:*:*) i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros echo ${UNAME_MACHINE}-pc-aros
exit ;; exit ;;
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
esac esac
#echo '(No uname command or uname output not recognized.)' 1>&2 #echo '(No uname command or uname output not recognized.)' 1>&2
@ -1322,11 +1350,11 @@ main ()
#include <sys/param.h> #include <sys/param.h>
printf ("m68k-sony-newsos%s\n", printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4 #ifdef NEWSOS4
"4" "4"
#else #else
"" ""
#endif #endif
); exit (0); ); exit (0);
#endif #endif
#endif #endif

209
config/config.sub vendored
View File

@ -1,10 +1,10 @@
#! /bin/sh #! /bin/sh
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# Free Software Foundation, Inc. # 2011, 2012 Free Software Foundation, Inc.
timestamp='2010-01-22' timestamp='2012-02-10'
# This file is (in principle) common to ALL GNU software. # This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software # The presence of a machine in this file suggests that SOME GNU software
@ -21,9 +21,7 @@ timestamp='2010-01-22'
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
# #
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
@ -76,8 +74,8 @@ version="\
GNU config.sub ($timestamp) GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Software Foundation, Inc. Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -124,13 +122,18 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations. # Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \ kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*) storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;; ;;
android-linux)
os=-linux-android
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*) *)
basic_machine=`echo $1 | sed 's/-[^-]*$//'` basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ] if [ $basic_machine != $1 ]
@ -157,8 +160,8 @@ case $os in
os= os=
basic_machine=$1 basic_machine=$1
;; ;;
-bluegene*) -bluegene*)
os=-cnk os=-cnk
;; ;;
-sim | -cisco | -oki | -wec | -winbond) -sim | -cisco | -oki | -wec | -winbond)
os= os=
@ -174,10 +177,10 @@ case $os in
os=-chorusos os=-chorusos
basic_machine=$1 basic_machine=$1
;; ;;
-chorusrdb) -chorusrdb)
os=-chorusrdb os=-chorusrdb
basic_machine=$1 basic_machine=$1
;; ;;
-hiux*) -hiux*)
os=-hiuxwe2 os=-hiuxwe2
;; ;;
@ -246,17 +249,22 @@ case $basic_machine in
# Some are omitted here because they have special meanings below. # Some are omitted here because they have special meanings below.
1750a | 580 \ 1750a | 580 \
| a29k \ | a29k \
| aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \ | am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| be32 | be64 \
| bfin \ | bfin \
| c4x | clipper \ | c4x | clipper \
| d10v | d30v | dlx | dsp16xx \ | d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \ | i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \ | ip2k | iq2000 \
| le32 | le64 \
| lm32 \ | lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \ | m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \ | maxq | mb | microblaze | mcore | mep | metag \
@ -282,29 +290,39 @@ case $basic_machine in
| moxie \ | moxie \
| mt \ | mt \
| msp430 \ | msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 \ | nios | nios2 \
| ns16k | ns32k \ | ns16k | ns32k \
| open8 \
| or32 \ | or32 \
| pdp10 | pdp11 | pj | pjl \ | pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \ | pyramid \
| rx \ | rl78 | rx \
| score \ | score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \ | sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \ | spu \
| tahoe | thumb | tic4x | tic80 | tron \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \ | ubicom32 \
| v850 | v850e \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| we32k \ | we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | x86 | xc16x | xstormy16 | xtensa \
| z8k | z80) | z8k | z80)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
;; ;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip) c54x)
# Motorola 68HC11/12. basic_machine=tic54x-unknown
;;
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
os=-none os=-none
;; ;;
@ -314,6 +332,21 @@ case $basic_machine in
basic_machine=mt-unknown basic_machine=mt-unknown
;; ;;
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xgate)
basic_machine=$basic_machine-unknown
os=-none
;;
xscaleeb)
basic_machine=armeb-unknown
;;
xscaleel)
basic_machine=armel-unknown
;;
# We use `pc' rather than `unknown' # We use `pc' rather than `unknown'
# because (1) that's what they normally are, and # because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users. # (2) the word "unknown" tends to confuse beginning users.
@ -328,21 +361,25 @@ case $basic_machine in
# Recognize the basic CPU types with company name. # Recognize the basic CPU types with company name.
580-* \ 580-* \
| a29k-* \ | a29k-* \
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \ | avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \ | bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \ | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \ | d10v-* | d30v-* | dlx-* \
| elxsi-* \ | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \ | h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \ | i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \ | ip2k-* | iq2000-* \
| le32-* | le64-* \
| lm32-* \ | lm32-* \
| m32c-* | m32r-* | m32rle-* \ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
@ -368,26 +405,29 @@ case $basic_machine in
| mmix-* \ | mmix-* \
| mt-* \ | mt-* \
| msp430-* \ | msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \ | none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| orion-* \ | orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \ | pyramid-* \
| romp-* | rs6000-* | rx-* \ | rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \ | sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \ | tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile-* | tilegx-* \ | tile*-* \
| tron-* \ | tron-* \
| ubicom32-* \ | ubicom32-* \
| v850-* | v850e-* | vax-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| we32k-* \ | we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \ | xstormy16-* | xtensa*-* \
| ymp-* \ | ymp-* \
| z8k-* | z80-*) | z8k-* | z80-*)
@ -412,7 +452,7 @@ case $basic_machine in
basic_machine=a29k-amd basic_machine=a29k-amd
os=-udi os=-udi
;; ;;
abacus) abacus)
basic_machine=abacus-unknown basic_machine=abacus-unknown
;; ;;
adobe68k) adobe68k)
@ -482,11 +522,20 @@ case $basic_machine in
basic_machine=powerpc-ibm basic_machine=powerpc-ibm
os=-cnk os=-cnk
;; ;;
c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c90) c90)
basic_machine=c90-cray basic_machine=c90-cray
os=-unicos os=-unicos
;; ;;
cegcc) cegcc)
basic_machine=arm-unknown basic_machine=arm-unknown
os=-cegcc os=-cegcc
;; ;;
@ -518,7 +567,7 @@ case $basic_machine in
basic_machine=craynv-cray basic_machine=craynv-cray
os=-unicosmp os=-unicosmp
;; ;;
cr16) cr16 | cr16-*)
basic_machine=cr16-unknown basic_machine=cr16-unknown
os=-elf os=-elf
;; ;;
@ -676,7 +725,6 @@ case $basic_machine in
i370-ibm* | ibm*) i370-ibm* | ibm*)
basic_machine=i370-ibm basic_machine=i370-ibm
;; ;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32) i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32 os=-sysv32
@ -734,7 +782,7 @@ case $basic_machine in
basic_machine=ns32k-utek basic_machine=ns32k-utek
os=-sysv os=-sysv
;; ;;
microblaze) microblaze)
basic_machine=microblaze-xilinx basic_machine=microblaze-xilinx
;; ;;
mingw32) mingw32)
@ -773,10 +821,18 @@ case $basic_machine in
ms1-*) ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;; ;;
msys)
basic_machine=i386-pc
os=-msys
;;
mvs) mvs)
basic_machine=i370-ibm basic_machine=i370-ibm
os=-mvs os=-mvs
;; ;;
nacl)
basic_machine=le32-unknown
os=-nacl
;;
ncr3000) ncr3000)
basic_machine=i486-ncr basic_machine=i486-ncr
os=-sysv4 os=-sysv4
@ -841,6 +897,12 @@ case $basic_machine in
np1) np1)
basic_machine=np1-gould basic_machine=np1-gould
;; ;;
neo-tandem)
basic_machine=neo-tandem
;;
nse-tandem)
basic_machine=nse-tandem
;;
nsr-tandem) nsr-tandem)
basic_machine=nsr-tandem basic_machine=nsr-tandem
;; ;;
@ -923,9 +985,10 @@ case $basic_machine in
;; ;;
power) basic_machine=power-ibm power) basic_machine=power-ibm
;; ;;
ppc) basic_machine=powerpc-unknown ppc | ppcbe) basic_machine=powerpc-unknown
;; ;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;; ;;
ppcle | powerpclittle | ppc-le | powerpc-little) ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown basic_machine=powerpcle-unknown
@ -1019,6 +1082,9 @@ case $basic_machine in
basic_machine=i860-stratus basic_machine=i860-stratus
os=-sysv4 os=-sysv4
;; ;;
strongarm-* | thumb-*)
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
sun2) sun2)
basic_machine=m68000-sun basic_machine=m68000-sun
;; ;;
@ -1075,25 +1141,8 @@ case $basic_machine in
basic_machine=t90-cray basic_machine=t90-cray
os=-unicos os=-unicos
;; ;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
;;
# This must be matched before tile*.
tilegx*)
basic_machine=tilegx-unknown
os=-linux-gnu
;;
tile*) tile*)
basic_machine=tile-unknown basic_machine=$basic_machine-unknown
os=-linux-gnu os=-linux-gnu
;; ;;
tx39) tx39)
@ -1163,6 +1212,9 @@ case $basic_machine in
xps | xps100) xps | xps100)
basic_machine=xps100-honeywell basic_machine=xps100-honeywell
;; ;;
xscale-* | xscalee[bl]-*)
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
;;
ymp) ymp)
basic_machine=ymp-cray basic_machine=ymp-cray
os=-unicos os=-unicos
@ -1260,11 +1312,11 @@ esac
if [ x"$os" != x"" ] if [ x"$os" != x"" ]
then then
case $os in case $os in
# First match some system type aliases # First match some system type aliases
# that might get confused with valid system types. # that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception. # -solaris* is a basic system type, with this one exception.
-auroraux) -auroraux)
os=-auroraux os=-auroraux
;; ;;
-solaris1 | -solaris1.*) -solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'` os=`echo $os | sed -e 's|solaris1|sunos4|'`
@ -1300,8 +1352,9 @@ case $os in
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \ | -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -mingw32* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@ -1348,7 +1401,7 @@ case $os in
-opened*) -opened*)
os=-openedition os=-openedition
;; ;;
-os400*) -os400*)
os=-os400 os=-os400
;; ;;
-wince*) -wince*)
@ -1397,7 +1450,7 @@ case $os in
-sinix*) -sinix*)
os=-sysv4 os=-sysv4
;; ;;
-tpf*) -tpf*)
os=-tpf os=-tpf
;; ;;
-triton*) -triton*)
@ -1442,8 +1495,8 @@ case $os in
-dicos*) -dicos*)
os=-dicos os=-dicos
;; ;;
-nacl*) -nacl*)
;; ;;
-none) -none)
;; ;;
*) *)
@ -1466,10 +1519,10 @@ else
# system, and we'll never get to this point. # system, and we'll never get to this point.
case $basic_machine in case $basic_machine in
score-*) score-*)
os=-elf os=-elf
;; ;;
spu-*) spu-*)
os=-elf os=-elf
;; ;;
*-acorn) *-acorn)
@ -1481,8 +1534,17 @@ case $basic_machine in
arm*-semi) arm*-semi)
os=-aout os=-aout
;; ;;
c4x-* | tic4x-*) c4x-* | tic4x-*)
os=-coff os=-coff
;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
;; ;;
# This must come before the *-dec entry. # This must come before the *-dec entry.
pdp10-*) pdp10-*)
@ -1502,14 +1564,11 @@ case $basic_machine in
;; ;;
m68000-sun) m68000-sun)
os=-sunos3 os=-sunos3
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;; ;;
m68*-cisco) m68*-cisco)
os=-aout os=-aout
;; ;;
mep-*) mep-*)
os=-elf os=-elf
;; ;;
mips*-cisco) mips*-cisco)
@ -1536,7 +1595,7 @@ case $basic_machine in
*-ibm) *-ibm)
os=-aix os=-aix
;; ;;
*-knuth) *-knuth)
os=-mmixware os=-mmixware
;; ;;
*-wec) *-wec)

View File

@ -1,10 +1,10 @@
#! /bin/sh #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects # depcomp - compile a program generating dependencies as side-effects
scriptversion=2009-04-28.21; # UTC scriptversion=2011-12-04.11; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
# Software Foundation, Inc. # 2011 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -44,7 +44,7 @@ Environment variables:
object Object file output by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies. DEPDIR directory where to store dependencies.
depfile Dependency file to output. depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies. tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no). libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>. Report bugs to <bug-automake@gnu.org>.
@ -90,10 +90,18 @@ if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation. # This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward # Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4 # slashes to satisfy depend.m4
cygpath_u="sed s,\\\\\\\\,/,g" cygpath_u='sed s,\\\\,/,g'
depmode=msvisualcpp depmode=msvisualcpp
fi fi
if test "$depmode" = msvc7msys; then
# This is just like msvc7 but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvc7
fi
case "$depmode" in case "$depmode" in
gcc3) gcc3)
## gcc 3 implements dependency tracking that does exactly what ## gcc 3 implements dependency tracking that does exactly what
@ -158,10 +166,12 @@ gcc)
' < "$tmpdepfile" | ' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory ## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as ## that the space means something, we add a space to the output as
## well. ## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation ## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround. ## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" rm -f "$tmpdepfile"
;; ;;
@ -405,6 +415,52 @@ tru64)
rm -f "$tmpdepfile" rm -f "$tmpdepfile"
;; ;;
msvc7)
if test "$libtool" = yes; then
showIncludes=-Wc,-showIncludes
else
showIncludes=-showIncludes
fi
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
if test "$stat" = 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The first sed program below extracts the file names and escapes
# backslashes for cygpath. The second sed program outputs the file
# name when reading, but also accumulates all include files in the
# hold buffer in order to output them again at the end. This only
# works with sed implementations that can handle large buffers.
sed < "$tmpdepfile" -n '
/^Note: including file: *\(.*\)/ {
s//\1/
s/\\/\\\\/g
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
s/\(.*\)/ \1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
s/.*/ /
G
p
}' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvc7msys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
#nosideeffect) #nosideeffect)
# This comment above is used by automake to tell side-effect # This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones. # dependency tracking mechanisms from slower ones.
@ -503,7 +559,9 @@ makedepend)
touch "$tmpdepfile" touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile" rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile" # makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' ' sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \ ' | \
## Some versions of the HPUX 10.20 sed can't process this invocation ## Some versions of the HPUX 10.20 sed can't process this invocation

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2009-04-28.21; # UTC scriptversion=2011-01-19.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -156,6 +156,10 @@ while test $# -ne 0; do
-s) stripcmd=$stripprog;; -s) stripcmd=$stripprog;;
-t) dst_arg=$2 -t) dst_arg=$2
# Protect names problematic for `test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;; shift;;
-T) no_target_directory=true;; -T) no_target_directory=true;;
@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi fi
shift # arg shift # arg
dst_arg=$arg dst_arg=$arg
# Protect names problematic for `test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done done
fi fi
@ -200,7 +208,11 @@ if test $# -eq 0; then
fi fi
if test -z "$dir_arg"; then if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15 do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes. # Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps. # However, 'strip' requires both read and write access to temps.
@ -228,9 +240,9 @@ fi
for src for src
do do
# Protect names starting with `-'. # Protect names problematic for `test' and other utilities.
case $src in case $src in
-*) src=./$src;; -* | [=\(\)!]) src=./$src;;
esac esac
if test -n "$dir_arg"; then if test -n "$dir_arg"; then
@ -252,12 +264,7 @@ do
echo "$0: no destination specified." >&2 echo "$0: no destination specified." >&2
exit 1 exit 1
fi fi
dst=$dst_arg dst=$dst_arg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst;;
esac
# If destination is a directory, append the input filename; won't work # If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored. # if double slashes aren't ignored.
@ -385,7 +392,7 @@ do
case $dstdir in case $dstdir in
/*) prefix='/';; /*) prefix='/';;
-*) prefix='./';; [-=\(\)!]*) prefix='./';;
*) prefix='';; *) prefix='';;
esac esac
@ -403,7 +410,7 @@ do
for d for d
do do
test -z "$d" && continue test X"$d" = X && continue
prefix=$prefix$d prefix=$prefix$d
if test -d "$prefix"; then if test -d "$prefix"; then

2266
config/libtool.m4 vendored

File diff suppressed because it is too large Load Diff

4036
config/ltmain.sh Executable file → Normal file

File diff suppressed because it is too large Load Diff

32
config/ltoptions.m4 vendored
View File

@ -1,13 +1,14 @@
# Helper functions for option handling. -*- Autoconf -*- # Helper functions for option handling. -*- Autoconf -*-
# #
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# Written by Gary V. Vaughan, 2004 # Written by Gary V. Vaughan, 2004
# #
# This file is free software; the Free Software Foundation gives # This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without # unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved. # modifications, as long as this notice is preserved.
# serial 6 ltoptions.m4 # serial 7 ltoptions.m4
# This is to help aclocal find these macros, as it can't see m4_define. # This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
@ -125,7 +126,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
[enable_win32_dll=yes [enable_win32_dll=yes
case $host in case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false) AC_CHECK_TOOL(OBJDUMP, objdump, false)
@ -133,13 +134,13 @@ case $host in
esac esac
test -z "$AS" && AS=as test -z "$AS" && AS=as
_LT_DECL([], [AS], [0], [Assembler program])dnl _LT_DECL([], [AS], [1], [Assembler program])dnl
test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$DLLTOOL" && DLLTOOL=dlltool
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$OBJDUMP" && OBJDUMP=objdump
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
])# win32-dll ])# win32-dll
AU_DEFUN([AC_LIBTOOL_WIN32_DLL], AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
@ -325,9 +326,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# MODE is either `yes' or `no'. If omitted, it defaults to `both'. # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
m4_define([_LT_WITH_PIC], m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic], [AC_ARG_WITH([pic],
[AS_HELP_STRING([--with-pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[pic_mode="$withval"], [lt_p=${PACKAGE-default}
case $withval in
yes|no) pic_mode=$withval ;;
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for lt_pkg in $withval; do
IFS="$lt_save_ifs"
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[pic_mode=default]) [pic_mode=default])
test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default])

12
config/ltversion.m4 vendored
View File

@ -7,17 +7,17 @@
# unlimited permission to copy and/or distribute it, with or without # unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved. # modifications, as long as this notice is preserved.
# Generated from ltversion.in. # @configure_input@
# serial 3017 ltversion.m4 # serial 3337 ltversion.m4
# This file is part of GNU Libtool # This file is part of GNU Libtool
m4_define([LT_PACKAGE_VERSION], [2.2.6b]) m4_define([LT_PACKAGE_VERSION], [2.4.2])
m4_define([LT_PACKAGE_REVISION], [1.3017]) m4_define([LT_PACKAGE_REVISION], [1.3337])
AC_DEFUN([LTVERSION_VERSION], AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.2.6b' [macro_version='2.4.2'
macro_revision='1.3017' macro_revision='1.3337'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0) _LT_DECL(, macro_revision, 0)
]) ])

12
config/lt~obsolete.m4 vendored
View File

@ -1,13 +1,13 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
# #
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004. # Written by Scott James Remnant, 2004.
# #
# This file is free software; the Free Software Foundation gives # This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without # unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved. # modifications, as long as this notice is preserved.
# serial 4 lt~obsolete.m4 # serial 5 lt~obsolete.m4
# These exist entirely to fool aclocal when bootstrapping libtool. # These exist entirely to fool aclocal when bootstrapping libtool.
# #
@ -77,7 +77,6 @@ m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
@ -90,3 +89,10 @@ m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])

View File

@ -1,10 +1,10 @@
#! /bin/sh #! /bin/sh
# Common stub for a few missing GNU programs while installing. # Common stub for a few missing GNU programs while installing.
scriptversion=2009-04-28.21; # UTC scriptversion=2012-01-06.13; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
# 2008, 2009 Free Software Foundation, Inc. # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -84,7 +84,6 @@ Supported PROGRAM values:
help2man touch the output file help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch] yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
@ -122,15 +121,6 @@ case $1 in
# Not GNU programs, they don't have --version. # Not GNU programs, they don't have --version.
;; ;;
tar*)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*) *)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed. # We have it, but it failed.
@ -226,7 +216,7 @@ WARNING: \`$1' $msg. You should only need it if
\`Bison' from any GNU archive site." \`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h rm -f y.tab.c y.tab.h
if test $# -ne 1; then if test $# -ne 1; then
eval LASTARG="\${$#}" eval LASTARG=\${$#}
case $LASTARG in case $LASTARG in
*.y) *.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
@ -256,7 +246,7 @@ WARNING: \`$1' is $msg. You should only need it if
\`Flex' from any GNU archive site." \`Flex' from any GNU archive site."
rm -f lex.yy.c rm -f lex.yy.c
if test $# -ne 1; then if test $# -ne 1; then
eval LASTARG="\${$#}" eval LASTARG=\${$#}
case $LASTARG in case $LASTARG in
*.l) *.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
@ -318,41 +308,6 @@ WARNING: \`$1' is $msg. You should only need it if
touch $file touch $file
;; ;;
tar*)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*) *)
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg. WARNING: \`$1' is needed, and is $msg.

View File

@ -63,7 +63,7 @@ srpm-common: dist
rpmbuild="$$rpmbuild" \ rpmbuild="$$rpmbuild" \
rpmspec="$$rpmspec" \ rpmspec="$$rpmspec" \
rpm-local || exit 1; \ rpm-local || exit 1; \
$(RPMBUILD) \ LANG=C $(RPMBUILD) \
--define "_tmppath $$rpmbuild/TMP" \ --define "_tmppath $$rpmbuild/TMP" \
--define "_topdir $$rpmbuild" \ --define "_topdir $$rpmbuild" \
$(def) -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \ $(def) -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \
@ -79,7 +79,7 @@ rpm-common:
rpmbuild="$$rpmbuild" \ rpmbuild="$$rpmbuild" \
rpmspec="$$rpmspec" \ rpmspec="$$rpmspec" \
rpm-local || exit 1; \ rpm-local || exit 1; \
${RPMBUILD} \ LANG=C ${RPMBUILD} \
--define "_tmppath $$rpmbuild/TMP" \ --define "_tmppath $$rpmbuild/TMP" \
--define "_topdir $$rpmbuild" \ --define "_topdir $$rpmbuild" \
$(def) --rebuild $$rpmpkg || exit 1; \ $(def) --rebuild $$rpmpkg || exit 1; \

File diff suppressed because it is too large Load Diff

View File

@ -57,7 +57,7 @@ AC_DEFUN([SPL_AC_META], [
SPL_META_RELEASE=_SPL_AC_META_GETVAL([Release]); SPL_META_RELEASE=_SPL_AC_META_GETVAL([Release]);
if test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then if test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then
_match="${SPL_META_NAME}-${SPL_META_VERSION}*" _match="${SPL_META_NAME}-${SPL_META_VERSION}"
_alias=$(git describe --match=${_match} 2>/dev/null) _alias=$(git describe --match=${_match} 2>/dev/null)
_release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g') _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g')
if test -n "${_release}"; then if test -n "${_release}"; then
@ -76,6 +76,14 @@ AC_DEFUN([SPL_AC_META], [
AC_SUBST([RELEASE]) AC_SUBST([RELEASE])
fi fi
SPL_META_LICENSE=_SPL_AC_META_GETVAL([License]);
if test -n "$SPL_META_LICENSE"; then
AC_DEFINE_UNQUOTED([SPL_META_LICENSE], ["$SPL_META_LICENSE"],
[Define the project license.]
)
AC_SUBST([SPL_META_LICENSE])
fi
if test -n "$SPL_META_NAME" -a -n "$SPL_META_VERSION"; then if test -n "$SPL_META_NAME" -a -n "$SPL_META_VERSION"; then
SPL_META_ALIAS="$SPL_META_NAME-$SPL_META_VERSION" SPL_META_ALIAS="$SPL_META_NAME-$SPL_META_VERSION"
test -n "$SPL_META_RELEASE" && test -n "$SPL_META_RELEASE" &&

11835
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,8 @@
# with the SPL. If not, see <http://www.gnu.org/licenses/>. # with the SPL. If not, see <http://www.gnu.org/licenses/>.
############################################################################### ###############################################################################
AC_INIT AC_INIT(m4_esyscmd(grep Name META | cut -d ':' -f 2 | tr -d ' \n'),
m4_esyscmd(grep Version META | cut -d ':' -f 2 | tr -d ' \n'))
AC_LANG(C) AC_LANG(C)
SPL_AC_META SPL_AC_META
AC_CONFIG_AUX_DIR([config]) AC_CONFIG_AUX_DIR([config])
@ -32,7 +33,7 @@ AC_CONFIG_MACRO_DIR([config])
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_INIT_AUTOMAKE([$SPL_META_NAME], [$SPL_META_VERSION]) AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([spl_config.h], [ AC_CONFIG_HEADERS([spl_config.h], [
(mv spl_config.h spl_config.h.tmp && (mv spl_config.h spl_config.h.tmp &&
awk -f ${ac_srcdir}/config/config.awk spl_config.h.tmp >spl_config.h && awk -f ${ac_srcdir}/config/config.awk spl_config.h.tmp >spl_config.h &&
@ -50,6 +51,7 @@ AC_CONFIG_FILES([
Makefile Makefile
man/Makefile man/Makefile
man/man1/Makefile man/man1/Makefile
man/man5/Makefile
lib/Makefile lib/Makefile
cmd/Makefile cmd/Makefile
module/Makefile module/Makefile
@ -68,10 +70,10 @@ AC_CONFIG_FILES([
include/vm/Makefile include/vm/Makefile
scripts/Makefile scripts/Makefile
rpm/Makefile rpm/Makefile
rpm/fedora/Makefile rpm/redhat/Makefile
rpm/fedora/spl.spec rpm/redhat/spl.spec
rpm/fedora/spl-kmod.spec rpm/redhat/spl-kmod.spec
rpm/fedora/spl-dkms.spec rpm/redhat/spl-dkms.spec
rpm/generic/Makefile rpm/generic/Makefile
rpm/generic/spl.spec rpm/generic/spl.spec
rpm/generic/spl-kmod.spec rpm/generic/spl-kmod.spec

View File

@ -5,9 +5,6 @@ COMMON_H =
KERNEL_H = \ KERNEL_H = \
$(top_srcdir)/include/splat-ctl.h \ $(top_srcdir)/include/splat-ctl.h \
$(top_srcdir)/include/spl-ctl.h \ $(top_srcdir)/include/spl-ctl.h \
$(top_srcdir)/include/spl-debug.h \
$(top_srcdir)/include/spl-device.h \
$(top_srcdir)/include/spl-trace.h \
$(top_srcdir)/include/strings.h \ $(top_srcdir)/include/strings.h \
$(top_srcdir)/include/unistd.h $(top_srcdir)/include/unistd.h
@ -16,6 +13,6 @@ USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL if CONFIG_KERNEL
kerneldir = /usr/src/spl-$(VERSION)/include kerneldir = @prefix@/src/spl-$(VERSION)/include
kernel_HEADERS = $(KERNEL_H) kernel_HEADERS = $(KERNEL_H)
endif endif

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -52,11 +52,11 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_HEADER = $(top_builddir)/spl_config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
@ -69,9 +69,6 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
ps-recursive uninstall-recursive ps-recursive uninstall-recursive
am__kernel_HEADERS_DIST = $(top_srcdir)/include/splat-ctl.h \ am__kernel_HEADERS_DIST = $(top_srcdir)/include/splat-ctl.h \
$(top_srcdir)/include/spl-ctl.h \ $(top_srcdir)/include/spl-ctl.h \
$(top_srcdir)/include/spl-debug.h \
$(top_srcdir)/include/spl-device.h \
$(top_srcdir)/include/spl-trace.h \
$(top_srcdir)/include/strings.h $(top_srcdir)/include/unistd.h $(top_srcdir)/include/strings.h $(top_srcdir)/include/unistd.h
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \ am__vpath_adj = case $$p in \
@ -94,6 +91,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(kerneldir)" am__installdirs = "$(DESTDIR)$(kerneldir)"
HEADERS = $(kernel_HEADERS) HEADERS = $(kernel_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
@ -149,11 +152,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -184,7 +187,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -194,6 +196,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -227,6 +230,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -244,6 +248,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -276,7 +281,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -301,15 +305,12 @@ COMMON_H =
KERNEL_H = \ KERNEL_H = \
$(top_srcdir)/include/splat-ctl.h \ $(top_srcdir)/include/splat-ctl.h \
$(top_srcdir)/include/spl-ctl.h \ $(top_srcdir)/include/spl-ctl.h \
$(top_srcdir)/include/spl-debug.h \
$(top_srcdir)/include/spl-device.h \
$(top_srcdir)/include/spl-trace.h \
$(top_srcdir)/include/strings.h \ $(top_srcdir)/include/strings.h \
$(top_srcdir)/include/unistd.h $(top_srcdir)/include/unistd.h
USER_H = USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
@CONFIG_KERNEL_TRUE@kerneldir = /usr/src/spl-$(VERSION)/include @CONFIG_KERNEL_TRUE@kerneldir = @prefix@/src/spl-$(VERSION)/include
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H) @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H)
all: all-recursive all: all-recursive
@ -367,9 +368,7 @@ uninstall-kernelHEADERS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \ @list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \ dir='$(DESTDIR)$(kerneldir)'; $(am__uninstall_files_from_dir)
echo " ( cd '$(DESTDIR)$(kerneldir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(kerneldir)" && rm -f $$files
# This directory's subdirectories are mostly independent; you can cd # This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile. # into them and run `make' without going through this Makefile.
@ -582,10 +581,15 @@ install-am: all-am
installcheck: installcheck-recursive installcheck: installcheck-recursive
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:

View File

@ -8,6 +8,6 @@ USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL if CONFIG_KERNEL
kerneldir = /usr/src/spl-$(VERSION)/include/fs kerneldir = @prefix@/src/spl-$(VERSION)/include/fs
kernel_HEADERS = $(KERNEL_H) kernel_HEADERS = $(KERNEL_H)
endif endif

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -52,11 +52,11 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_HEADER = $(top_builddir)/spl_config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
@ -82,6 +82,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(kerneldir)" am__installdirs = "$(DESTDIR)$(kerneldir)"
HEADERS = $(kernel_HEADERS) HEADERS = $(kernel_HEADERS)
ETAGS = etags ETAGS = etags
@ -106,11 +112,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -141,7 +147,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -151,6 +156,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -184,6 +190,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -201,6 +208,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -233,7 +241,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -259,7 +266,7 @@ KERNEL_H = \
USER_H = USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
@CONFIG_KERNEL_TRUE@kerneldir = /usr/src/spl-$(VERSION)/include/fs @CONFIG_KERNEL_TRUE@kerneldir = @prefix@/src/spl-$(VERSION)/include/fs
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H) @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H)
all: all-am all: all-am
@ -317,9 +324,7 @@ uninstall-kernelHEADERS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \ @list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \ dir='$(DESTDIR)$(kerneldir)'; $(am__uninstall_files_from_dir)
echo " ( cd '$(DESTDIR)$(kerneldir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(kerneldir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@ -420,10 +425,15 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:

View File

@ -3,19 +3,14 @@ COMMON_H =
KERNEL_H = \ KERNEL_H = \
$(top_srcdir)/include/linux/bitops_compat.h \ $(top_srcdir)/include/linux/bitops_compat.h \
$(top_srcdir)/include/linux/compiler_compat.h \ $(top_srcdir)/include/linux/compiler_compat.h \
$(top_srcdir)/include/linux/delay_compat.h \
$(top_srcdir)/include/linux/file_compat.h \ $(top_srcdir)/include/linux/file_compat.h \
$(top_srcdir)/include/linux/kallsyms_compat.h \
$(top_srcdir)/include/linux/list_compat.h \ $(top_srcdir)/include/linux/list_compat.h \
$(top_srcdir)/include/linux/math64_compat.h \ $(top_srcdir)/include/linux/math64_compat.h \
$(top_srcdir)/include/linux/mm_compat.h \ $(top_srcdir)/include/linux/mm_compat.h \
$(top_srcdir)/include/linux/module_compat.h \
$(top_srcdir)/include/linux/mutex_compat.h \
$(top_srcdir)/include/linux/proc_compat.h \ $(top_srcdir)/include/linux/proc_compat.h \
$(top_srcdir)/include/linux/rwsem_compat.h \ $(top_srcdir)/include/linux/rwsem_compat.h \
$(top_srcdir)/include/linux/smp_compat.h \ $(top_srcdir)/include/linux/wait_compat.h \
$(top_srcdir)/include/linux/sysctl_compat.h \
$(top_srcdir)/include/linux/time_compat.h \
$(top_srcdir)/include/linux/uaccess_compat.h \
$(top_srcdir)/include/linux/zlib_compat.h $(top_srcdir)/include/linux/zlib_compat.h
USER_H = USER_H =
@ -23,6 +18,6 @@ USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL if CONFIG_KERNEL
kerneldir = /usr/src/spl-$(VERSION)/include/linux kerneldir = @prefix@/src/spl-$(VERSION)/include/linux
kernel_HEADERS = $(KERNEL_H) kernel_HEADERS = $(KERNEL_H)
endif endif

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -52,29 +52,24 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_HEADER = $(top_builddir)/spl_config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
am__kernel_HEADERS_DIST = $(top_srcdir)/include/linux/bitops_compat.h \ am__kernel_HEADERS_DIST = $(top_srcdir)/include/linux/bitops_compat.h \
$(top_srcdir)/include/linux/compiler_compat.h \ $(top_srcdir)/include/linux/compiler_compat.h \
$(top_srcdir)/include/linux/delay_compat.h \
$(top_srcdir)/include/linux/file_compat.h \ $(top_srcdir)/include/linux/file_compat.h \
$(top_srcdir)/include/linux/kallsyms_compat.h \
$(top_srcdir)/include/linux/list_compat.h \ $(top_srcdir)/include/linux/list_compat.h \
$(top_srcdir)/include/linux/math64_compat.h \ $(top_srcdir)/include/linux/math64_compat.h \
$(top_srcdir)/include/linux/mm_compat.h \ $(top_srcdir)/include/linux/mm_compat.h \
$(top_srcdir)/include/linux/module_compat.h \
$(top_srcdir)/include/linux/mutex_compat.h \
$(top_srcdir)/include/linux/proc_compat.h \ $(top_srcdir)/include/linux/proc_compat.h \
$(top_srcdir)/include/linux/rwsem_compat.h \ $(top_srcdir)/include/linux/rwsem_compat.h \
$(top_srcdir)/include/linux/smp_compat.h \ $(top_srcdir)/include/linux/wait_compat.h \
$(top_srcdir)/include/linux/sysctl_compat.h \
$(top_srcdir)/include/linux/time_compat.h \
$(top_srcdir)/include/linux/uaccess_compat.h \
$(top_srcdir)/include/linux/zlib_compat.h $(top_srcdir)/include/linux/zlib_compat.h
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \ am__vpath_adj = case $$p in \
@ -97,6 +92,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(kerneldir)" am__installdirs = "$(DESTDIR)$(kerneldir)"
HEADERS = $(kernel_HEADERS) HEADERS = $(kernel_HEADERS)
ETAGS = etags ETAGS = etags
@ -121,11 +122,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -156,7 +157,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -166,6 +166,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -199,6 +200,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -216,6 +218,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -248,7 +251,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -272,24 +274,19 @@ COMMON_H =
KERNEL_H = \ KERNEL_H = \
$(top_srcdir)/include/linux/bitops_compat.h \ $(top_srcdir)/include/linux/bitops_compat.h \
$(top_srcdir)/include/linux/compiler_compat.h \ $(top_srcdir)/include/linux/compiler_compat.h \
$(top_srcdir)/include/linux/delay_compat.h \
$(top_srcdir)/include/linux/file_compat.h \ $(top_srcdir)/include/linux/file_compat.h \
$(top_srcdir)/include/linux/kallsyms_compat.h \
$(top_srcdir)/include/linux/list_compat.h \ $(top_srcdir)/include/linux/list_compat.h \
$(top_srcdir)/include/linux/math64_compat.h \ $(top_srcdir)/include/linux/math64_compat.h \
$(top_srcdir)/include/linux/mm_compat.h \ $(top_srcdir)/include/linux/mm_compat.h \
$(top_srcdir)/include/linux/module_compat.h \
$(top_srcdir)/include/linux/mutex_compat.h \
$(top_srcdir)/include/linux/proc_compat.h \ $(top_srcdir)/include/linux/proc_compat.h \
$(top_srcdir)/include/linux/rwsem_compat.h \ $(top_srcdir)/include/linux/rwsem_compat.h \
$(top_srcdir)/include/linux/smp_compat.h \ $(top_srcdir)/include/linux/wait_compat.h \
$(top_srcdir)/include/linux/sysctl_compat.h \
$(top_srcdir)/include/linux/time_compat.h \
$(top_srcdir)/include/linux/uaccess_compat.h \
$(top_srcdir)/include/linux/zlib_compat.h $(top_srcdir)/include/linux/zlib_compat.h
USER_H = USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
@CONFIG_KERNEL_TRUE@kerneldir = /usr/src/spl-$(VERSION)/include/linux @CONFIG_KERNEL_TRUE@kerneldir = @prefix@/src/spl-$(VERSION)/include/linux
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H) @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H)
all: all-am all: all-am
@ -347,9 +344,7 @@ uninstall-kernelHEADERS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \ @list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \ dir='$(DESTDIR)$(kerneldir)'; $(am__uninstall_files_from_dir)
echo " ( cd '$(DESTDIR)$(kerneldir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(kerneldir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@ -450,10 +445,15 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:

View File

@ -27,17 +27,5 @@
#include <linux/bitops.h> #include <linux/bitops.h>
#ifndef HAVE_FLS64
static inline int fls64(__u64 x)
{
__u32 h = x >> 32;
if (h)
return fls(h) + 32;
return fls(x);
}
#endif /* HAVE_FLS64 */
#endif /* _SPL_BITOPS_COMPAT_H */ #endif /* _SPL_BITOPS_COMPAT_H */

View File

@ -1,5 +1,5 @@
/*****************************************************************************\ /*****************************************************************************\
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007-2013 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California. * Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>. * Written by Brian Behlendorf <behlendorf1@llnl.gov>.
@ -22,19 +22,26 @@
* with the SPL. If not, see <http://www.gnu.org/licenses/>. * with the SPL. If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/ \*****************************************************************************/
#ifndef _SPL_SMP_COMPAT_H #ifndef _SPL_DELAY_COMPAT_H
#define _SPL_SMP_COMPAT_H #define _SPL_DELAY_COMPAT_H
#include <linux/smp.h> #include <linux/delay.h>
#include <linux/time.h>
#ifdef HAVE_3ARGS_ON_EACH_CPU /* usleep_range() introduced in 2.6.36 */
#ifndef HAVE_USLEEP_RANGE
#define spl_on_each_cpu(func,info,wait) on_each_cpu(func,info,wait) static inline void
usleep_range(unsigned long min, unsigned long max)
{
unsigned int min_ms = min / USEC_PER_MSEC;
#else if (min >= MAX_UDELAY_MS)
msleep(min_ms);
else
udelay(min);
}
#define spl_on_each_cpu(func,info,wait) on_each_cpu(func,info,0,wait) #endif /* HAVE_USLEEP_RANGE */
#endif /* HAVE_3ARGS_ON_EACH_CPU */ #endif /* _SPL_DELAY_COMPAT_H */
#endif /* _SPL_SMP_COMPAT_H */

View File

@ -59,55 +59,25 @@ spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len)
if (fp->f_op->fallocate) if (fp->f_op->fallocate)
error = fp->f_op->fallocate(fp, mode, offset, len); error = fp->f_op->fallocate(fp, mode, offset, len);
#else #else
# ifdef HAVE_INODE_FALLOCATE #ifdef HAVE_INODE_FALLOCATE
if (fp->f_dentry && fp->f_dentry->d_inode && if (fp->f_dentry && fp->f_dentry->d_inode &&
fp->f_dentry->d_inode->i_op->fallocate) fp->f_dentry->d_inode->i_op->fallocate)
error = fp->f_dentry->d_inode->i_op->fallocate( error = fp->f_dentry->d_inode->i_op->fallocate(
fp->f_dentry->d_inode, mode, offset, len); fp->f_dentry->d_inode, mode, offset, len);
# endif /* HAVE_INODE_FALLOCATE */ #endif /* HAVE_INODE_FALLOCATE */
#endif /*HAVE_FILE_FALLOCATE */ #endif /*HAVE_FILE_FALLOCATE */
return (error); return (error);
} }
#ifdef HAVE_VFS_FSYNC #ifdef HAVE_2ARGS_VFS_FSYNC
# ifdef HAVE_2ARGS_VFS_FSYNC #define spl_filp_fsync(fp, sync) vfs_fsync(fp, sync)
# define spl_filp_fsync(fp, sync) vfs_fsync(fp, sync)
# else
# define spl_filp_fsync(fp, sync) vfs_fsync(fp, (fp)->f_dentry, sync)
# endif /* HAVE_2ARGS_VFS_FSYNC */
#else #else
# include <linux/buffer_head.h> #define spl_filp_fsync(fp, sync) vfs_fsync(fp, (fp)->f_dentry, sync)
# define spl_filp_fsync(fp, sync) file_fsync(fp, (fp)->f_dentry, sync) #endif /* HAVE_2ARGS_VFS_FSYNC */
#endif /* HAVE_VFS_FSYNC */
#ifdef HAVE_INODE_I_MUTEX #define spl_inode_lock(ip) mutex_lock(&(ip)->i_mutex)
#define spl_inode_lock(ip) (mutex_lock(&(ip)->i_mutex)) #define spl_inode_unlock(ip) mutex_unlock(&(ip)->i_mutex)
#define spl_inode_lock_nested(ip, type) (mutex_lock_nested((&(ip)->i_mutex), \
(type)))
#define spl_inode_unlock(ip) (mutex_unlock(&(ip)->i_mutex))
#else
#define spl_inode_lock(ip) (down(&(ip)->i_sem))
#define spl_inode_unlock(ip) (up(&(ip)->i_sem))
#endif /* HAVE_INODE_I_MUTEX */
#ifdef HAVE_KERN_PATH_PARENT_HEADER
# ifndef HAVE_KERN_PATH_PARENT_SYMBOL
typedef int (*kern_path_parent_t)(const char *, struct nameidata *);
extern kern_path_parent_t kern_path_parent_fn;
# define spl_kern_path_parent(path, nd) kern_path_parent_fn(path, nd)
# else
# define spl_kern_path_parent(path, nd) kern_path_parent(path, nd)
# endif /* HAVE_KERN_PATH_PARENT_SYMBOL */
#else
# define spl_kern_path_parent(path, nd) path_lookup(path, LOOKUP_PARENT, nd)
#endif /* HAVE_KERN_PATH_PARENT_HEADER */
#ifdef HAVE_KERN_PATH_LOCKED
typedef struct dentry * (*kern_path_locked_t)(const char *, struct path *);
extern kern_path_locked_t kern_path_locked_fn;
# define spl_kern_path_locked(name, path) kern_path_locked_fn(name, path)
#endif /* HAVE_KERN_PATH_LOCKED */
#endif /* SPL_FILE_COMPAT_H */ #endif /* SPL_FILE_COMPAT_H */

View File

@ -1,44 +0,0 @@
/*****************************************************************************\
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/
#ifndef _SPL_KALLSYMS_COMPAT_H
#define _SPL_KALLSYMS_COMPAT_H
#define SYMBOL_POISON ((void*)0xabcddcba)
#ifdef HAVE_KALLSYMS_LOOKUP_NAME
#include <linux/kallsyms.h>
#define spl_kallsyms_lookup_name(name) kallsyms_lookup_name(name)
#else
extern wait_queue_head_t spl_kallsyms_lookup_name_waitq;
typedef unsigned long (*kallsyms_lookup_name_t)(const char *);
extern kallsyms_lookup_name_t spl_kallsyms_lookup_name_fn;
#define spl_kallsyms_lookup_name(name) spl_kallsyms_lookup_name_fn(name)
#endif /* HAVE_KALLSYMS_LOOKUP_NAME */
#endif /* _SPL_KALLSYMS_COMPAT_H */

View File

@ -28,22 +28,6 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/fs.h> #include <linux/fs.h>
/*
* Linux 2.6.31 API Change.
* Individual pages_{min,low,high} moved in to watermark array.
*/
#ifndef min_wmark_pages
#define min_wmark_pages(z) (z->pages_min)
#endif
#ifndef low_wmark_pages
#define low_wmark_pages(z) (z->pages_low)
#endif
#ifndef high_wmark_pages
#define high_wmark_pages(z) (z->pages_high)
#endif
#if !defined(HAVE_SHRINK_CONTROL_STRUCT) #if !defined(HAVE_SHRINK_CONTROL_STRUCT)
struct shrink_control { struct shrink_control {
gfp_t gfp_mask; gfp_t gfp_mask;
@ -52,203 +36,174 @@ struct shrink_control {
#endif /* HAVE_SHRINK_CONTROL_STRUCT */ #endif /* HAVE_SHRINK_CONTROL_STRUCT */
/* /*
* 2.6.xx API compat, * Due to frequent changes in the shrinker API the following
* There currently exists no exposed API to partially shrink the dcache. * compatibility wrappers should be used. They are as follows:
* The expected mechanism to shrink the cache is a registered shrinker *
* which is called during memory pressure. * SPL_SHRINKER_DECLARE is used to declare the shrinker which is
* passed to spl_register_shrinker()/spl_unregister_shrinker(). Use
* shrinker_name to set the shrinker variable name, shrinker_callback
* to set the callback function, and seek_cost to define the cost of
* reclaiming an object.
*
* SPL_SHRINKER_DECLARE(shrinker_name, shrinker_callback, seek_cost);
*
* SPL_SHRINKER_CALLBACK_FWD_DECLARE is used when a forward declaration
* of the shrinker callback function is required. Only the callback
* function needs to be passed.
*
* SPL_SHRINKER_CALLBACK_FWD_DECLARE(shrinker_callback);
*
* SPL_SHRINKER_CALLBACK_WRAPPER is used to declare the callback function
* which is registered with the shrinker. This function will call your
* custom shrinker which must use the following prototype. Notice the
* leading __'s, these must be appended to the callback_function name.
*
* int __shrinker_callback(struct shrinker *, struct shrink_control *)
* SPL_SHRINKER_CALLBACK_WRAPPER(shrinker_callback);a
*
*
* Example:
*
* SPL_SHRINKER_CALLBACK_FWD_DECLARE(my_shrinker_fn);
* SPL_SHRINKER_DECLARE(my_shrinker, my_shrinker_fn, 1);
*
* static int
* __my_shrinker_fn(struct shrinker *shrink, struct shrink_control *sc)
* {
* if (sc->nr_to_scan) {
* ...scan objects in the cache and reclaim them...
* }
*
* ...calculate number of objects in the cache...
*
* return (number of objects in the cache);
* }
* SPL_SHRINKER_CALLBACK_WRAPPER(my_shrinker_fn);
*/ */
#ifndef HAVE_SHRINK_DCACHE_MEMORY
# if defined(HAVE_SHRINK_CONTROL_STRUCT) #define spl_register_shrinker(x) register_shrinker(x)
typedef int (*shrink_dcache_memory_t)(struct shrinker *, #define spl_unregister_shrinker(x) unregister_shrinker(x)
struct shrink_control *);
extern shrink_dcache_memory_t shrink_dcache_memory_fn;
# define shrink_dcache_memory(nr, gfp) \
({ \
struct shrink_control sc = { .nr_to_scan = nr, .gfp_mask = gfp }; \
int __ret__ = 0; \
\
if (shrink_dcache_memory_fn) \
__ret__ = shrink_dcache_memory_fn(NULL, &sc); \
\
__ret__; \
})
# elif defined(HAVE_3ARGS_SHRINKER_CALLBACK)
typedef int (*shrink_dcache_memory_t)(struct shrinker *, int, gfp_t);
extern shrink_dcache_memory_t shrink_dcache_memory_fn;
# define shrink_dcache_memory(nr, gfp) \
({ \
int __ret__ = 0; \
\
if (shrink_dcache_memory_fn) \
__ret__ = shrink_dcache_memory_fn(NULL, nr, gfp); \
\
__ret__; \
})
# else
typedef int (*shrink_dcache_memory_t)(int, gfp_t);
extern shrink_dcache_memory_t shrink_dcache_memory_fn;
# define shrink_dcache_memory(nr, gfp) \
({ \
int __ret__ = 0; \
\
if (shrink_dcache_memory_fn) \
__ret__ = shrink_dcache_memory_fn(nr, gfp); \
\
__ret__; \
})
# endif /* HAVE_3ARGS_SHRINKER_CALLBACK */
#endif /* HAVE_SHRINK_DCACHE_MEMORY */
/* /*
* 2.6.xx API compat, * Linux 2.6.23 - 2.6.34 Shrinker API Compatibility.
* There currently exists no exposed API to partially shrink the icache.
* The expected mechanism to shrink the cache is a registered shrinker
* which is called during memory pressure.
*/ */
#ifndef HAVE_SHRINK_ICACHE_MEMORY #if defined(HAVE_2ARGS_OLD_SHRINKER_CALLBACK)
# if defined(HAVE_SHRINK_CONTROL_STRUCT) #define SPL_SHRINKER_DECLARE(s, x, y) \
typedef int (*shrink_icache_memory_t)(struct shrinker *, static struct shrinker s = { \
struct shrink_control *); .shrink = x, \
extern shrink_icache_memory_t shrink_icache_memory_fn; .seeks = y \
# define shrink_icache_memory(nr, gfp) \ }
({ \
struct shrink_control sc = { .nr_to_scan = nr, .gfp_mask = gfp }; \ #define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \
int __ret__ = 0; \ static int fn(int nr_to_scan, unsigned int gfp_mask)
\
if (shrink_icache_memory_fn) \ #define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \
__ret__ = shrink_icache_memory_fn(NULL, &sc); \ static int \
\ fn(int nr_to_scan, unsigned int gfp_mask) \
__ret__; \ { \
}) struct shrink_control sc; \
# elif defined(HAVE_3ARGS_SHRINKER_CALLBACK) \
typedef int (*shrink_icache_memory_t)(struct shrinker *, int, gfp_t); sc.nr_to_scan = nr_to_scan; \
extern shrink_icache_memory_t shrink_icache_memory_fn; sc.gfp_mask = gfp_mask; \
# define shrink_icache_memory(nr, gfp) \ \
({ \ return (__ ## fn(NULL, &sc)); \
int __ret__ = 0; \ }
\
if (shrink_icache_memory_fn) \
__ret__ = shrink_icache_memory_fn(NULL, nr, gfp); \
\
__ret__; \
})
# else
typedef int (*shrink_icache_memory_t)(int, gfp_t);
extern shrink_icache_memory_t shrink_icache_memory_fn;
# define shrink_icache_memory(nr, gfp) \
({ \
int __ret__ = 0; \
\
if (shrink_icache_memory_fn) \
__ret__ = shrink_icache_memory_fn(nr, gfp); \
\
__ret__; \
})
# endif /* HAVE_3ARGS_SHRINKER_CALLBACK */
#endif /* HAVE_SHRINK_ICACHE_MEMORY */
/* /*
* Linux 2.6. - 2.6. Shrinker API Compatibility. * Linux 2.6.35 to 2.6.39 Shrinker API Compatibility.
*/ */
#ifdef HAVE_SET_SHRINKER #elif defined(HAVE_3ARGS_SHRINKER_CALLBACK)
typedef struct spl_shrinker { #define SPL_SHRINKER_DECLARE(s, x, y) \
struct shrinker *shrinker; static struct shrinker s = { \
shrinker_t fn; .shrink = x, \
int seeks; .seeks = y \
} spl_shrinker_t;
static inline void
spl_register_shrinker(spl_shrinker_t *ss)
{
ss->shrinker = set_shrinker(ss->seeks, ss->fn);
} }
static inline void #define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \
spl_unregister_shrinker(spl_shrinker_t *ss) static int fn(struct shrinker *, int, unsigned int)
{
remove_shrinker(ss->shrinker); #define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \
static int \
fn(struct shrinker *shrink, int nr_to_scan, unsigned int gfp_mask) \
{ \
struct shrink_control sc; \
\
sc.nr_to_scan = nr_to_scan; \
sc.gfp_mask = gfp_mask; \
\
return (__ ## fn(shrink, &sc)); \
} }
# define SPL_SHRINKER_DECLARE(s, x, y) \ /*
static spl_shrinker_t s = { \ * Linux 3.0 to 3.11 Shrinker API Compatibility.
.shrinker = NULL, \ */
.fn = x, \ #elif defined(HAVE_2ARGS_NEW_SHRINKER_CALLBACK)
.seeks = y \ #define SPL_SHRINKER_DECLARE(s, x, y) \
} static struct shrinker s = { \
.shrink = x, \
# define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \ .seeks = y \
static int fn(int, unsigned int)
# define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \
static int \
fn(int nr_to_scan, unsigned int gfp_mask) \
{ \
struct shrink_control sc; \
\
sc.nr_to_scan = nr_to_scan; \
sc.gfp_mask = gfp_mask; \
\
return __ ## fn(NULL, &sc); \
} }
#define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \
static int fn(struct shrinker *, struct shrink_control *)
#define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \
static int \
fn(struct shrinker *shrink, struct shrink_control *sc) \
{ \
return (__ ## fn(shrink, sc)); \
}
/*
* Linux 3.12 and later Shrinker API Compatibility.
*/
#elif defined(HAVE_SPLIT_SHRINKER_CALLBACK)
#define SPL_SHRINKER_DECLARE(s, x, y) \
static struct shrinker s = { \
.count_objects = x ## _count_objects, \
.scan_objects = x ## _scan_objects, \
.seeks = y \
}
#define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \
static unsigned long fn ## _count_objects(struct shrinker *, \
struct shrink_control *); \
static unsigned long fn ## _scan_objects(struct shrinker *, \
struct shrink_control *)
#define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \
static unsigned long \
fn ## _count_objects(struct shrinker *shrink, struct shrink_control *sc)\
{ \
int __ret__; \
\
sc->nr_to_scan = 0; \
__ret__ = __ ## fn(NULL, sc); \
\
/* Errors may not be returned and must be converted to zeros */ \
return ((__ret__ < 0) ? 0 : __ret__); \
} \
\
static unsigned long \
fn ## _scan_objects(struct shrinker *shrink, struct shrink_control *sc) \
{ \
int __ret__; \
\
__ret__ = __ ## fn(NULL, sc); \
return ((__ret__ < 0) ? SHRINK_STOP : __ret__); \
}
#else #else
# define spl_register_shrinker(x) register_shrinker(x)
# define spl_unregister_shrinker(x) unregister_shrinker(x)
# define SPL_SHRINKER_DECLARE(s, x, y) \
static struct shrinker s = { \
.shrink = x, \
.seeks = y \
}
/* /*
* Linux 2.6. - 2.6. Shrinker API Compatibility. * Linux 2.x to 2.6.22, or a newer shrinker API has been introduced.
*/ */
# if defined(HAVE_SHRINK_CONTROL_STRUCT) #error "Unknown shrinker callback"
# define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \ #endif
static int fn(struct shrinker *, struct shrink_control *)
# define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \
static int \
fn(struct shrinker *shrink, struct shrink_control *sc) { \
return __ ## fn(shrink, sc); \
}
/* #if defined(HAVE_SPLIT_SHRINKER_CALLBACK)
* Linux 2.6. - 2.6. Shrinker API Compatibility. typedef unsigned long spl_shrinker_t;
*/ #else
# elif defined(HAVE_3ARGS_SHRINKER_CALLBACK) typedef int spl_shrinker_t;
# define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \ #define SHRINK_STOP (-1)
static int fn(struct shrinker *, int, unsigned int) #endif
# define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \
static int \
fn(struct shrinker *shrink, int nr_to_scan, unsigned int gfp_mask) \
{ \
struct shrink_control sc; \
\
sc.nr_to_scan = nr_to_scan; \
sc.gfp_mask = gfp_mask; \
\
return __ ## fn(shrink, &sc); \
}
/*
* Linux 2.6. - 2.6. Shrinker API Compatibility.
*/
# else
# define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \
static int fn(int, unsigned int)
# define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \
static int \
fn(int nr_to_scan, unsigned int gfp_mask) \
{ \
struct shrink_control sc; \
\
sc.nr_to_scan = nr_to_scan; \
sc.gfp_mask = gfp_mask; \
\
return __ ## fn(NULL, &sc); \
}
# endif
#endif /* HAVE_SET_SHRINKER */
#endif /* SPL_MM_COMPAT_H */ #endif /* SPL_MM_COMPAT_H */

View File

@ -1,59 +0,0 @@
/*****************************************************************************\
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/
#ifndef _SPL_MODULE_COMPAT_H
#define _SPL_MODULE_COMPAT_H
#include <linux/module.h>
#define spl_module_init(init_fn) \
static int \
spl_##init_fn(void) \
{ \
int rc; \
\
spl_setup(); \
rc = init_fn(); \
\
return rc; \
} \
\
module_init(spl_##init_fn)
#define spl_module_exit(exit_fn) \
static void \
spl_##exit_fn(void) \
{ \
int rc; \
\
rc = exit_fn(); \
spl_cleanup(); \
if (rc) \
printk(KERN_ERR "SPL: Failure %d unloading " \
"dependent module\n", rc); \
} \
\
module_exit(spl_##exit_fn)
#endif /* _SPL_MODULE_COMPAT_H */

View File

@ -1,36 +0,0 @@
/*****************************************************************************\
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/
#ifndef _SPL_MUTEX_COMPAT_H
#define _SPL_MUTEX_COMPAT_H
#include <linux/mutex.h>
/* mutex_lock_nested() introduced in 2.6.18 */
#ifndef HAVE_MUTEX_LOCK_NESTED
# define mutex_lock_nested(lock, subclass) mutex_lock(lock)
#endif /* HAVE_MUTEX_LOCK_NESTED */
#endif /* _SPL_MUTEX_COMPAT_H */

View File

@ -22,29 +22,14 @@
* with the SPL. If not, see <http://www.gnu.org/licenses/>. * with the SPL. If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/ \*****************************************************************************/
#ifndef _SPL_PROC_H #ifndef _SPL_PROC_COMPAT_H
#define _SPL_PROC_H #define _SPL_PROC_COMPAT_H
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#ifdef CONFIG_SYSCTL
#ifdef HAVE_2ARGS_REGISTER_SYSCTL
#define spl_register_sysctl_table(t, a) register_sysctl_table(t, a)
#else
#define spl_register_sysctl_table(t, a) register_sysctl_table(t)
#endif /* HAVE_2ARGS_REGISTER_SYSCTL */
#define spl_unregister_sysctl_table(t) unregister_sysctl_table(t)
#endif /* CONFIG_SYSCTL */
#ifdef HAVE_CTL_NAME
#define CTL_NAME(cname) .ctl_name = (cname),
#else
#define CTL_NAME(cname)
#endif
extern struct proc_dir_entry *proc_spl_kstat; extern struct proc_dir_entry *proc_spl_kstat;
int spl_proc_init(void); int spl_proc_init(void);
void spl_proc_fini(void); void spl_proc_fini(void);
#endif /* SPL_PROC_H */ #endif /* SPL_PROC_COMPAT_H */

View File

@ -1,96 +0,0 @@
/*****************************************************************************\
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/
#ifndef _SPL_SYSCTL_COMPAT_H
#define _SPL_SYSCTL_COMPAT_H
#include <linux/sysctl.h>
/* proc_handler() / proc_do* API changes
* 2.6.x - 2.6.31: 6 args, prototype includes 'struct file *'
* 2.6.32 - 2.6.y: 5 args, removed unused 'struct file *' from prototype
*
* Generic SPL_PROC_HANDLER() macro should be used for correct prototypes.
* It will define the following function arguments which can and should be
* used with the spl_proc_* helper macros.
*
* struct ctl_table *table,
* int write,
* struct file *filp [2.6.31 and earlier kernels],
* void __user *buffer,
* size_t *lenp,
* loff_t *ppos,
*/
#ifdef HAVE_5ARGS_PROC_HANDLER
#define SPL_PROC_HANDLER(proc_handler) \
static int \
proc_handler(struct ctl_table *table, int write, \
void __user *buffer, size_t *lenp, loff_t *ppos)
#define spl_proc_dostring(table, write, filp, buffer, lenp, ppos) \
proc_dostring(table, write, buffer, lenp, ppos)
#define spl_proc_dointvec(table, write, filp, buffer, lenp, ppos) \
proc_dointvec(table, write, buffer, lenp, ppos)
#define spl_proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos) \
proc_dointvec_minmax(table, write, buffer, lenp, ppos)
#define spl_proc_dointvec_jiffies(table, write, filp, buffer, lenp, ppos) \
proc_dointvec_jiffies(table, write, buffer, lenp, ppos)
#define spl_proc_dointvec_userhz_jiffies(table,write,filp,buffer,lenp,ppos) \
proc_dointvec_userhz_jiffies(table, write, buffer, lenp, ppos)
#define spl_proc_dointvec_ms_jiffies(table,write,filp,buffer,lenp,ppos) \
proc_dointvec_ms_jiffies(table, write, buffer, lenp, ppos)
#define spl_proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos) \
proc_doulongvec_minmax(table, write, buffer, lenp, ppos)
#define spl_proc_doulongvec_ms_jiffies_minmax(table,write,filp,buffer,lenp,ppos)\
proc_doulongvec_ms_jiffies_minmax(table, write, buffer, lenp, ppos)
#else /* HAVE_5ARGS_PROC_HANDLER */
#define SPL_PROC_HANDLER(proc_handler) \
static int \
proc_handler(struct ctl_table *table, int write, struct file *filp, \
void __user *buffer, size_t *lenp, loff_t *ppos)
#define spl_proc_dostring(table, write, filp, buffer, lenp, ppos) \
proc_dostring(table, write, filp, buffer, lenp, ppos)
#define spl_proc_dointvec(table, write, filp, buffer, lenp, ppos) \
proc_dointvec(table, write, filp, buffer, lenp, ppos)
#define spl_proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos) \
proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos)
#define spl_proc_dointvec_jiffies(table, write, filp, buffer, lenp, ppos) \
proc_dointvec_jiffies(table, write, filp, buffer, lenp, ppos)
#define spl_proc_dointvec_userhz_jiffies(table,write,filp,buffer,lenp,ppos) \
proc_dointvec_userhz_jiffies(table, write, filp, buffer, lenp, ppos)
#define spl_proc_dointvec_ms_jiffies(table, write, filp, buffer, lenp, ppos) \
proc_dointvec_ms_jiffies(table, write, filp, buffer, lenp, ppos)
#define spl_proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos) \
proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos)
#define spl_proc_doulongvec_ms_jiffies_minmax(table,write,filp,buffer,lenp,ppos) \
proc_doulongvec_ms_jiffies_minmax(table,write,filp,buffer,lenp,ppos)
#endif /* HAVE_5ARGS_PROC_HANDLER */
#endif /* _SPL_SYSCTL_COMPAT_H */

View File

@ -1,45 +0,0 @@
/*****************************************************************************\
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/
#ifndef _SPL_TIME_COMPAT_H
#define _SPL_TIME_COMPAT_H
#include <linux/time.h>
/* timespec_sub() API changes
* 2.6.18 - 2.6.x: Inline function provided by linux/time.h
*/
#ifndef HAVE_TIMESPEC_SUB
static inline struct timespec
timespec_sub(struct timespec lhs, struct timespec rhs)
{
struct timespec ts_delta;
set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec,
lhs.tv_nsec - rhs.tv_nsec);
return ts_delta;
}
#endif /* HAVE_TIMESPEC_SUB */
#endif /* _SPL_TIME_COMPAT_H */

View File

@ -1,5 +1,5 @@
/*****************************************************************************\ /*****************************************************************************\
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007-2014 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California. * Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>. * Written by Brian Behlendorf <behlendorf1@llnl.gov>.
@ -22,14 +22,25 @@
* with the SPL. If not, see <http://www.gnu.org/licenses/>. * with the SPL. If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/ \*****************************************************************************/
#ifndef _SPL_UACCESS_COMPAT_H #ifndef _SPL_WAIT_COMPAT_H
#define _SPL_UACCESS_COMPAT_H #define _SPL_WAIT_COMPAT_H
#ifdef HAVE_UACCESS_HEADER #include <linux/sched.h>
#include <linux/uaccess.h>
#ifndef HAVE_WAIT_ON_BIT_ACTION
# define spl_wait_on_bit(word, bit, mode) wait_on_bit(word, bit, mode)
#else #else
#include <asm/uaccess.h>
#endif
#endif /* _SPL_UACCESS_COMPAT_H */ static inline int
spl_bit_wait(void *word)
{
schedule();
return 0;
}
#define spl_wait_on_bit(word, bit, mode) \
wait_on_bit(word, bit, spl_bit_wait, mode)
#endif /* HAVE_WAIT_ON_BIT_ACTION */
#endif /* SPL_WAIT_COMPAT_H */

View File

@ -9,6 +9,6 @@ USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL if CONFIG_KERNEL
kerneldir = /usr/src/spl-$(VERSION)/include/rpc kerneldir = @prefix@/src/spl-$(VERSION)/include/rpc
kernel_HEADERS = $(KERNEL_H) kernel_HEADERS = $(KERNEL_H)
endif endif

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -52,11 +52,11 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_HEADER = $(top_builddir)/spl_config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
@ -83,6 +83,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(kerneldir)" am__installdirs = "$(DESTDIR)$(kerneldir)"
HEADERS = $(kernel_HEADERS) HEADERS = $(kernel_HEADERS)
ETAGS = etags ETAGS = etags
@ -107,11 +113,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -142,7 +148,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -152,6 +157,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -185,6 +191,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -202,6 +209,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -234,7 +242,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -261,7 +268,7 @@ KERNEL_H = \
USER_H = USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
@CONFIG_KERNEL_TRUE@kerneldir = /usr/src/spl-$(VERSION)/include/rpc @CONFIG_KERNEL_TRUE@kerneldir = @prefix@/src/spl-$(VERSION)/include/rpc
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H) @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H)
all: all-am all: all-am
@ -319,9 +326,7 @@ uninstall-kernelHEADERS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \ @list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \ dir='$(DESTDIR)$(kerneldir)'; $(am__uninstall_files_from_dir)
echo " ( cd '$(DESTDIR)$(kerneldir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(kerneldir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@ -422,10 +427,15 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:

View File

@ -8,6 +8,6 @@ USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL if CONFIG_KERNEL
kerneldir = /usr/src/spl-$(VERSION)/include/sharefs kerneldir = @prefix@/src/spl-$(VERSION)/include/sharefs
kernel_HEADERS = $(KERNEL_H) kernel_HEADERS = $(KERNEL_H)
endif endif

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -52,11 +52,11 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_HEADER = $(top_builddir)/spl_config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
@ -82,6 +82,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(kerneldir)" am__installdirs = "$(DESTDIR)$(kerneldir)"
HEADERS = $(kernel_HEADERS) HEADERS = $(kernel_HEADERS)
ETAGS = etags ETAGS = etags
@ -106,11 +112,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -141,7 +147,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -151,6 +156,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -184,6 +190,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -201,6 +208,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -233,7 +241,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -259,7 +266,7 @@ KERNEL_H = \
USER_H = USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
@CONFIG_KERNEL_TRUE@kerneldir = /usr/src/spl-$(VERSION)/include/sharefs @CONFIG_KERNEL_TRUE@kerneldir = @prefix@/src/spl-$(VERSION)/include/sharefs
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H) @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H)
all: all-am all: all-am
@ -317,9 +324,7 @@ uninstall-kernelHEADERS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \ @list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \ dir='$(DESTDIR)$(kerneldir)'; $(am__uninstall_files_from_dir)
echo " ( cd '$(DESTDIR)$(kerneldir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(kerneldir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@ -420,10 +425,15 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:

View File

@ -1,276 +0,0 @@
/*****************************************************************************\
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/
/*
* Available debug functions. These function should be used by any
* package which needs to integrate with the SPL log infrastructure.
*
* SDEBUG() - Log debug message with specified mask.
* SDEBUG_LIMIT() - Log just 1 debug message with specified mask.
* SWARN() - Log a warning message.
* SERROR() - Log an error message.
* SEMERG() - Log an emergency error message.
* SCONSOLE() - Log a generic message to the console.
*
* SENTRY - Log entry point to a function.
* SEXIT - Log exit point from a function.
* SRETURN(x) - Log return from a function.
* SGOTO(x, y) - Log goto within a function.
*/
#ifndef _SPL_DEBUG_INTERNAL_H
#define _SPL_DEBUG_INTERNAL_H
#include <linux/limits.h>
#include <linux/sched.h>
#define SS_UNDEFINED 0x00000001
#define SS_ATOMIC 0x00000002
#define SS_KOBJ 0x00000004
#define SS_VNODE 0x00000008
#define SS_TIME 0x00000010
#define SS_RWLOCK 0x00000020
#define SS_THREAD 0x00000040
#define SS_CONDVAR 0x00000080
#define SS_MUTEX 0x00000100
#define SS_RNG 0x00000200
#define SS_TASKQ 0x00000400
#define SS_KMEM 0x00000800
#define SS_DEBUG 0x00001000
#define SS_GENERIC 0x00002000
#define SS_PROC 0x00004000
#define SS_MODULE 0x00008000
#define SS_CRED 0x00010000
#define SS_KSTAT 0x00020000
#define SS_XDR 0x00040000
#define SS_TSD 0x00080000
#define SS_ZLIB 0x00100000
#define SS_USER1 0x01000000
#define SS_USER2 0x02000000
#define SS_USER3 0x04000000
#define SS_USER4 0x08000000
#define SS_USER5 0x10000000
#define SS_USER6 0x20000000
#define SS_USER7 0x40000000
#define SS_USER8 0x80000000
#define SS_DEBUG_SUBSYS SS_UNDEFINED
#define SD_TRACE 0x00000001
#define SD_INFO 0x00000002
#define SD_WARNING 0x00000004
#define SD_ERROR 0x00000008
#define SD_EMERG 0x00000010
#define SD_CONSOLE 0x00000020
#define SD_IOCTL 0x00000040
#define SD_DPRINTF 0x00000080
#define SD_OTHER 0x00000100
#define SD_CANTMASK (SD_ERROR | SD_EMERG | SD_WARNING | SD_CONSOLE)
/* Debug log support enabled */
#ifdef DEBUG_LOG
#define __SDEBUG(cdls, subsys, mask, format, a...) \
do { \
if (((mask) & SD_CANTMASK) != 0 || \
((spl_debug_mask & (mask)) != 0 && \
(spl_debug_subsys & (subsys)) != 0)) \
spl_debug_msg(cdls, subsys, mask, __FILE__, \
__FUNCTION__, __LINE__, format, ## a); \
} while (0)
#define SDEBUG(mask, format, a...) \
__SDEBUG(NULL, SS_DEBUG_SUBSYS, mask, format, ## a)
#define __SDEBUG_LIMIT(subsys, mask, format, a...) \
do { \
static spl_debug_limit_state_t cdls; \
\
__SDEBUG(&cdls, subsys, mask, format, ## a); \
} while (0)
#define SDEBUG_LIMIT(mask, format, a...) \
__SDEBUG_LIMIT(SS_DEBUG_SUBSYS, mask, format, ## a)
#define SWARN(fmt, a...) SDEBUG_LIMIT(SD_WARNING, fmt, ## a)
#define SERROR(fmt, a...) SDEBUG_LIMIT(SD_ERROR, fmt, ## a)
#define SEMERG(fmt, a...) SDEBUG_LIMIT(SD_EMERG, fmt, ## a)
#define SCONSOLE(mask, fmt, a...) SDEBUG(SD_CONSOLE | (mask), fmt, ## a)
#define SENTRY SDEBUG(SD_TRACE, "Process entered\n")
#define SEXIT SDEBUG(SD_TRACE, "Process leaving\n")
#define SRETURN(rc) \
do { \
typeof(rc) RETURN__ret = (rc); \
SDEBUG(SD_TRACE, "Process leaving (rc=%lu : %ld : %lx)\n", \
(long)RETURN__ret, (long)RETURN__ret, (long)RETURN__ret); \
return RETURN__ret; \
} while (0)
#define SGOTO(label, rc) \
do { \
long GOTO__ret = (long)(rc); \
SDEBUG(SD_TRACE,"Process leaving via %s (rc=%lu : %ld : %lx)\n",\
#label, (unsigned long)GOTO__ret, (signed long)GOTO__ret, \
(signed long)GOTO__ret); \
goto label; \
} while (0)
typedef struct {
unsigned long cdls_next;
int cdls_count;
long cdls_delay;
} spl_debug_limit_state_t;
/* Global debug variables */
extern unsigned long spl_debug_subsys;
extern unsigned long spl_debug_mask;
extern unsigned long spl_debug_printk;
extern int spl_debug_mb;
extern unsigned int spl_debug_binary;
extern unsigned int spl_debug_catastrophe;
extern unsigned int spl_debug_panic_on_bug;
extern char spl_debug_file_path[PATH_MAX];
extern unsigned int spl_console_ratelimit;
extern long spl_console_max_delay;
extern long spl_console_min_delay;
extern unsigned int spl_console_backoff;
extern unsigned int spl_debug_stack;
/* Exported debug functions */
extern int spl_debug_mask2str(char *str, int size, unsigned long mask, int ss);
extern int spl_debug_str2mask(unsigned long *mask, const char *str, int ss);
extern unsigned long spl_debug_set_mask(unsigned long mask);
extern unsigned long spl_debug_get_mask(void);
extern unsigned long spl_debug_set_subsys(unsigned long mask);
extern unsigned long spl_debug_get_subsys(void);
extern int spl_debug_set_mb(int mb);
extern int spl_debug_get_mb(void);
extern int spl_debug_dumplog(int flags);
extern void spl_debug_dumpstack(struct task_struct *tsk);
extern void spl_debug_bug(char *file, const char *fn, const int line, int fl);
extern int spl_debug_msg(void *arg, int subsys, int mask, const char *file,
const char *fn, const int line, const char *format, ...);
extern int spl_debug_clear_buffer(void);
extern int spl_debug_mark_buffer(char *text);
int spl_debug_init(void);
void spl_debug_fini(void);
/* Debug log support disabled */
#else /* DEBUG_LOG */
#define __SDEBUG(x, y, mask, fmt, a...) ((void)0)
#define SDEBUG(mask, fmt, a...) ((void)0)
#define SDEBUG_LIMIT(x, y, fmt, a...) ((void)0)
#define SWARN(fmt, a...) ((void)0)
#define SERROR(fmt, a...) ((void)0)
#define SEMERG(fmt, a...) ((void)0)
#define SCONSOLE(mask, fmt, a...) ((void)0)
#define SENTRY ((void)0)
#define SEXIT ((void)0)
#define SRETURN(x) return (x)
#define SGOTO(x, y) { ((void)(y)); goto x; }
static inline unsigned long
spl_debug_set_mask(unsigned long mask) {
return (0);
}
static inline unsigned long
spl_debug_get_mask(void) {
return (0);
}
static inline unsigned long
spl_debug_set_subsys(unsigned long mask) {
return (0);
}
static inline unsigned long
spl_debug_get_subsys(void) {
return (0);
}
static inline int
spl_debug_set_mb(int mb) {
return (0);
}
static inline int
spl_debug_get_mb(void) {
return (0);
}
static inline int
spl_debug_dumplog(int flags)
{
return (0);
}
static inline void
spl_debug_dumpstack(struct task_struct *tsk)
{
return;
}
static inline void
spl_debug_bug(char *file, const char *fn, const int line, int fl)
{
return;
}
static inline int
spl_debug_msg(void *arg, int subsys, int mask, const char *file,
const char *fn, const int line, const char *format, ...)
{
return (0);
}
static inline int
spl_debug_clear_buffer(void)
{
return (0);
}
static inline int
spl_debug_mark_buffer(char *text)
{
return (0);
}
static inline int
spl_debug_init(void) {
return (0);
}
static inline void
spl_debug_fini(void) {
return;
}
#endif /* DEBUG_LOG */
#endif /* SPL_DEBUG_INTERNAL_H */

View File

@ -1,90 +0,0 @@
/*****************************************************************************\
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/
#ifndef _SPL_DEVICE_H
#define _SPL_DEVICE_H
#include <linux/device.h>
/*
* Preferred API from 2.6.18 to 2.6.26+
*/
#ifdef HAVE_DEVICE_CREATE
typedef struct class spl_class;
typedef struct device spl_device;
#define spl_class_create(mod, name) class_create(mod, name)
#define spl_class_destroy(cls) class_destroy(cls)
# ifdef HAVE_5ARGS_DEVICE_CREATE
# define spl_device_create(cls, parent, devt, drvdata, fmt, args...) \
device_create(cls, parent, devt, drvdata, fmt, ## args)
# else
# define spl_device_create(cls, parent, devt, drvdata, fmt, args...) \
device_create(cls, parent, devt, fmt, ## args)
# endif
#define spl_device_destroy(cls, cls_dev, devt) \
device_destroy(cls, devt)
/*
* Preferred API from 2.6.13 to 2.6.17
* Depricated in 2.6.18
* Removed in 2.6.26
*/
#else
#ifdef HAVE_CLASS_DEVICE_CREATE
typedef struct class spl_class;
typedef struct class_device spl_device;
#define spl_class_create(mod, name) class_create(mod, name)
#define spl_class_destroy(cls) class_destroy(cls)
#define spl_device_create(cls, parent, devt, device, fmt, args...) \
class_device_create(cls, parent, devt, device, fmt, ## args)
#define spl_device_destroy(cls, cls_dev, devt) \
class_device_unregister(cls_dev)
/*
* Prefered API from 2.6.0 to 2.6.12
* Depricated in 2.6.13
* Removed in 2.6.13
*/
#else /* Legacy API */
typedef struct class_simple spl_class;
typedef struct class_device spl_class_device;
#define spl_class_create(mod, name) class_simple_create(mod, name)
#define spl_class_destroy(cls) class_simple_destroy(cls)
#define spl_device_create(cls, parent, devt, device, fmt, args...) \
class_simple_device_add(cls, devt, device, fmt, ## args)
#define spl_device_destroy(cls, cls_dev, devt) \
class_simple_device_remove(devt)
#endif /* HAVE_CLASS_DEVICE_CREATE */
#endif /* HAVE_DEVICE_CREATE */
#endif /* _SPL_DEVICE_H */

View File

@ -1,132 +0,0 @@
/*****************************************************************************\
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/
#ifndef _SPL_TRACE_H
#define _SPL_TRACE_H
#define TCD_MAX_PAGES (5 << (20 - PAGE_SHIFT))
#define TCD_STOCK_PAGES (TCD_MAX_PAGES)
#define TRACE_CONSOLE_BUFFER_SIZE 1024
#define SPL_DEFAULT_MAX_DELAY (600 * HZ)
#define SPL_DEFAULT_MIN_DELAY ((HZ + 1) / 2)
#define SPL_DEFAULT_BACKOFF 2
#define DL_NOTHREAD 0x0001 /* Do not create a new thread */
#define DL_SINGLE_CPU 0x0002 /* Collect pages from this CPU*/
typedef struct dumplog_priv {
wait_queue_head_t dp_waitq;
pid_t dp_pid;
int dp_flags;
atomic_t dp_done;
} dumplog_priv_t;
/* Three trace data types */
typedef enum {
TCD_TYPE_PROC,
TCD_TYPE_SOFTIRQ,
TCD_TYPE_IRQ,
TCD_TYPE_MAX
} tcd_type_t;
union trace_data_union {
struct trace_cpu_data {
/* pages with trace records not yet processed by tracefiled */
struct list_head tcd_pages;
/* number of pages on ->tcd_pages */
unsigned long tcd_cur_pages;
/* Max number of pages allowed on ->tcd_pages */
unsigned long tcd_max_pages;
/*
* preallocated pages to write trace records into. Pages from
* ->tcd_stock_pages are moved to ->tcd_pages by spl_debug_msg().
*
* This list is necessary, because on some platforms it's
* impossible to perform efficient atomic page allocation in a
* non-blockable context.
*
* Such platforms fill ->tcd_stock_pages "on occasion", when
* tracing code is entered in blockable context.
*
* trace_get_tage_try() tries to get a page from
* ->tcd_stock_pages first and resorts to atomic page
* allocation only if this queue is empty. ->tcd_stock_pages
* is replenished when tracing code is entered in blocking
* context (darwin-tracefile.c:trace_get_tcd()). We try to
* maintain TCD_STOCK_PAGES (40 by default) pages in this
* queue. Atomic allocation is only required if more than
* TCD_STOCK_PAGES pagesful are consumed by trace records all
* emitted in non-blocking contexts. Which is quite unlikely.
*/
struct list_head tcd_stock_pages;
/* number of pages on ->tcd_stock_pages */
unsigned long tcd_cur_stock_pages;
unsigned short tcd_shutting_down;
unsigned short tcd_cpu;
unsigned short tcd_type;
/* The factors to share debug memory. */
unsigned short tcd_pages_factor;
/*
* This spinlock is needed to workaround the problem of
* set_cpus_allowed() being GPL-only. Since we cannot
* schedule a thread on a specific CPU when dumping the
* pages, we must use the spinlock for mutual exclusion.
*/
spinlock_t tcd_lock;
unsigned long tcd_lock_flags;
} tcd;
char __pad[L1_CACHE_ALIGN(sizeof(struct trace_cpu_data))];
};
extern union trace_data_union (*trace_data[TCD_TYPE_MAX])[NR_CPUS];
#define tcd_for_each(tcd, i, j) \
for (i = 0; i < TCD_TYPE_MAX && trace_data[i]; i++) \
for (j = 0, ((tcd) = &(*trace_data[i])[j].tcd); \
j < num_possible_cpus(); j++, (tcd) = &(*trace_data[i])[j].tcd)
#define tcd_for_each_type_lock(tcd, i, cpu) \
for (i = 0; i < TCD_TYPE_MAX && trace_data[i] && \
(tcd = &(*trace_data[i])[cpu].tcd) && \
trace_lock_tcd(tcd); trace_unlock_tcd(tcd), i++)
struct trace_page {
struct page *page; /* page itself */
struct list_head linkage; /* Used by trace_data_union */
unsigned int used; /* number of bytes used within this page */
unsigned short cpu; /* cpu that owns this page */
unsigned short type; /* type(context) of this page */
};
struct page_collection {
struct list_head pc_pages;
spinlock_t pc_lock;
int pc_want_daemon_pages;
};
#endif /* SPL_TRACE_H */

View File

@ -32,8 +32,6 @@
* ensure 32-bit/64-bit interoperability over ioctl()'s only types with * ensure 32-bit/64-bit interoperability over ioctl()'s only types with
* fixed sizes can be used. * fixed sizes can be used.
*/ */
#define SPLAT_MAJOR 225 /* XXX - Arbitrary */
#define SPLAT_MINORS 1
#define SPLAT_NAME "splatctl" #define SPLAT_NAME "splatctl"
#define SPLAT_DEV "/dev/splatctl" #define SPLAT_DEV "/dev/splatctl"

View File

@ -13,6 +13,7 @@ KERNEL_H = \
$(top_srcdir)/include/sys/buf.h \ $(top_srcdir)/include/sys/buf.h \
$(top_srcdir)/include/sys/byteorder.h \ $(top_srcdir)/include/sys/byteorder.h \
$(top_srcdir)/include/sys/callb.h \ $(top_srcdir)/include/sys/callb.h \
$(top_srcdir)/include/sys/callo.h \
$(top_srcdir)/include/sys/cmn_err.h \ $(top_srcdir)/include/sys/cmn_err.h \
$(top_srcdir)/include/sys/compress.h \ $(top_srcdir)/include/sys/compress.h \
$(top_srcdir)/include/sys/condvar.h \ $(top_srcdir)/include/sys/condvar.h \
@ -43,6 +44,7 @@ KERNEL_H = \
$(top_srcdir)/include/sys/isa_defs.h \ $(top_srcdir)/include/sys/isa_defs.h \
$(top_srcdir)/include/sys/kidmap.h \ $(top_srcdir)/include/sys/kidmap.h \
$(top_srcdir)/include/sys/kmem.h \ $(top_srcdir)/include/sys/kmem.h \
$(top_srcdir)/include/sys/kmem_cache.h \
$(top_srcdir)/include/sys/kobj.h \ $(top_srcdir)/include/sys/kobj.h \
$(top_srcdir)/include/sys/kstat.h \ $(top_srcdir)/include/sys/kstat.h \
$(top_srcdir)/include/sys/list.h \ $(top_srcdir)/include/sys/list.h \
@ -89,11 +91,11 @@ KERNEL_H = \
$(top_srcdir)/include/sys/u8_textprep.h \ $(top_srcdir)/include/sys/u8_textprep.h \
$(top_srcdir)/include/sys/uio.h \ $(top_srcdir)/include/sys/uio.h \
$(top_srcdir)/include/sys/unistd.h \ $(top_srcdir)/include/sys/unistd.h \
$(top_srcdir)/include/sys/utsname.h \
$(top_srcdir)/include/sys/va_list.h \ $(top_srcdir)/include/sys/va_list.h \
$(top_srcdir)/include/sys/varargs.h \ $(top_srcdir)/include/sys/varargs.h \
$(top_srcdir)/include/sys/vfs.h \ $(top_srcdir)/include/sys/vfs.h \
$(top_srcdir)/include/sys/vfs_opreg.h \ $(top_srcdir)/include/sys/vfs_opreg.h \
$(top_srcdir)/include/sys/vmem.h \
$(top_srcdir)/include/sys/vmsystm.h \ $(top_srcdir)/include/sys/vmsystm.h \
$(top_srcdir)/include/sys/vnode.h \ $(top_srcdir)/include/sys/vnode.h \
$(top_srcdir)/include/sys/zmod.h \ $(top_srcdir)/include/sys/zmod.h \
@ -104,7 +106,7 @@ USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL if CONFIG_KERNEL
kerneldir = /usr/src/spl-$(VERSION)/include/sys kerneldir = @prefix@/src/spl-$(VERSION)/include/sys
kernel_HEADERS = $(KERNEL_H) kernel_HEADERS = $(KERNEL_H)
endif endif

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -52,11 +52,11 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_HEADER = $(top_builddir)/spl_config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
@ -77,6 +77,7 @@ am__kernel_HEADERS_DIST = $(top_srcdir)/include/sys/acl.h \
$(top_srcdir)/include/sys/buf.h \ $(top_srcdir)/include/sys/buf.h \
$(top_srcdir)/include/sys/byteorder.h \ $(top_srcdir)/include/sys/byteorder.h \
$(top_srcdir)/include/sys/callb.h \ $(top_srcdir)/include/sys/callb.h \
$(top_srcdir)/include/sys/callo.h \
$(top_srcdir)/include/sys/cmn_err.h \ $(top_srcdir)/include/sys/cmn_err.h \
$(top_srcdir)/include/sys/compress.h \ $(top_srcdir)/include/sys/compress.h \
$(top_srcdir)/include/sys/condvar.h \ $(top_srcdir)/include/sys/condvar.h \
@ -107,6 +108,7 @@ am__kernel_HEADERS_DIST = $(top_srcdir)/include/sys/acl.h \
$(top_srcdir)/include/sys/isa_defs.h \ $(top_srcdir)/include/sys/isa_defs.h \
$(top_srcdir)/include/sys/kidmap.h \ $(top_srcdir)/include/sys/kidmap.h \
$(top_srcdir)/include/sys/kmem.h \ $(top_srcdir)/include/sys/kmem.h \
$(top_srcdir)/include/sys/kmem_cache.h \
$(top_srcdir)/include/sys/kobj.h \ $(top_srcdir)/include/sys/kobj.h \
$(top_srcdir)/include/sys/kstat.h \ $(top_srcdir)/include/sys/kstat.h \
$(top_srcdir)/include/sys/list.h \ $(top_srcdir)/include/sys/list.h \
@ -153,11 +155,11 @@ am__kernel_HEADERS_DIST = $(top_srcdir)/include/sys/acl.h \
$(top_srcdir)/include/sys/u8_textprep.h \ $(top_srcdir)/include/sys/u8_textprep.h \
$(top_srcdir)/include/sys/uio.h \ $(top_srcdir)/include/sys/uio.h \
$(top_srcdir)/include/sys/unistd.h \ $(top_srcdir)/include/sys/unistd.h \
$(top_srcdir)/include/sys/utsname.h \
$(top_srcdir)/include/sys/va_list.h \ $(top_srcdir)/include/sys/va_list.h \
$(top_srcdir)/include/sys/varargs.h \ $(top_srcdir)/include/sys/varargs.h \
$(top_srcdir)/include/sys/vfs.h \ $(top_srcdir)/include/sys/vfs.h \
$(top_srcdir)/include/sys/vfs_opreg.h \ $(top_srcdir)/include/sys/vfs_opreg.h \
$(top_srcdir)/include/sys/vmem.h \
$(top_srcdir)/include/sys/vmsystm.h \ $(top_srcdir)/include/sys/vmsystm.h \
$(top_srcdir)/include/sys/vnode.h \ $(top_srcdir)/include/sys/vnode.h \
$(top_srcdir)/include/sys/zmod.h \ $(top_srcdir)/include/sys/zmod.h \
@ -183,6 +185,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(kerneldir)" am__installdirs = "$(DESTDIR)$(kerneldir)"
HEADERS = $(kernel_HEADERS) HEADERS = $(kernel_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
@ -238,11 +246,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -273,7 +281,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -283,6 +290,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -316,6 +324,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -333,6 +342,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -365,7 +375,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -398,6 +407,7 @@ KERNEL_H = \
$(top_srcdir)/include/sys/buf.h \ $(top_srcdir)/include/sys/buf.h \
$(top_srcdir)/include/sys/byteorder.h \ $(top_srcdir)/include/sys/byteorder.h \
$(top_srcdir)/include/sys/callb.h \ $(top_srcdir)/include/sys/callb.h \
$(top_srcdir)/include/sys/callo.h \
$(top_srcdir)/include/sys/cmn_err.h \ $(top_srcdir)/include/sys/cmn_err.h \
$(top_srcdir)/include/sys/compress.h \ $(top_srcdir)/include/sys/compress.h \
$(top_srcdir)/include/sys/condvar.h \ $(top_srcdir)/include/sys/condvar.h \
@ -428,6 +438,7 @@ KERNEL_H = \
$(top_srcdir)/include/sys/isa_defs.h \ $(top_srcdir)/include/sys/isa_defs.h \
$(top_srcdir)/include/sys/kidmap.h \ $(top_srcdir)/include/sys/kidmap.h \
$(top_srcdir)/include/sys/kmem.h \ $(top_srcdir)/include/sys/kmem.h \
$(top_srcdir)/include/sys/kmem_cache.h \
$(top_srcdir)/include/sys/kobj.h \ $(top_srcdir)/include/sys/kobj.h \
$(top_srcdir)/include/sys/kstat.h \ $(top_srcdir)/include/sys/kstat.h \
$(top_srcdir)/include/sys/list.h \ $(top_srcdir)/include/sys/list.h \
@ -474,11 +485,11 @@ KERNEL_H = \
$(top_srcdir)/include/sys/u8_textprep.h \ $(top_srcdir)/include/sys/u8_textprep.h \
$(top_srcdir)/include/sys/uio.h \ $(top_srcdir)/include/sys/uio.h \
$(top_srcdir)/include/sys/unistd.h \ $(top_srcdir)/include/sys/unistd.h \
$(top_srcdir)/include/sys/utsname.h \
$(top_srcdir)/include/sys/va_list.h \ $(top_srcdir)/include/sys/va_list.h \
$(top_srcdir)/include/sys/varargs.h \ $(top_srcdir)/include/sys/varargs.h \
$(top_srcdir)/include/sys/vfs.h \ $(top_srcdir)/include/sys/vfs.h \
$(top_srcdir)/include/sys/vfs_opreg.h \ $(top_srcdir)/include/sys/vfs_opreg.h \
$(top_srcdir)/include/sys/vmem.h \
$(top_srcdir)/include/sys/vmsystm.h \ $(top_srcdir)/include/sys/vmsystm.h \
$(top_srcdir)/include/sys/vnode.h \ $(top_srcdir)/include/sys/vnode.h \
$(top_srcdir)/include/sys/zmod.h \ $(top_srcdir)/include/sys/zmod.h \
@ -486,7 +497,7 @@ KERNEL_H = \
USER_H = USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
@CONFIG_KERNEL_TRUE@kerneldir = /usr/src/spl-$(VERSION)/include/sys @CONFIG_KERNEL_TRUE@kerneldir = @prefix@/src/spl-$(VERSION)/include/sys
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H) @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H)
all: all-recursive all: all-recursive
@ -544,9 +555,7 @@ uninstall-kernelHEADERS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \ @list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \ dir='$(DESTDIR)$(kerneldir)'; $(am__uninstall_files_from_dir)
echo " ( cd '$(DESTDIR)$(kerneldir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(kerneldir)" && rm -f $$files
# This directory's subdirectories are mostly independent; you can cd # This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile. # into them and run `make' without going through this Makefile.
@ -759,10 +768,15 @@ install-am: all-am
installcheck: installcheck-recursive installcheck: installcheck-recursive
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:

View File

@ -29,14 +29,6 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <sys/types.h> #include <sys/types.h>
#ifndef HAVE_ATOMIC64_CMPXCHG
#define atomic64_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
#endif
#ifndef HAVE_ATOMIC64_XCHG
#define atomic64_xchg(v, n) (xchg(&((v)->counter), n))
#endif
/* /*
* Two approaches to atomic operations are implemented each with its * Two approaches to atomic operations are implemented each with its
* own benefits are drawbacks imposed by the Solaris API. Neither * own benefits are drawbacks imposed by the Solaris API. Neither
@ -156,6 +148,19 @@ atomic_cas_32(volatile uint32_t *target, uint32_t cmp,
return rc; return rc;
} }
static __inline__ uint32_t
atomic_swap_32(volatile uint32_t *target, uint32_t newval)
{
uint32_t rc;
spin_lock(&atomic32_lock);
rc = *target;
*target = newval;
spin_unlock(&atomic32_lock);
return rc;
}
static __inline__ void static __inline__ void
atomic_inc_64(volatile uint64_t *target) atomic_inc_64(volatile uint64_t *target)
{ {
@ -253,6 +258,18 @@ atomic_cas_64(volatile uint64_t *target, uint64_t cmp,
return rc; return rc;
} }
static __inline__ uint64_t
atomic_swap_64(volatile uint64_t *target, uint64_t newval)
{
uint64_t rc;
spin_lock(&atomic64_lock);
rc = *target;
*target = newval;
spin_unlock(&atomic64_lock);
return rc;
}
#else /* ATOMIC_SPINLOCK */ #else /* ATOMIC_SPINLOCK */
@ -265,6 +282,7 @@ atomic_cas_64(volatile uint64_t *target, uint64_t cmp,
#define atomic_add_32_nv(v, i) atomic_add_return((i), (atomic_t *)(v)) #define atomic_add_32_nv(v, i) atomic_add_return((i), (atomic_t *)(v))
#define atomic_sub_32_nv(v, i) atomic_sub_return((i), (atomic_t *)(v)) #define atomic_sub_32_nv(v, i) atomic_sub_return((i), (atomic_t *)(v))
#define atomic_cas_32(v, x, y) atomic_cmpxchg((atomic_t *)(v), x, y) #define atomic_cas_32(v, x, y) atomic_cmpxchg((atomic_t *)(v), x, y)
#define atomic_swap_32(v, x) atomic_xchg((atomic_t *)(v), x)
#define atomic_inc_64(v) atomic64_inc((atomic64_t *)(v)) #define atomic_inc_64(v) atomic64_inc((atomic64_t *)(v))
#define atomic_dec_64(v) atomic64_dec((atomic64_t *)(v)) #define atomic_dec_64(v) atomic64_dec((atomic64_t *)(v))
#define atomic_add_64(v, i) atomic64_add((i), (atomic64_t *)(v)) #define atomic_add_64(v, i) atomic64_add((i), (atomic64_t *)(v))
@ -274,6 +292,7 @@ atomic_cas_64(volatile uint64_t *target, uint64_t cmp,
#define atomic_add_64_nv(v, i) atomic64_add_return((i), (atomic64_t *)(v)) #define atomic_add_64_nv(v, i) atomic64_add_return((i), (atomic64_t *)(v))
#define atomic_sub_64_nv(v, i) atomic64_sub_return((i), (atomic64_t *)(v)) #define atomic_sub_64_nv(v, i) atomic64_sub_return((i), (atomic64_t *)(v))
#define atomic_cas_64(v, x, y) atomic64_cmpxchg((atomic64_t *)(v), x, y) #define atomic_cas_64(v, x, y) atomic64_cmpxchg((atomic64_t *)(v), x, y)
#define atomic_swap_64(v, x) atomic64_xchg((atomic64_t *)(v), x)
#endif /* ATOMIC_SPINLOCK */ #endif /* ATOMIC_SPINLOCK */

52
include/sys/callo.h Normal file
View File

@ -0,0 +1,52 @@
/*****************************************************************************\
* Copyright (C) 2007-2013 Lawrence Livermore National Security, LLC.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/
#ifndef _SPL_CALLO_H
#define _SPL_CALLO_H
/*
* Callout flags:
*
* CALLOUT_FLAG_ROUNDUP
* Roundup the expiration time to the next resolution boundary.
* If this flag is not specified, the expiration time is rounded down.
* CALLOUT_FLAG_ABSOLUTE
* Normally, the expiration passed to the timeout API functions is an
* expiration interval. If this flag is specified, then it is
* interpreted as the expiration time itself.
* CALLOUT_FLAG_HRESTIME
* Normally, callouts are not affected by changes to system time
* (hrestime). This flag is used to create a callout that is affected
* by system time. If system time changes, these timers must be
* handled in a special way (see callout.c). These are used by condition
* variables and LWP timers that need this behavior.
* CALLOUT_FLAG_32BIT
* Legacy interfaces timeout() and realtime_timeout() pass this flag
* to timeout_generic() to indicate that a 32-bit ID should be allocated.
*/
#define CALLOUT_FLAG_ROUNDUP 0x1
#define CALLOUT_FLAG_ABSOLUTE 0x2
#define CALLOUT_FLAG_HRESTIME 0x4
#define CALLOUT_FLAG_32BIT 0x8
#endif /* _SPL_CALLB_H */

View File

@ -27,8 +27,10 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <linux/delay_compat.h>
#include <sys/kmem.h> #include <sys/kmem.h>
#include <sys/mutex.h> #include <sys/mutex.h>
#include <sys/callo.h>
/* /*
* The kcondvar_t struct is protected by mutex taken externally before * The kcondvar_t struct is protected by mutex taken externally before
@ -56,6 +58,8 @@ extern void __cv_wait_interruptible(kcondvar_t *cvp, kmutex_t *mp);
extern clock_t __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time); extern clock_t __cv_timedwait(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time);
extern clock_t __cv_timedwait_interruptible(kcondvar_t *cvp, kmutex_t *mp, extern clock_t __cv_timedwait_interruptible(kcondvar_t *cvp, kmutex_t *mp,
clock_t exp_time); clock_t exp_time);
extern clock_t cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp,
hrtime_t tim, hrtime_t res, int flag);
extern void __cv_signal(kcondvar_t *cvp); extern void __cv_signal(kcondvar_t *cvp);
extern void __cv_broadcast(kcondvar_t *cvp); extern void __cv_broadcast(kcondvar_t *cvp);

View File

@ -29,49 +29,38 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/vfs.h> #include <sys/vfs.h>
#ifdef HAVE_CRED_STRUCT
typedef struct cred cred_t; typedef struct cred cred_t;
#define kcred ((cred_t *)(init_task.cred)) #define kcred ((cred_t *)(init_task.cred))
#define CRED() ((cred_t *)current_cred()) #define CRED() ((cred_t *)current_cred())
#else
typedef struct task_struct cred_t;
#define kcred ((cred_t *)&init_task)
#define CRED() ((cred_t *)current)
#endif /* HAVE_CRED_STRUCT */
#ifdef HAVE_KUIDGID_T #ifdef HAVE_KUIDGID_T
/* /*
* Linux 3.8+ uses typedefs to redefine uid_t and gid_t. We have to rename the * Linux 3.8+ uses typedefs to redefine uid_t and gid_t. We have to rename the
* typedefs to recover the original types. We then can use them provided that * typedefs to recover the original types. We then can use them provided that
* we are careful about translating from k{g,u}id_t to the original versions * we are careful about translating from k{g,u}id_t to the original versions
* and vice versa. * and vice versa.
*/ */
#define uid_t xuid_t #define uid_t xuid_t
#define gid_t xgid_t #define gid_t xgid_t
#include <linux/uidgid.h> #include <linux/uidgid.h>
#undef uid_t #undef uid_t
#undef gid_t #undef gid_t
#define KUID_TO_SUID(x) (__kuid_val(x)) #define KUID_TO_SUID(x) (__kuid_val(x))
#define KGID_TO_SGID(x) (__kgid_val(x)) #define KGID_TO_SGID(x) (__kgid_val(x))
#define SUID_TO_KUID(x) (KUIDT_INIT(x)) #define SUID_TO_KUID(x) (KUIDT_INIT(x))
#define SGID_TO_KGID(x) (KGIDT_INIT(x)) #define SGID_TO_KGID(x) (KGIDT_INIT(x))
#define KGIDP_TO_SGIDP(x) (&(x)->val) #define KGIDP_TO_SGIDP(x) (&(x)->val)
#else /* HAVE_KUIDGID_T */ #else /* HAVE_KUIDGID_T */
#define KUID_TO_SUID(x) (x) #define KUID_TO_SUID(x) (x)
#define KGID_TO_SGID(x) (x) #define KGID_TO_SGID(x) (x)
#define SUID_TO_KUID(x) (x) #define SUID_TO_KUID(x) (x)
#define SGID_TO_KGID(x) (x) #define SGID_TO_KGID(x) (x)
#define KGIDP_TO_SGIDP(x) (x) #define KGIDP_TO_SGIDP(x) (x)
#endif /* HAVE_KUIDGID_T */ #endif /* HAVE_KUIDGID_T */

View File

@ -30,7 +30,6 @@
* *
* PANIC() - Panic the node and print message. * PANIC() - Panic the node and print message.
* ASSERT() - Assert X is true, if not panic. * ASSERT() - Assert X is true, if not panic.
* ASSERTF() - Assert X is true, if not panic and print message.
* ASSERTV() - Wraps a variable declaration which is only used by ASSERT(). * ASSERTV() - Wraps a variable declaration which is only used by ASSERT().
* ASSERT3S() - Assert signed X OP Y is true, if not panic. * ASSERT3S() - Assert signed X OP Y is true, if not panic.
* ASSERT3U() - Assert unsigned X OP Y is true, if not panic. * ASSERT3U() - Assert unsigned X OP Y is true, if not panic.
@ -44,105 +43,69 @@
*/ */
#ifndef _SPL_DEBUG_H #ifndef _SPL_DEBUG_H
#define _SPL_DEBUG_H #define _SPL_DEBUG_H
#include <spl-debug.h> /*
* Common DEBUG functionality.
*/
int spl_panic(const char *file, const char *func, int line,
const char *fmt, ...);
void spl_dumpstack(void);
#ifdef NDEBUG /* Debugging Disabled */ #define PANIC(fmt, a...) \
spl_panic(__FILE__, __FUNCTION__, __LINE__, fmt, ## a)
/* Define SPL_DEBUG_STR to make clear which ASSERT definitions are used */ #define VERIFY(cond) \
#define SPL_DEBUG_STR "" (void)(unlikely(!(cond)) && \
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
"%s", "VERIFY(" #cond ") failed\n"))
#define PANIC(fmt, a...) \ #define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \
do { \ (void)((!((TYPE)(LEFT) OP (TYPE)(RIGHT))) && \
printk(KERN_EMERG fmt, ## a); \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \
spl_debug_bug(__FILE__, __FUNCTION__, __LINE__, 0); \ "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
} while (0) "failed (" FMT " " #OP " " FMT ")\n", \
CAST (LEFT), CAST (RIGHT)))
#define __ASSERT(x) ((void)0) #define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long))
#define ASSERT(x) ((void)0) #define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \
#define ASSERTF(x, y, z...) ((void)0)
#define ASSERTV(x)
#define VERIFY(cond) \
do { \
if (unlikely(!(cond))) \
PANIC("VERIFY(" #cond ") failed\n"); \
} while (0)
#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \
do { \
if (!((TYPE)(LEFT) OP (TYPE)(RIGHT))) \
PANIC("VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
"failed (" FMT " " #OP " " FMT ")\n", \
CAST (LEFT), CAST (RIGHT)); \
} while (0)
#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long))
#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \
(unsigned long long)) (unsigned long long))
#define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) #define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *))
#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (long long)) #define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (long long))
#define ASSERT3S(x,y,z) ((void)0) #define CTASSERT_GLOBAL(x) _CTASSERT(x, __LINE__)
#define ASSERT3U(x,y,z) ((void)0) #define CTASSERT(x) { _CTASSERT(x, __LINE__); }
#define ASSERT3P(x,y,z) ((void)0) #define _CTASSERT(x, y) __CTASSERT(x, y)
#define ASSERT0(x) ((void)0) #define __CTASSERT(x, y) \
typedef char __attribute__ ((unused)) \
__compile_time_assertion__ ## y[(x) ? 1 : -1]
#else /* Debugging Enabled */ /*
* Debugging disabled (--disable-debug)
*/
#ifdef NDEBUG
/* Define SPL_DEBUG_STR to make clear which ASSERT definitions are used */ #define SPL_DEBUG_STR ""
#define SPL_DEBUG_STR " (DEBUG mode)" #define ASSERT(x) ((void)0)
#define ASSERTV(x)
#define ASSERT3S(x,y,z) ((void)0)
#define ASSERT3U(x,y,z) ((void)0)
#define ASSERT3P(x,y,z) ((void)0)
#define ASSERT0(x) ((void)0)
#define PANIC(fmt, a...) \ /*
do { \ * Debugging enabled (--enable-debug)
spl_debug_msg(NULL, 0, 0, \ */
__FILE__, __FUNCTION__, __LINE__, fmt, ## a); \ #else
spl_debug_bug(__FILE__, __FUNCTION__, __LINE__, 0); \
} while (0)
/* ASSERTION that is safe to use within the debug system */ #define SPL_DEBUG_STR " (DEBUG mode)"
#define __ASSERT(cond) \ #define ASSERT(cond) VERIFY(cond)
do { \ #define ASSERTV(x) x
if (unlikely(!(cond))) { \ #define ASSERT3S(x,y,z) VERIFY3S(x, y, z)
printk(KERN_EMERG "ASSERTION(" #cond ") failed\n"); \ #define ASSERT3U(x,y,z) VERIFY3U(x, y, z)
BUG(); \ #define ASSERT3P(x,y,z) VERIFY3P(x, y, z)
} \ #define ASSERT0(x) VERIFY0(x)
} while (0)
/* ASSERTION that will debug log used outside the debug sysytem */
#define ASSERT(cond) \
do { \
if (unlikely(!(cond))) \
PANIC("ASSERTION(" #cond ") failed\n"); \
} while (0)
#define ASSERTF(cond, fmt, a...) \
do { \
if (unlikely(!(cond))) \
PANIC("ASSERTION(" #cond ") failed: " fmt, ## a); \
} while (0)
#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \
do { \
if (!((TYPE)(LEFT) OP (TYPE)(RIGHT))) \
PANIC("VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
"failed (" FMT " " #OP " " FMT ")\n", \
CAST (LEFT), CAST (RIGHT)); \
} while (0)
#define VERIFY3S(x,y,z) VERIFY3_IMPL(x, y, z, int64_t, "%lld", (long long))
#define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \
(unsigned long long))
#define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *))
#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (long long))
#define ASSERT3S(x,y,z) VERIFY3S(x, y, z)
#define ASSERT3U(x,y,z) VERIFY3U(x, y, z)
#define ASSERT3P(x,y,z) VERIFY3P(x, y, z)
#define ASSERT0(x) VERIFY0(x)
#define ASSERTV(x) x
#define VERIFY(x) ASSERT(x)
#endif /* NDEBUG */ #endif /* NDEBUG */
#endif /* SPL_DEBUG_H */ #endif /* SPL_DEBUG_H */

View File

@ -27,6 +27,7 @@
#include <linux/preempt.h> #include <linux/preempt.h>
#define kpreempt(unused) schedule()
#define kpreempt_disable() preempt_disable() #define kpreempt_disable() preempt_disable()
#define kpreempt_enable() preempt_enable() #define kpreempt_enable() preempt_enable()

View File

@ -25,22 +25,4 @@
#ifndef _SPL_DNLC_H #ifndef _SPL_DNLC_H
#define _SPL_DNLC_H #define _SPL_DNLC_H
/*
* Reduce the dcache and icache then reap the free'd slabs. Note the
* interface takes a reclaim percentage but we don't have easy access to
* the total number of entries to calculate the reclaim count. However,
* in practice this doesn't need to be even close to correct. We simply
* need to reclaim some useful fraction of the cache. The caller can
* determine if more needs to be done.
*/
static inline void
dnlc_reduce_cache(void *reduce_percent)
{
int nr = (uintptr_t)reduce_percent * 10000;
shrink_dcache_memory(nr, GFP_KERNEL);
shrink_icache_memory(nr, GFP_KERNEL);
kmem_reap();
}
#endif /* SPL_DNLC_H */ #endif /* SPL_DNLC_H */

View File

@ -9,6 +9,6 @@ USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL if CONFIG_KERNEL
kerneldir = /usr/src/spl-$(VERSION)/include/sys/fm kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fm
kernel_HEADERS = $(KERNEL_H) kernel_HEADERS = $(KERNEL_H)
endif endif

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -52,11 +52,11 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_HEADER = $(top_builddir)/spl_config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
@ -83,6 +83,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(kerneldir)" am__installdirs = "$(DESTDIR)$(kerneldir)"
HEADERS = $(kernel_HEADERS) HEADERS = $(kernel_HEADERS)
ETAGS = etags ETAGS = etags
@ -107,11 +113,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -142,7 +148,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -152,6 +157,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -185,6 +191,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -202,6 +209,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -234,7 +242,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -261,7 +268,7 @@ KERNEL_H = \
USER_H = USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
@CONFIG_KERNEL_TRUE@kerneldir = /usr/src/spl-$(VERSION)/include/sys/fm @CONFIG_KERNEL_TRUE@kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fm
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H) @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H)
all: all-am all: all-am
@ -319,9 +326,7 @@ uninstall-kernelHEADERS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \ @list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \ dir='$(DESTDIR)$(kerneldir)'; $(am__uninstall_files_from_dir)
echo " ( cd '$(DESTDIR)$(kerneldir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(kerneldir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@ -422,10 +427,15 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:

View File

@ -8,6 +8,6 @@ USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL if CONFIG_KERNEL
kerneldir = /usr/src/spl-$(VERSION)/include/sys/fs kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fs
kernel_HEADERS = $(KERNEL_H) kernel_HEADERS = $(KERNEL_H)
endif endif

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -52,11 +52,11 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_HEADER = $(top_builddir)/spl_config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
@ -82,6 +82,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(kerneldir)" am__installdirs = "$(DESTDIR)$(kerneldir)"
HEADERS = $(kernel_HEADERS) HEADERS = $(kernel_HEADERS)
ETAGS = etags ETAGS = etags
@ -106,11 +112,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -141,7 +147,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -151,6 +156,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -184,6 +190,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -201,6 +208,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -233,7 +241,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -259,7 +266,7 @@ KERNEL_H = \
USER_H = USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
@CONFIG_KERNEL_TRUE@kerneldir = /usr/src/spl-$(VERSION)/include/sys/fs @CONFIG_KERNEL_TRUE@kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fs
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H) @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H)
all: all-am all: all-am
@ -317,9 +324,7 @@ uninstall-kernelHEADERS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \ @list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \ dir='$(DESTDIR)$(kerneldir)'; $(am__uninstall_files_from_dir)
echo " ( cd '$(DESTDIR)$(kerneldir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(kerneldir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@ -420,10 +425,15 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:

View File

@ -75,7 +75,7 @@
#endif #endif
/* arm arch specific defines */ /* arm arch specific defines */
#elif defined(__arm) || defined(__arm__) #elif defined(__arm) || defined(__arm__) || defined(__aarch64__)
#if !defined(__arm) #if !defined(__arm)
#define __arm #define __arm
@ -85,13 +85,41 @@
#define __arm__ #define __arm__
#endif #endif
#if defined(__ARMEL__) #if defined(__ARMEL__) || defined(__AARCH64EL__)
#define _LITTLE_ENDIAN #define _LITTLE_ENDIAN
#else #else
#define _BIG_ENDIAN #define _BIG_ENDIAN
#endif #endif
#else /* Currently only x86_64, i386, arm, and powerpc arches supported */ /* sparc arch specific defines */
#elif defined(__sparc) || defined(__sparc__)
#if !defined(__sparc)
#define __sparc
#endif
#if !defined(__sparc__)
#define __sparc__
#endif
#define _BIG_ENDIAN
#define _SUNOS_VTOC_16
/* sparc64 arch specific defines */
#elif defined(__sparc64) || defined(__sparc64__)
#if !defined(__sparc64)
#define __sparc64
#endif
#if !defined(__sparc64__)
#define __sparc64__
#endif
#define _BIG_ENDIAN
#define _SUNOS_VTOC_16
#else /* Currently x86_64, i386, arm, powerpc, and sparc are supported */
#error "Unsupported ISA type" #error "Unsupported ISA type"
#endif #endif

View File

@ -1,4 +1,4 @@
/*****************************************************************************\ /*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California. * Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
@ -20,302 +20,14 @@
* *
* You should have received a copy of the GNU General Public License along * You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>. * with the SPL. If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/ */
#ifndef _SPL_KMEM_H #ifndef _SPL_KMEM_H
#define _SPL_KMEM_H #define _SPL_KMEM_H
#include <linux/module.h> #include <sys/debug.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/vmalloc.h> #include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/rwsem.h>
#include <linux/hash.h>
#include <linux/rbtree.h>
#include <linux/ctype.h>
#include <asm/atomic.h>
#include <sys/types.h>
#include <sys/vmsystm.h>
#include <sys/kstat.h>
#include <sys/taskq.h>
/*
* Memory allocation interfaces
*/
#define KM_SLEEP GFP_KERNEL /* Can sleep, never fails */
#define KM_NOSLEEP GFP_ATOMIC /* Can not sleep, may fail */
#define KM_PUSHPAGE (GFP_NOIO | __GFP_HIGH) /* Use reserved memory */
#define KM_NODEBUG __GFP_NOWARN /* Suppress warnings */
#define KM_FLAGS __GFP_BITS_MASK
#define KM_VMFLAGS GFP_LEVEL_MASK
/*
* Used internally, the kernel does not need to support this flag
*/
#ifndef __GFP_ZERO
# define __GFP_ZERO 0x8000
#endif
/*
* PF_NOFS is a per-process debug flag which is set in current->flags to
* detect when a process is performing an unsafe allocation. All tasks
* with PF_NOFS set must strictly use KM_PUSHPAGE for allocations because
* if they enter direct reclaim and initiate I/O the may deadlock.
*
* When debugging is disabled, any incorrect usage will be detected and
* a call stack with warning will be printed to the console. The flags
* will then be automatically corrected to allow for safe execution. If
* debugging is enabled this will be treated as a fatal condition.
*
* To avoid any risk of conflicting with the existing PF_ flags. The
* PF_NOFS bit shadows the rarely used PF_MUTEX_TESTER bit. Only when
* CONFIG_RT_MUTEX_TESTER is not set, and we know this bit is unused,
* will the PF_NOFS bit be valid. Happily, most existing distributions
* ship a kernel with CONFIG_RT_MUTEX_TESTER disabled.
*/
#if !defined(CONFIG_RT_MUTEX_TESTER) && defined(PF_MUTEX_TESTER)
# define PF_NOFS PF_MUTEX_TESTER
static inline void
sanitize_flags(struct task_struct *p, gfp_t *flags)
{
if (unlikely((p->flags & PF_NOFS) && (*flags & (__GFP_IO|__GFP_FS)))) {
# ifdef NDEBUG
SDEBUG_LIMIT(SD_CONSOLE | SD_WARNING, "Fixing allocation for "
"task %s (%d) which used GFP flags 0x%x with PF_NOFS set\n",
p->comm, p->pid, flags);
spl_debug_dumpstack(p);
*flags &= ~(__GFP_IO|__GFP_FS);
# else
PANIC("FATAL allocation for task %s (%d) which used GFP "
"flags 0x%x with PF_NOFS set\n", p->comm, p->pid, flags);
# endif /* NDEBUG */
}
}
#else
# define PF_NOFS 0x00000000
# define sanitize_flags(p, fl) ((void)0)
#endif /* !defined(CONFIG_RT_MUTEX_TESTER) && defined(PF_MUTEX_TESTER) */
/*
* __GFP_NOFAIL looks like it will be removed from the kernel perhaps as
* early as 2.6.32. To avoid this issue when it occurs in upstream kernels
* we retry the allocation here as long as it is not __GFP_WAIT (GFP_ATOMIC).
* I would prefer the caller handle the failure case cleanly but we are
* trying to emulate Solaris and those are not the Solaris semantics.
*/
static inline void *
kmalloc_nofail(size_t size, gfp_t flags)
{
void *ptr;
sanitize_flags(current, &flags);
do {
ptr = kmalloc(size, flags);
} while (ptr == NULL && (flags & __GFP_WAIT));
return ptr;
}
static inline void *
kzalloc_nofail(size_t size, gfp_t flags)
{
void *ptr;
sanitize_flags(current, &flags);
do {
ptr = kzalloc(size, flags);
} while (ptr == NULL && (flags & __GFP_WAIT));
return ptr;
}
static inline void *
kmalloc_node_nofail(size_t size, gfp_t flags, int node)
{
#ifdef HAVE_KMALLOC_NODE
void *ptr;
sanitize_flags(current, &flags);
do {
ptr = kmalloc_node(size, flags, node);
} while (ptr == NULL && (flags & __GFP_WAIT));
return ptr;
#else
return kmalloc_nofail(size, flags);
#endif /* HAVE_KMALLOC_NODE */
}
static inline void *
vmalloc_nofail(size_t size, gfp_t flags)
{
void *ptr;
sanitize_flags(current, &flags);
/*
* Retry failed __vmalloc() allocations once every second. The
* rational for the delay is that the likely failure modes are:
*
* 1) The system has completely exhausted memory, in which case
* delaying 1 second for the memory reclaim to run is reasonable
* to avoid thrashing the system.
* 2) The system has memory but has exhausted the small virtual
* address space available on 32-bit systems. Retrying the
* allocation immediately will only result in spinning on the
* virtual address space lock. It is better delay a second and
* hope that another process will free some of the address space.
* But the bottom line is there is not much we can actually do
* since we can never safely return a failure and honor the
* Solaris semantics.
*/
while (1) {
ptr = __vmalloc(size, flags | __GFP_HIGHMEM, PAGE_KERNEL);
if (unlikely((ptr == NULL) && (flags & __GFP_WAIT))) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(HZ);
} else {
break;
}
}
return ptr;
}
static inline void *
vzalloc_nofail(size_t size, gfp_t flags)
{
void *ptr;
ptr = vmalloc_nofail(size, flags);
if (ptr)
memset(ptr, 0, (size));
return ptr;
}
#ifdef DEBUG_KMEM
/*
* Memory accounting functions to be used only when DEBUG_KMEM is set.
*/
# ifdef HAVE_ATOMIC64_T
# define kmem_alloc_used_add(size) atomic64_add(size, &kmem_alloc_used)
# define kmem_alloc_used_sub(size) atomic64_sub(size, &kmem_alloc_used)
# define kmem_alloc_used_read() atomic64_read(&kmem_alloc_used)
# define kmem_alloc_used_set(size) atomic64_set(&kmem_alloc_used, size)
# define vmem_alloc_used_add(size) atomic64_add(size, &vmem_alloc_used)
# define vmem_alloc_used_sub(size) atomic64_sub(size, &vmem_alloc_used)
# define vmem_alloc_used_read() atomic64_read(&vmem_alloc_used)
# define vmem_alloc_used_set(size) atomic64_set(&vmem_alloc_used, size)
extern atomic64_t kmem_alloc_used;
extern unsigned long long kmem_alloc_max;
extern atomic64_t vmem_alloc_used;
extern unsigned long long vmem_alloc_max;
# else /* HAVE_ATOMIC64_T */
# define kmem_alloc_used_add(size) atomic_add(size, &kmem_alloc_used)
# define kmem_alloc_used_sub(size) atomic_sub(size, &kmem_alloc_used)
# define kmem_alloc_used_read() atomic_read(&kmem_alloc_used)
# define kmem_alloc_used_set(size) atomic_set(&kmem_alloc_used, size)
# define vmem_alloc_used_add(size) atomic_add(size, &vmem_alloc_used)
# define vmem_alloc_used_sub(size) atomic_sub(size, &vmem_alloc_used)
# define vmem_alloc_used_read() atomic_read(&vmem_alloc_used)
# define vmem_alloc_used_set(size) atomic_set(&vmem_alloc_used, size)
extern atomic_t kmem_alloc_used;
extern unsigned long long kmem_alloc_max;
extern atomic_t vmem_alloc_used;
extern unsigned long long vmem_alloc_max;
# endif /* HAVE_ATOMIC64_T */
# ifdef DEBUG_KMEM_TRACKING
/*
* DEBUG_KMEM && DEBUG_KMEM_TRACKING
*
* The maximum level of memory debugging. All memory will be accounted
* for and each allocation will be explicitly tracked. Any allocation
* which is leaked will be reported on module unload and the exact location
* where that memory was allocation will be reported. This level of memory
* tracking will have a significant impact on performance and should only
* be enabled for debugging. This feature may be enabled by passing
* --enable-debug-kmem-tracking to configure.
*/
# define kmem_alloc(sz, fl) kmem_alloc_track((sz), (fl), \
__FUNCTION__, __LINE__, 0, 0)
# define kmem_zalloc(sz, fl) kmem_alloc_track((sz), (fl)|__GFP_ZERO,\
__FUNCTION__, __LINE__, 0, 0)
# define kmem_alloc_node(sz, fl, nd) kmem_alloc_track((sz), (fl), \
__FUNCTION__, __LINE__, 1, nd)
# define kmem_free(ptr, sz) kmem_free_track((ptr), (sz))
# define vmem_alloc(sz, fl) vmem_alloc_track((sz), (fl), \
__FUNCTION__, __LINE__)
# define vmem_zalloc(sz, fl) vmem_alloc_track((sz), (fl)|__GFP_ZERO,\
__FUNCTION__, __LINE__)
# define vmem_free(ptr, sz) vmem_free_track((ptr), (sz))
extern void *kmem_alloc_track(size_t, int, const char *, int, int, int);
extern void kmem_free_track(const void *, size_t);
extern void *vmem_alloc_track(size_t, int, const char *, int);
extern void vmem_free_track(const void *, size_t);
# else /* DEBUG_KMEM_TRACKING */
/*
* DEBUG_KMEM && !DEBUG_KMEM_TRACKING
*
* The default build will set DEBUG_KEM. This provides basic memory
* accounting with little to no impact on performance. When the module
* is unloaded in any memory was leaked the total number of leaked bytes
* will be reported on the console. To disable this basic accounting
* pass the --disable-debug-kmem option to configure.
*/
# define kmem_alloc(sz, fl) kmem_alloc_debug((sz), (fl), \
__FUNCTION__, __LINE__, 0, 0)
# define kmem_zalloc(sz, fl) kmem_alloc_debug((sz), (fl)|__GFP_ZERO,\
__FUNCTION__, __LINE__, 0, 0)
# define kmem_alloc_node(sz, fl, nd) kmem_alloc_debug((sz), (fl), \
__FUNCTION__, __LINE__, 1, nd)
# define kmem_free(ptr, sz) kmem_free_debug((ptr), (sz))
# define vmem_alloc(sz, fl) vmem_alloc_debug((sz), (fl), \
__FUNCTION__, __LINE__)
# define vmem_zalloc(sz, fl) vmem_alloc_debug((sz), (fl)|__GFP_ZERO,\
__FUNCTION__, __LINE__)
# define vmem_free(ptr, sz) vmem_free_debug((ptr), (sz))
extern void *kmem_alloc_debug(size_t, int, const char *, int, int, int);
extern void kmem_free_debug(const void *, size_t);
extern void *vmem_alloc_debug(size_t, int, const char *, int);
extern void vmem_free_debug(const void *, size_t);
# endif /* DEBUG_KMEM_TRACKING */
#else /* DEBUG_KMEM */
/*
* !DEBUG_KMEM && !DEBUG_KMEM_TRACKING
*
* All debugging is disabled. There will be no overhead even for
* minimal memory accounting. To enable basic accounting pass the
* --enable-debug-kmem option to configure.
*/
# define kmem_alloc(sz, fl) kmalloc_nofail((sz), (fl))
# define kmem_zalloc(sz, fl) kzalloc_nofail((sz), (fl))
# define kmem_alloc_node(sz, fl, nd) kmalloc_node_nofail((sz), (fl), (nd))
# define kmem_free(ptr, sz) ((void)(sz), kfree(ptr))
# define vmem_alloc(sz, fl) vmalloc_nofail((sz), (fl))
# define vmem_zalloc(sz, fl) vzalloc_nofail((sz), (fl))
# define vmem_free(ptr, sz) ((void)(sz), vfree(ptr))
#endif /* DEBUG_KMEM */
extern int kmem_debugging(void); extern int kmem_debugging(void);
extern char *kmem_vasprintf(const char *fmt, va_list ap); extern char *kmem_vasprintf(const char *fmt, va_list ap);
@ -323,194 +35,116 @@ extern char *kmem_asprintf(const char *fmt, ...);
extern char *strdup(const char *str); extern char *strdup(const char *str);
extern void strfree(char *str); extern void strfree(char *str);
/*
* Memory allocation interfaces
*/
#define KM_SLEEP 0x0000 /* can block for memory; success guaranteed */
#define KM_NOSLEEP 0x0001 /* cannot block for memory; may fail */
#define KM_PUSHPAGE 0x0004 /* can block for memory; may use reserve */
#define KM_ZERO 0x1000 /* zero the allocation */
#define KM_VMEM 0x2000 /* caller is vmem_* wrapper */
#define KM_PUBLIC_MASK (KM_SLEEP | KM_NOSLEEP | KM_PUSHPAGE)
/* /*
* Slab allocation interfaces. The SPL slab differs from the standard * Convert a KM_* flags mask to its Linux GFP_* counterpart. The conversion
* Linux SLAB or SLUB primarily in that each cache may be backed by slabs * function is context aware which means that KM_SLEEP allocations can be
* allocated from the physical or virtal memory address space. The virtual * safely used in syncing contexts which have set PF_FSTRANS.
* slabs allow for good behavior when allocation large objects of identical
* size. This slab implementation also supports both constructors and
* destructions which the Linux slab does not.
*/ */
enum { static inline gfp_t
KMC_BIT_NOTOUCH = 0, /* Don't update ages */ kmem_flags_convert(int flags)
KMC_BIT_NODEBUG = 1, /* Default behavior */ {
KMC_BIT_NOMAGAZINE = 2, /* XXX: Unsupported */ gfp_t lflags = __GFP_NOWARN | __GFP_COMP;
KMC_BIT_NOHASH = 3, /* XXX: Unsupported */
KMC_BIT_QCACHE = 4, /* XXX: Unsupported */
KMC_BIT_KMEM = 5, /* Use kmem cache */
KMC_BIT_VMEM = 6, /* Use vmem cache */
KMC_BIT_OFFSLAB = 7, /* Objects not on slab */
KMC_BIT_NOEMERGENCY = 8, /* Disable emergency objects */
KMC_BIT_DEADLOCKED = 14, /* Deadlock detected */
KMC_BIT_GROWING = 15, /* Growing in progress */
KMC_BIT_REAPING = 16, /* Reaping in progress */
KMC_BIT_DESTROY = 17, /* Destroy in progress */
KMC_BIT_TOTAL = 18, /* Proc handler helper bit */
KMC_BIT_ALLOC = 19, /* Proc handler helper bit */
KMC_BIT_MAX = 20, /* Proc handler helper bit */
};
/* kmem move callback return values */ if (flags & KM_NOSLEEP) {
typedef enum kmem_cbrc { lflags |= GFP_ATOMIC | __GFP_NORETRY;
KMEM_CBRC_YES = 0, /* Object moved */ } else {
KMEM_CBRC_NO = 1, /* Object not moved */ lflags |= GFP_KERNEL;
KMEM_CBRC_LATER = 2, /* Object not moved, try again later */ if ((current->flags & PF_FSTRANS))
KMEM_CBRC_DONT_NEED = 3, /* Neither object is needed */ lflags &= ~(__GFP_IO|__GFP_FS);
KMEM_CBRC_DONT_KNOW = 4, /* Object unknown */ }
} kmem_cbrc_t;
#define KMC_NOTOUCH (1 << KMC_BIT_NOTOUCH) if (flags & KM_PUSHPAGE)
#define KMC_NODEBUG (1 << KMC_BIT_NODEBUG) lflags |= __GFP_HIGH;
#define KMC_NOMAGAZINE (1 << KMC_BIT_NOMAGAZINE)
#define KMC_NOHASH (1 << KMC_BIT_NOHASH)
#define KMC_QCACHE (1 << KMC_BIT_QCACHE)
#define KMC_KMEM (1 << KMC_BIT_KMEM)
#define KMC_VMEM (1 << KMC_BIT_VMEM)
#define KMC_OFFSLAB (1 << KMC_BIT_OFFSLAB)
#define KMC_NOEMERGENCY (1 << KMC_BIT_NOEMERGENCY)
#define KMC_DEADLOCKED (1 << KMC_BIT_DEADLOCKED)
#define KMC_GROWING (1 << KMC_BIT_GROWING)
#define KMC_REAPING (1 << KMC_BIT_REAPING)
#define KMC_DESTROY (1 << KMC_BIT_DESTROY)
#define KMC_TOTAL (1 << KMC_BIT_TOTAL)
#define KMC_ALLOC (1 << KMC_BIT_ALLOC)
#define KMC_MAX (1 << KMC_BIT_MAX)
#define KMC_REAP_CHUNK INT_MAX if (flags & KM_ZERO)
#define KMC_DEFAULT_SEEKS 1 lflags |= __GFP_ZERO;
#define KMC_EXPIRE_AGE 0x1 /* Due to age */ return (lflags);
#define KMC_EXPIRE_MEM 0x2 /* Due to low memory */ }
extern unsigned int spl_kmem_cache_expire; typedef struct {
extern struct list_head spl_kmem_cache_list; struct task_struct *fstrans_thread;
extern struct rw_semaphore spl_kmem_cache_sem; unsigned int saved_flags;
} fstrans_cookie_t;
#define SKM_MAGIC 0x2e2e2e2e static inline fstrans_cookie_t
#define SKO_MAGIC 0x20202020 spl_fstrans_mark(void)
#define SKS_MAGIC 0x22222222 {
#define SKC_MAGIC 0x2c2c2c2c fstrans_cookie_t cookie;
#define SPL_KMEM_CACHE_DELAY 15 /* Minimum slab release age */ cookie.fstrans_thread = current;
#define SPL_KMEM_CACHE_REAP 0 /* Default reap everything */ cookie.saved_flags = current->flags & PF_FSTRANS;
#define SPL_KMEM_CACHE_OBJ_PER_SLAB 16 /* Target objects per slab */ current->flags |= PF_FSTRANS;
#define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN 8 /* Minimum objects per slab */
#define SPL_KMEM_CACHE_ALIGN 8 /* Default object alignment */
#define POINTER_IS_VALID(p) 0 /* Unimplemented */ return (cookie);
#define POINTER_INVALIDATE(pp) /* Unimplemented */ }
typedef int (*spl_kmem_ctor_t)(void *, void *, int); static inline void
typedef void (*spl_kmem_dtor_t)(void *, void *); spl_fstrans_unmark(fstrans_cookie_t cookie)
typedef void (*spl_kmem_reclaim_t)(void *); {
ASSERT3P(cookie.fstrans_thread, ==, current);
ASSERT(current->flags & PF_FSTRANS);
typedef struct spl_kmem_magazine { current->flags &= ~(PF_FSTRANS);
uint32_t skm_magic; /* Sanity magic */ current->flags |= cookie.saved_flags;
uint32_t skm_avail; /* Available objects */ }
uint32_t skm_size; /* Magazine size */
uint32_t skm_refill; /* Batch refill size */
struct spl_kmem_cache *skm_cache; /* Owned by cache */
unsigned long skm_age; /* Last cache access */
unsigned int skm_cpu; /* Owned by cpu */
void *skm_objs[0]; /* Object pointers */
} spl_kmem_magazine_t;
typedef struct spl_kmem_obj { static inline int
uint32_t sko_magic; /* Sanity magic */ spl_fstrans_check(void)
void *sko_addr; /* Buffer address */ {
struct spl_kmem_slab *sko_slab; /* Owned by slab */ return (current->flags & PF_FSTRANS);
struct list_head sko_list; /* Free object list linkage */ }
} spl_kmem_obj_t;
typedef struct spl_kmem_slab { #ifdef HAVE_ATOMIC64_T
uint32_t sks_magic; /* Sanity magic */ #define kmem_alloc_used_add(size) atomic64_add(size, &kmem_alloc_used)
uint32_t sks_objs; /* Objects per slab */ #define kmem_alloc_used_sub(size) atomic64_sub(size, &kmem_alloc_used)
struct spl_kmem_cache *sks_cache; /* Owned by cache */ #define kmem_alloc_used_read() atomic64_read(&kmem_alloc_used)
struct list_head sks_list; /* Slab list linkage */ #define kmem_alloc_used_set(size) atomic64_set(&kmem_alloc_used, size)
struct list_head sks_free_list; /* Free object list */ extern atomic64_t kmem_alloc_used;
unsigned long sks_age; /* Last modify jiffie */ extern unsigned long long kmem_alloc_max;
uint32_t sks_ref; /* Ref count used objects */ #else /* HAVE_ATOMIC64_T */
} spl_kmem_slab_t; #define kmem_alloc_used_add(size) atomic_add(size, &kmem_alloc_used)
#define kmem_alloc_used_sub(size) atomic_sub(size, &kmem_alloc_used)
#define kmem_alloc_used_read() atomic_read(&kmem_alloc_used)
#define kmem_alloc_used_set(size) atomic_set(&kmem_alloc_used, size)
extern atomic_t kmem_alloc_used;
extern unsigned long long kmem_alloc_max;
#endif /* HAVE_ATOMIC64_T */
typedef struct spl_kmem_alloc { extern unsigned int spl_kmem_alloc_warn;
struct spl_kmem_cache *ska_cache; /* Owned by cache */ extern unsigned int spl_kmem_alloc_max;
int ska_flags; /* Allocation flags */
taskq_ent_t ska_tqe; /* Task queue entry */
} spl_kmem_alloc_t;
typedef struct spl_kmem_emergency { #define kmem_alloc(sz, fl) spl_kmem_alloc((sz), (fl), __func__, __LINE__)
struct rb_node ske_node; /* Emergency tree linkage */ #define kmem_zalloc(sz, fl) spl_kmem_zalloc((sz), (fl), __func__, __LINE__)
void *ske_obj; /* Buffer address */ #define kmem_free(ptr, sz) spl_kmem_free((ptr), (sz))
} spl_kmem_emergency_t;
typedef struct spl_kmem_cache { extern void *spl_kmem_alloc(size_t sz, int fl, const char *func, int line);
uint32_t skc_magic; /* Sanity magic */ extern void *spl_kmem_zalloc(size_t sz, int fl, const char *func, int line);
uint32_t skc_name_size; /* Name length */ extern void spl_kmem_free(const void *ptr, size_t sz);
char *skc_name; /* Name string */
spl_kmem_magazine_t *skc_mag[NR_CPUS]; /* Per-CPU warm cache */
uint32_t skc_mag_size; /* Magazine size */
uint32_t skc_mag_refill; /* Magazine refill count */
spl_kmem_ctor_t skc_ctor; /* Constructor */
spl_kmem_dtor_t skc_dtor; /* Destructor */
spl_kmem_reclaim_t skc_reclaim; /* Reclaimator */
void *skc_private; /* Private data */
void *skc_vmp; /* Unused */
unsigned long skc_flags; /* Flags */
uint32_t skc_obj_size; /* Object size */
uint32_t skc_obj_align; /* Object alignment */
uint32_t skc_slab_objs; /* Objects per slab */
uint32_t skc_slab_size; /* Slab size */
uint32_t skc_delay; /* Slab reclaim interval */
uint32_t skc_reap; /* Slab reclaim count */
atomic_t skc_ref; /* Ref count callers */
taskqid_t skc_taskqid; /* Slab reclaim task */
struct list_head skc_list; /* List of caches linkage */
struct list_head skc_complete_list;/* Completely alloc'ed */
struct list_head skc_partial_list; /* Partially alloc'ed */
struct rb_root skc_emergency_tree; /* Min sized objects */
spinlock_t skc_lock; /* Cache lock */
wait_queue_head_t skc_waitq; /* Allocation waiters */
uint64_t skc_slab_fail; /* Slab alloc failures */
uint64_t skc_slab_create;/* Slab creates */
uint64_t skc_slab_destroy;/* Slab destroys */
uint64_t skc_slab_total; /* Slab total current */
uint64_t skc_slab_alloc; /* Slab alloc current */
uint64_t skc_slab_max; /* Slab max historic */
uint64_t skc_obj_total; /* Obj total current */
uint64_t skc_obj_alloc; /* Obj alloc current */
uint64_t skc_obj_max; /* Obj max historic */
uint64_t skc_obj_deadlock; /* Obj emergency deadlocks */
uint64_t skc_obj_emergency; /* Obj emergency current */
uint64_t skc_obj_emergency_max; /* Obj emergency max */
} spl_kmem_cache_t;
#define kmem_cache_t spl_kmem_cache_t
extern spl_kmem_cache_t *spl_kmem_cache_create(char *name, size_t size, /*
size_t align, spl_kmem_ctor_t ctor, spl_kmem_dtor_t dtor, * The following functions are only available for internal use.
spl_kmem_reclaim_t reclaim, void *priv, void *vmp, int flags); */
extern void spl_kmem_cache_set_move(spl_kmem_cache_t *, extern void *spl_kmem_alloc_impl(size_t size, int flags, int node);
kmem_cbrc_t (*)(void *, void *, size_t, void *)); extern void *spl_kmem_alloc_debug(size_t size, int flags, int node);
extern void spl_kmem_cache_destroy(spl_kmem_cache_t *skc); extern void *spl_kmem_alloc_track(size_t size, int flags,
extern void *spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags); const char *func, int line, int node);
extern void spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj); extern void spl_kmem_free_impl(const void *buf, size_t size);
extern void spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count); extern void spl_kmem_free_debug(const void *buf, size_t size);
extern void spl_kmem_reap(void); extern void spl_kmem_free_track(const void *buf, size_t size);
int spl_kmem_init_kallsyms_lookup(void); extern int spl_kmem_init(void);
int spl_kmem_init(void); extern void spl_kmem_fini(void);
void spl_kmem_fini(void);
#define kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags) \
spl_kmem_cache_create(name,size,align,ctor,dtor,rclm,priv,vmp,flags)
#define kmem_cache_set_move(skc, move) spl_kmem_cache_set_move(skc, move)
#define kmem_cache_destroy(skc) spl_kmem_cache_destroy(skc)
#define kmem_cache_alloc(skc, flags) spl_kmem_cache_alloc(skc, flags)
#define kmem_cache_free(skc, obj) spl_kmem_cache_free(skc, obj)
#define kmem_cache_reap_now(skc) \
spl_kmem_cache_reap_now(skc, skc->skc_reap)
#define kmem_reap() spl_kmem_reap()
#define kmem_virt(ptr) (((ptr) >= (void *)VMALLOC_START) && \
((ptr) < (void *)VMALLOC_END))
#endif /* _SPL_KMEM_H */ #endif /* _SPL_KMEM_H */

240
include/sys/kmem_cache.h Normal file
View File

@ -0,0 +1,240 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_KMEM_CACHE_H
#define _SPL_KMEM_CACHE_H
#include <sys/taskq.h>
/*
* Slab allocation interfaces. The SPL slab differs from the standard
* Linux SLAB or SLUB primarily in that each cache may be backed by slabs
* allocated from the physical or virtal memory address space. The virtual
* slabs allow for good behavior when allocation large objects of identical
* size. This slab implementation also supports both constructors and
* destructors which the Linux slab does not.
*/
enum {
KMC_BIT_NOTOUCH = 0, /* Don't update ages */
KMC_BIT_NODEBUG = 1, /* Default behavior */
KMC_BIT_NOMAGAZINE = 2, /* XXX: Unsupported */
KMC_BIT_NOHASH = 3, /* XXX: Unsupported */
KMC_BIT_QCACHE = 4, /* XXX: Unsupported */
KMC_BIT_KMEM = 5, /* Use kmem cache */
KMC_BIT_VMEM = 6, /* Use vmem cache */
KMC_BIT_SLAB = 7, /* Use Linux slab cache */
KMC_BIT_OFFSLAB = 8, /* Objects not on slab */
KMC_BIT_NOEMERGENCY = 9, /* Disable emergency objects */
KMC_BIT_DEADLOCKED = 14, /* Deadlock detected */
KMC_BIT_GROWING = 15, /* Growing in progress */
KMC_BIT_REAPING = 16, /* Reaping in progress */
KMC_BIT_DESTROY = 17, /* Destroy in progress */
KMC_BIT_TOTAL = 18, /* Proc handler helper bit */
KMC_BIT_ALLOC = 19, /* Proc handler helper bit */
KMC_BIT_MAX = 20, /* Proc handler helper bit */
};
/* kmem move callback return values */
typedef enum kmem_cbrc {
KMEM_CBRC_YES = 0, /* Object moved */
KMEM_CBRC_NO = 1, /* Object not moved */
KMEM_CBRC_LATER = 2, /* Object not moved, try again later */
KMEM_CBRC_DONT_NEED = 3, /* Neither object is needed */
KMEM_CBRC_DONT_KNOW = 4, /* Object unknown */
} kmem_cbrc_t;
#define KMC_NOTOUCH (1 << KMC_BIT_NOTOUCH)
#define KMC_NODEBUG (1 << KMC_BIT_NODEBUG)
#define KMC_NOMAGAZINE (1 << KMC_BIT_NOMAGAZINE)
#define KMC_NOHASH (1 << KMC_BIT_NOHASH)
#define KMC_QCACHE (1 << KMC_BIT_QCACHE)
#define KMC_KMEM (1 << KMC_BIT_KMEM)
#define KMC_VMEM (1 << KMC_BIT_VMEM)
#define KMC_SLAB (1 << KMC_BIT_SLAB)
#define KMC_OFFSLAB (1 << KMC_BIT_OFFSLAB)
#define KMC_NOEMERGENCY (1 << KMC_BIT_NOEMERGENCY)
#define KMC_DEADLOCKED (1 << KMC_BIT_DEADLOCKED)
#define KMC_GROWING (1 << KMC_BIT_GROWING)
#define KMC_REAPING (1 << KMC_BIT_REAPING)
#define KMC_DESTROY (1 << KMC_BIT_DESTROY)
#define KMC_TOTAL (1 << KMC_BIT_TOTAL)
#define KMC_ALLOC (1 << KMC_BIT_ALLOC)
#define KMC_MAX (1 << KMC_BIT_MAX)
#define KMC_REAP_CHUNK INT_MAX
#define KMC_DEFAULT_SEEKS 1
#define KMC_EXPIRE_AGE 0x1 /* Due to age */
#define KMC_EXPIRE_MEM 0x2 /* Due to low memory */
#define KMC_RECLAIM_ONCE 0x1 /* Force a single shrinker pass */
extern unsigned int spl_kmem_cache_expire;
extern struct list_head spl_kmem_cache_list;
extern struct rw_semaphore spl_kmem_cache_sem;
#define SKM_MAGIC 0x2e2e2e2e
#define SKO_MAGIC 0x20202020
#define SKS_MAGIC 0x22222222
#define SKC_MAGIC 0x2c2c2c2c
#define SPL_KMEM_CACHE_DELAY 15 /* Minimum slab release age */
#define SPL_KMEM_CACHE_REAP 0 /* Default reap everything */
#define SPL_KMEM_CACHE_OBJ_PER_SLAB 8 /* Target objects per slab */
#define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN 1 /* Minimum objects per slab */
#define SPL_KMEM_CACHE_ALIGN 8 /* Default object alignment */
#ifdef _LP64
#define SPL_KMEM_CACHE_MAX_SIZE 32 /* Max slab size in MB */
#else
#define SPL_KMEM_CACHE_MAX_SIZE 4 /* Max slab size in MB */
#endif
#define SPL_MAX_ORDER (MAX_ORDER - 3)
#define SPL_MAX_ORDER_NR_PAGES (1 << (SPL_MAX_ORDER - 1))
#ifdef CONFIG_SLUB
#define SPL_MAX_KMEM_CACHE_ORDER PAGE_ALLOC_COSTLY_ORDER
#define SPL_MAX_KMEM_ORDER_NR_PAGES (1 << (SPL_MAX_KMEM_CACHE_ORDER - 1))
#else
#define SPL_MAX_KMEM_ORDER_NR_PAGES (KMALLOC_MAX_SIZE >> PAGE_SHIFT)
#endif
#define POINTER_IS_VALID(p) 0 /* Unimplemented */
#define POINTER_INVALIDATE(pp) /* Unimplemented */
typedef int (*spl_kmem_ctor_t)(void *, void *, int);
typedef void (*spl_kmem_dtor_t)(void *, void *);
typedef void (*spl_kmem_reclaim_t)(void *);
typedef struct spl_kmem_magazine {
uint32_t skm_magic; /* Sanity magic */
uint32_t skm_avail; /* Available objects */
uint32_t skm_size; /* Magazine size */
uint32_t skm_refill; /* Batch refill size */
struct spl_kmem_cache *skm_cache; /* Owned by cache */
unsigned long skm_age; /* Last cache access */
unsigned int skm_cpu; /* Owned by cpu */
void *skm_objs[0]; /* Object pointers */
} spl_kmem_magazine_t;
typedef struct spl_kmem_obj {
uint32_t sko_magic; /* Sanity magic */
void *sko_addr; /* Buffer address */
struct spl_kmem_slab *sko_slab; /* Owned by slab */
struct list_head sko_list; /* Free object list linkage */
} spl_kmem_obj_t;
typedef struct spl_kmem_slab {
uint32_t sks_magic; /* Sanity magic */
uint32_t sks_objs; /* Objects per slab */
struct spl_kmem_cache *sks_cache; /* Owned by cache */
struct list_head sks_list; /* Slab list linkage */
struct list_head sks_free_list; /* Free object list */
unsigned long sks_age; /* Last modify jiffie */
uint32_t sks_ref; /* Ref count used objects */
} spl_kmem_slab_t;
typedef struct spl_kmem_alloc {
struct spl_kmem_cache *ska_cache; /* Owned by cache */
int ska_flags; /* Allocation flags */
taskq_ent_t ska_tqe; /* Task queue entry */
} spl_kmem_alloc_t;
typedef struct spl_kmem_emergency {
struct rb_node ske_node; /* Emergency tree linkage */
unsigned long ske_obj; /* Buffer address */
} spl_kmem_emergency_t;
typedef struct spl_kmem_cache {
uint32_t skc_magic; /* Sanity magic */
uint32_t skc_name_size; /* Name length */
char *skc_name; /* Name string */
spl_kmem_magazine_t *skc_mag[NR_CPUS]; /* Per-CPU warm cache */
uint32_t skc_mag_size; /* Magazine size */
uint32_t skc_mag_refill; /* Magazine refill count */
spl_kmem_ctor_t skc_ctor; /* Constructor */
spl_kmem_dtor_t skc_dtor; /* Destructor */
spl_kmem_reclaim_t skc_reclaim; /* Reclaimator */
void *skc_private; /* Private data */
void *skc_vmp; /* Unused */
struct kmem_cache *skc_linux_cache; /* Linux slab cache if used */
unsigned long skc_flags; /* Flags */
uint32_t skc_obj_size; /* Object size */
uint32_t skc_obj_align; /* Object alignment */
uint32_t skc_slab_objs; /* Objects per slab */
uint32_t skc_slab_size; /* Slab size */
uint32_t skc_delay; /* Slab reclaim interval */
uint32_t skc_reap; /* Slab reclaim count */
atomic_t skc_ref; /* Ref count callers */
taskqid_t skc_taskqid; /* Slab reclaim task */
struct list_head skc_list; /* List of caches linkage */
struct list_head skc_complete_list; /* Completely alloc'ed */
struct list_head skc_partial_list; /* Partially alloc'ed */
struct rb_root skc_emergency_tree; /* Min sized objects */
spinlock_t skc_lock; /* Cache lock */
wait_queue_head_t skc_waitq; /* Allocation waiters */
uint64_t skc_slab_fail; /* Slab alloc failures */
uint64_t skc_slab_create; /* Slab creates */
uint64_t skc_slab_destroy; /* Slab destroys */
uint64_t skc_slab_total; /* Slab total current */
uint64_t skc_slab_alloc; /* Slab alloc current */
uint64_t skc_slab_max; /* Slab max historic */
uint64_t skc_obj_total; /* Obj total current */
uint64_t skc_obj_alloc; /* Obj alloc current */
uint64_t skc_obj_max; /* Obj max historic */
uint64_t skc_obj_deadlock; /* Obj emergency deadlocks */
uint64_t skc_obj_emergency; /* Obj emergency current */
uint64_t skc_obj_emergency_max; /* Obj emergency max */
} spl_kmem_cache_t;
#define kmem_cache_t spl_kmem_cache_t
extern spl_kmem_cache_t *spl_kmem_cache_create(char *name, size_t size,
size_t align, spl_kmem_ctor_t ctor, spl_kmem_dtor_t dtor,
spl_kmem_reclaim_t reclaim, void *priv, void *vmp, int flags);
extern void spl_kmem_cache_set_move(spl_kmem_cache_t *,
kmem_cbrc_t (*)(void *, void *, size_t, void *));
extern void spl_kmem_cache_destroy(spl_kmem_cache_t *skc);
extern void *spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags);
extern void spl_kmem_cache_free(spl_kmem_cache_t *skc, void *obj);
extern void spl_kmem_cache_set_allocflags(spl_kmem_cache_t *skc, gfp_t flags);
extern void spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count);
extern void spl_kmem_reap(void);
#define kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl) \
spl_kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl)
#define kmem_cache_set_move(skc, move) spl_kmem_cache_set_move(skc, move)
#define kmem_cache_destroy(skc) spl_kmem_cache_destroy(skc)
#define kmem_cache_alloc(skc, flags) spl_kmem_cache_alloc(skc, flags)
#define kmem_cache_free(skc, obj) spl_kmem_cache_free(skc, obj)
#define kmem_cache_reap_now(skc) \
spl_kmem_cache_reap_now(skc, skc->skc_reap)
#define kmem_reap() spl_kmem_reap()
/*
* The following functions are only available for internal use.
*/
extern int spl_kmem_cache_init(void);
extern void spl_kmem_cache_fini(void);
#endif /* _SPL_KMEM_CACHE_H */

View File

@ -33,6 +33,7 @@
#include <sys/mutex.h> #include <sys/mutex.h>
#define KSTAT_STRLEN 31 #define KSTAT_STRLEN 31
#define KSTAT_RAW_MAX (128*1024)
/* For reference valid classes are: /* For reference valid classes are:
* disk, tape, net, controller, vm, kvm, hat, streams, kstat, misc * disk, tape, net, controller, vm, kvm, hat, streams, kstat, misc
@ -43,8 +44,7 @@
#define KSTAT_TYPE_INTR 2 /* interrupt stats; ks_ndata == 1 */ #define KSTAT_TYPE_INTR 2 /* interrupt stats; ks_ndata == 1 */
#define KSTAT_TYPE_IO 3 /* I/O stats; ks_ndata == 1 */ #define KSTAT_TYPE_IO 3 /* I/O stats; ks_ndata == 1 */
#define KSTAT_TYPE_TIMER 4 /* event timer; ks_ndata >= 1 */ #define KSTAT_TYPE_TIMER 4 /* event timer; ks_ndata >= 1 */
#define KSTAT_TYPE_TXG 5 /* txg sync; ks_ndata >= 1 */ #define KSTAT_NUM_TYPES 5
#define KSTAT_NUM_TYPES 6
#define KSTAT_DATA_CHAR 0 #define KSTAT_DATA_CHAR 0
#define KSTAT_DATA_INT32 1 #define KSTAT_DATA_INT32 1
@ -79,6 +79,7 @@
#define KSTAT_WRITE 1 #define KSTAT_WRITE 1
struct kstat_s; struct kstat_s;
typedef struct kstat_s kstat_t;
typedef int kid_t; /* unique kstat id */ typedef int kid_t; /* unique kstat id */
typedef int kstat_update_t(struct kstat_s *, int); /* dynamic update cb */ typedef int kstat_update_t(struct kstat_s *, int); /* dynamic update cb */
@ -90,7 +91,13 @@ typedef struct kstat_module {
struct proc_dir_entry *ksm_proc; /* proc entry */ struct proc_dir_entry *ksm_proc; /* proc entry */
} kstat_module_t; } kstat_module_t;
typedef struct kstat_s { typedef struct kstat_raw_ops {
int (*headers)(char *buf, size_t size);
int (*data)(char *buf, size_t size, void *data);
void *(*addr)(kstat_t *ksp, loff_t index);
} kstat_raw_ops_t;
struct kstat_s {
int ks_magic; /* magic value */ int ks_magic; /* magic value */
kid_t ks_kid; /* unique kstat ID */ kid_t ks_kid; /* unique kstat ID */
hrtime_t ks_crtime; /* creation time */ hrtime_t ks_crtime; /* creation time */
@ -107,10 +114,14 @@ typedef struct kstat_s {
struct proc_dir_entry *ks_proc; /* proc linkage */ struct proc_dir_entry *ks_proc; /* proc linkage */
kstat_update_t *ks_update; /* dynamic updates */ kstat_update_t *ks_update; /* dynamic updates */
void *ks_private; /* private data */ void *ks_private; /* private data */
kmutex_t ks_lock; /* kstat data lock */ kmutex_t ks_private_lock; /* kstat private data lock */
kmutex_t *ks_lock; /* kstat data lock */
struct list_head ks_list; /* kstat linkage */ struct list_head ks_list; /* kstat linkage */
kstat_module_t *ks_owner; /* kstat module linkage */ kstat_module_t *ks_owner; /* kstat module linkage */
} kstat_t; kstat_raw_ops_t ks_raw_ops; /* ops table for raw type */
char *ks_raw_buf; /* buf used for raw ops */
size_t ks_raw_bufsize; /* size of raw ops buffer */
};
typedef struct kstat_named_s { typedef struct kstat_named_s {
char name[KSTAT_STRLEN]; /* name of counter */ char name[KSTAT_STRLEN]; /* name of counter */
@ -165,36 +176,25 @@ typedef struct kstat_timer {
hrtime_t stop_time; /* previous event stop time */ hrtime_t stop_time; /* previous event stop time */
} kstat_timer_t; } kstat_timer_t;
typedef enum kstat_txg_state {
TXG_STATE_OPEN = 1,
TXG_STATE_QUIESCING = 2,
TXG_STATE_SYNCING = 3,
TXG_STATE_COMMITTED = 4,
} kstat_txg_state_t;
typedef struct kstat_txg {
u_longlong_t txg; /* txg id */
kstat_txg_state_t state; /* txg state */
hrtime_t birth; /* birth time stamp */
u_longlong_t nread; /* number of bytes read */
u_longlong_t nwritten; /* number of bytes written */
uint_t reads; /* number of read operations */
uint_t writes; /* number of write operations */
hrtime_t open_time; /* open time */
hrtime_t quiesce_time;/* quiesce time */
hrtime_t sync_time; /* sync time */
} kstat_txg_t;
int spl_kstat_init(void); int spl_kstat_init(void);
void spl_kstat_fini(void); void spl_kstat_fini(void);
extern void __kstat_set_raw_ops(kstat_t *ksp,
int (*headers)(char *buf, size_t size),
int (*data)(char *buf, size_t size, void *data),
void* (*addr)(kstat_t *ksp, loff_t index));
extern kstat_t *__kstat_create(const char *ks_module, int ks_instance, extern kstat_t *__kstat_create(const char *ks_module, int ks_instance,
const char *ks_name, const char *ks_class, const char *ks_name, const char *ks_class,
uchar_t ks_type, uint_t ks_ndata, uchar_t ks_type, uint_t ks_ndata,
uchar_t ks_flags); uchar_t ks_flags);
extern void __kstat_install(kstat_t *ksp); extern void __kstat_install(kstat_t *ksp);
extern void __kstat_delete(kstat_t *ksp); extern void __kstat_delete(kstat_t *ksp);
extern void kstat_waitq_enter(kstat_io_t *);
extern void kstat_waitq_exit(kstat_io_t *);
extern void kstat_runq_enter(kstat_io_t *);
extern void kstat_runq_exit(kstat_io_t *);
#define kstat_set_raw_ops(k,h,d,a) __kstat_set_raw_ops(k,h,d,a)
#define kstat_create(m,i,n,c,t,s,f) __kstat_create(m,i,n,c,t,s,f) #define kstat_create(m,i,n,c,t,s,f) __kstat_create(m,i,n,c,t,s,f)
#define kstat_install(k) __kstat_install(k) #define kstat_install(k) __kstat_install(k)
#define kstat_delete(k) __kstat_delete(k) #define kstat_delete(k) __kstat_delete(k)

View File

@ -1,4 +1,4 @@
/*****************************************************************************\ /*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California. * Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
@ -20,109 +20,45 @@
* *
* You should have received a copy of the GNU General Public License along * You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>. * with the SPL. If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/ */
#ifndef _SPL_MUTEX_H #ifndef _SPL_MUTEX_H
#define _SPL_MUTEX_H #define _SPL_MUTEX_H
#include <sys/types.h> #include <sys/types.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/compiler_compat.h> #include <linux/compiler_compat.h>
typedef enum { typedef enum {
MUTEX_DEFAULT = 0, MUTEX_DEFAULT = 0,
MUTEX_SPIN = 1, MUTEX_SPIN = 1,
MUTEX_ADAPTIVE = 2 MUTEX_ADAPTIVE = 2
} kmutex_type_t; } kmutex_type_t;
#if defined(HAVE_MUTEX_OWNER) && defined(CONFIG_SMP) && !defined(CONFIG_DEBUG_MUTEXES)
/*
* We define a 1-field struct rather than a straight typedef to enforce type
* safety.
*/
typedef struct { typedef struct {
struct mutex m; struct mutex m_mutex;
spinlock_t m_lock; /* used for serializing mutex_exit */
kthread_t *m_owner;
} kmutex_t; } kmutex_t;
static inline kthread_t * #define MUTEX(mp) (&((mp)->m_mutex))
mutex_owner(kmutex_t *mp)
{
#if defined(HAVE_MUTEX_OWNER_TASK_STRUCT)
return ACCESS_ONCE(mp->m.owner);
#else
struct thread_info *owner = ACCESS_ONCE(mp->m.owner);
if (owner)
return owner->task;
return NULL;
#endif
}
#define mutex_owned(mp) (mutex_owner(mp) == current)
#define MUTEX_HELD(mp) mutex_owned(mp)
#define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp))
#undef mutex_init
#define mutex_init(mp, name, type, ibc) \
({ \
static struct lock_class_key __key; \
ASSERT(type == MUTEX_DEFAULT); \
\
__mutex_init(&(mp)->m, #mp, &__key); \
})
#undef mutex_destroy
#define mutex_destroy(mp) \
({ \
VERIFY3P(mutex_owner(mp), ==, NULL); \
})
#define mutex_tryenter(mp) mutex_trylock(&(mp)->m)
#define mutex_enter(mp) \
({ \
ASSERT3P(mutex_owner(mp), !=, current); \
mutex_lock(&(mp)->m); \
})
#define mutex_exit(mp) mutex_unlock(&(mp)->m)
#ifdef HAVE_GPL_ONLY_SYMBOLS
# define mutex_enter_nested(mp, sc) mutex_lock_nested(&(mp)->m, sc)
#else
# define mutex_enter_nested(mp, sc) mutex_enter(mp)
#endif /* HAVE_GPL_ONLY_SYMBOLS */
#else /* HAVE_MUTEX_OWNER */
typedef struct {
struct mutex m_mutex;
kthread_t *m_owner;
} kmutex_t;
#ifdef HAVE_TASK_CURR
extern int spl_mutex_spin_max(void);
#else /* HAVE_TASK_CURR */
# define task_curr(owner) 0
# define spl_mutex_spin_max() 0
#endif /* HAVE_TASK_CURR */
#define MUTEX(mp) (&((mp)->m_mutex))
static inline void static inline void
spl_mutex_set_owner(kmutex_t *mp) spl_mutex_set_owner(kmutex_t *mp)
{ {
mp->m_owner = current; mp->m_owner = current;
} }
static inline void static inline void
spl_mutex_clear_owner(kmutex_t *mp) spl_mutex_clear_owner(kmutex_t *mp)
{ {
mp->m_owner = NULL; mp->m_owner = NULL;
} }
#define mutex_owner(mp) (ACCESS_ONCE((mp)->m_owner)) #define mutex_owner(mp) (ACCESS_ONCE((mp)->m_owner))
#define mutex_owned(mp) (mutex_owner(mp) == current) #define mutex_owned(mp) (mutex_owner(mp) == current)
#define MUTEX_HELD(mp) mutex_owned(mp) #define MUTEX_HELD(mp) mutex_owned(mp)
#define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) #define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp))
/* /*
* The following functions must be a #define and not static inline. * The following functions must be a #define and not static inline.
@ -131,86 +67,76 @@ spl_mutex_clear_owner(kmutex_t *mp)
* for the built in kernel lock analysis tools * for the built in kernel lock analysis tools
*/ */
#undef mutex_init #undef mutex_init
#define mutex_init(mp, name, type, ibc) \ #define mutex_init(mp, name, type, ibc) \
({ \ { \
static struct lock_class_key __key; \ static struct lock_class_key __key; \
ASSERT(type == MUTEX_DEFAULT); \ ASSERT(type == MUTEX_DEFAULT); \
\ \
__mutex_init(MUTEX(mp), #mp, &__key); \ __mutex_init(MUTEX(mp), (name) ? (#name) : (#mp), &__key); \
spl_mutex_clear_owner(mp); \ spin_lock_init(&(mp)->m_lock); \
}) spl_mutex_clear_owner(mp); \
}
#undef mutex_destroy #undef mutex_destroy
#define mutex_destroy(mp) \ #define mutex_destroy(mp) \
({ \ { \
VERIFY3P(mutex_owner(mp), ==, NULL); \ VERIFY3P(mutex_owner(mp), ==, NULL); \
}
#define mutex_tryenter(mp) \
({ \
int _rc_; \
\
if ((_rc_ = mutex_trylock(MUTEX(mp))) == 1) \
spl_mutex_set_owner(mp); \
\
_rc_; \
}) })
#define mutex_tryenter(mp) \ #ifdef CONFIG_DEBUG_LOCK_ALLOC
({ \ #define mutex_enter_nested(mp, subclass) \
int _rc_; \ { \
\ ASSERT3P(mutex_owner(mp), !=, current); \
if ((_rc_ = mutex_trylock(MUTEX(mp))) == 1) \ mutex_lock_nested(MUTEX(mp), (subclass)); \
spl_mutex_set_owner(mp); \ spl_mutex_set_owner(mp); \
\ }
_rc_; \ #else /* CONFIG_DEBUG_LOCK_ALLOC */
}) #define mutex_enter_nested(mp, subclass) \
{ \
ASSERT3P(mutex_owner(mp), !=, current); \
mutex_lock(MUTEX(mp)); \
spl_mutex_set_owner(mp); \
}
#endif /* CONFIG_DEBUG_LOCK_ALLOC */
#define mutex_enter(mp) mutex_enter_nested((mp), 0)
/* /*
* Adaptive mutexs assume that the lock may be held by a task running * The reason for the spinlock:
* on a different cpu. The expectation is that the task will drop the *
* lock before leaving the head of the run queue. So the ideal thing * The Linux mutex is designed with a fast-path/slow-path design such that it
* to do is spin until we acquire the lock and avoid a context switch. * does not guarantee serialization upon itself, allowing a race where latter
* However it is also possible the task holding the lock yields the * acquirers finish mutex_unlock before former ones.
* processor with out dropping lock. In this case, we know it's going *
* to be a while so we stop spinning and go to sleep waiting for the * The race renders it unsafe to be used for serializing the freeing of an
* lock to be available. This should strike the optimum balance * object in which the mutex is embedded, where the latter acquirer could go
* between spinning and sleeping waiting for a lock. * on to free the object while the former one is still doing mutex_unlock and
* causing memory corruption.
*
* However, there are many places in ZFS where the mutex is used for
* serializing object freeing, and the code is shared among other OSes without
* this issue. Thus, we need the spinlock to force the serialization on
* mutex_exit().
*
* See http://lwn.net/Articles/575477/ for the information about the race.
*/ */
#define mutex_enter(mp) \ #define mutex_exit(mp) \
({ \ { \
kthread_t *_owner_; \ spin_lock(&(mp)->m_lock); \
int _rc_, _count_; \ spl_mutex_clear_owner(mp); \
\ mutex_unlock(MUTEX(mp)); \
_rc_ = 0; \ spin_unlock(&(mp)->m_lock); \
_count_ = 0; \ }
_owner_ = mutex_owner(mp); \
ASSERT3P(_owner_, !=, current); \
\
while (_owner_ && task_curr(_owner_) && \
_count_ <= spl_mutex_spin_max()) { \
if ((_rc_ = mutex_trylock(MUTEX(mp)))) \
break; \
\
_count_++; \
} \
\
if (!_rc_) \
mutex_lock(MUTEX(mp)); \
\
spl_mutex_set_owner(mp); \
})
#define mutex_exit(mp) \
({ \
spl_mutex_clear_owner(mp); \
mutex_unlock(MUTEX(mp)); \
})
#ifdef HAVE_GPL_ONLY_SYMBOLS
# define mutex_enter_nested(mp, sc) \
({ \
mutex_lock_nested(MUTEX(mp), sc); \
spl_mutex_set_owner(mp); \
})
#else
# define mutex_enter_nested(mp, sc) \
({ \
mutex_enter(mp); \
})
#endif
#endif /* HAVE_MUTEX_OWNER */
int spl_mutex_init(void); int spl_mutex_init(void);
void spl_mutex_fini(void); void spl_mutex_fini(void);

View File

@ -25,4 +25,6 @@
#ifndef _SPL_SDT_H #ifndef _SPL_SDT_H
#define _SPL_SDT_H #define _SPL_SDT_H
#define SET_ERROR(x) (x)
#endif /* SPL_SDT_H */ #endif /* SPL_SDT_H */

View File

@ -31,7 +31,6 @@
#include <sys/mutex.h> #include <sys/mutex.h>
#include <sys/u8_textprep.h> #include <sys/u8_textprep.h>
#include <sys/vnode.h> #include <sys/vnode.h>
#include <spl-device.h>
typedef int ddi_devid_t; typedef int ddi_devid_t;

View File

@ -8,6 +8,6 @@ USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL if CONFIG_KERNEL
kerneldir = /usr/src/spl-$(VERSION)/include/sys/sysevent kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/sysevent
kernel_HEADERS = $(KERNEL_H) kernel_HEADERS = $(KERNEL_H)
endif endif

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -52,11 +52,11 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_HEADER = $(top_builddir)/spl_config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
@ -83,6 +83,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(kerneldir)" am__installdirs = "$(DESTDIR)$(kerneldir)"
HEADERS = $(kernel_HEADERS) HEADERS = $(kernel_HEADERS)
ETAGS = etags ETAGS = etags
@ -107,11 +113,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -142,7 +148,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -152,6 +157,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -185,6 +191,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -202,6 +209,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -234,7 +242,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -260,7 +267,7 @@ KERNEL_H = \
USER_H = USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
@CONFIG_KERNEL_TRUE@kerneldir = /usr/src/spl-$(VERSION)/include/sys/sysevent @CONFIG_KERNEL_TRUE@kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/sysevent
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H) @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H)
all: all-am all: all-am
@ -318,9 +325,7 @@ uninstall-kernelHEADERS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \ @list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \ dir='$(DESTDIR)$(kerneldir)'; $(am__uninstall_files_from_dir)
echo " ( cd '$(DESTDIR)$(kerneldir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(kerneldir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@ -421,10 +426,15 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:

View File

@ -95,12 +95,19 @@
#define minclsyspri (MAX_RT_PRIO) #define minclsyspri (MAX_RT_PRIO)
#define maxclsyspri (MAX_PRIO-1) #define maxclsyspri (MAX_PRIO-1)
#ifndef NICE_TO_PRIO
#define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20) #define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20)
#endif
#ifndef PRIO_TO_NICE
#define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO - 20) #define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO - 20)
#endif
/* Missing macros /*
* Missing macros
*/ */
#ifndef PAGESIZE
#define PAGESIZE PAGE_SIZE #define PAGESIZE PAGE_SIZE
#endif
/* from Solaris sys/byteorder.h */ /* from Solaris sys/byteorder.h */
#define BSWAP_8(x) ((x) & 0xff) #define BSWAP_8(x) ((x) & 0xff)
@ -143,15 +150,14 @@
/* Missing globals */ /* Missing globals */
extern char spl_version[32]; extern char spl_version[32];
extern unsigned long spl_hostid; extern unsigned long spl_hostid;
extern char hw_serial[11];
/* Missing misc functions */ /* Missing misc functions */
extern int highbit(unsigned long i);
extern uint32_t zone_get_hostid(void *zone); extern uint32_t zone_get_hostid(void *zone);
extern void spl_setup(void); extern void spl_setup(void);
extern void spl_cleanup(void); extern void spl_cleanup(void);
#define makedevice(maj,min) makedev(maj,min) #define highbit64(x) fls64(x)
#define makedevice(maj,min) makedev(maj,min)
/* common macros */ /* common macros */
#ifndef MIN #ifndef MIN
@ -169,6 +175,9 @@ extern void spl_cleanup(void);
#ifndef roundup #ifndef roundup
#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
#endif #endif
#ifndef howmany
#define howmany(x, y) (((x) + ((y) - 1)) / (y))
#endif
/* /*
* Compatibility macros/typedefs needed for Solaris -> Linux port * Compatibility macros/typedefs needed for Solaris -> Linux port

View File

@ -25,7 +25,6 @@
#ifndef _SPL_SYSTEMINFO_H #ifndef _SPL_SYSTEMINFO_H
#define _SPL_SYSTEMINFO_H #define _SPL_SYSTEMINFO_H
#define HW_INVALID_HOSTID 0xFFFFFFFF /* an invalid hostid */
#define HW_HOSTID_LEN 11 /* minimum buffer size needed */ #define HW_HOSTID_LEN 11 /* minimum buffer size needed */
/* to hold a decimal or hex */ /* to hold a decimal or hex */
/* hostid string */ /* hostid string */

View File

@ -51,11 +51,15 @@ typedef void (*thread_func_t)(void *);
#define thread_exit() __thread_exit() #define thread_exit() __thread_exit()
#define thread_join(t) VERIFY(0) #define thread_join(t) VERIFY(0)
#define curthread current #define curthread current
#define getcomm() current->comm
#define getpid() current->pid
extern kthread_t *__thread_create(caddr_t stk, size_t stksize, extern kthread_t *__thread_create(caddr_t stk, size_t stksize,
thread_func_t func, const char *name, thread_func_t func, const char *name,
void *args, size_t len, proc_t *pp, void *args, size_t len, proc_t *pp,
int state, pri_t pri); int state, pri_t pri);
extern void __thread_exit(void); extern void __thread_exit(void);
extern struct task_struct *spl_kthread_create(int (*func)(void *),
void *data, const char namefmt[], ...);
#endif /* _SPL_THREAD_H */ #endif /* _SPL_THREAD_H */

View File

@ -23,71 +23,54 @@
\*****************************************************************************/ \*****************************************************************************/
#ifndef _SPL_TIME_H #ifndef _SPL_TIME_H
#define _SPL_TIME_H #define _SPL_TIME_H
/*
* Structure returned by gettimeofday(2) system call,
* and used in other calls.
*/
#include <linux/module.h> #include <linux/module.h>
#include <linux/time.h> #include <linux/time.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/timer.h> #include <sys/timer.h>
#if defined(CONFIG_64BIT) #if defined(CONFIG_64BIT)
#define TIME_MAX INT64_MAX #define TIME_MAX INT64_MAX
#define TIME_MIN INT64_MIN #define TIME_MIN INT64_MIN
#else #else
#define TIME_MAX INT32_MAX #define TIME_MAX INT32_MAX
#define TIME_MIN INT32_MIN #define TIME_MIN INT32_MIN
#endif #endif
#define SEC 1 #define SEC 1
#define MILLISEC 1000 #define MILLISEC 1000
#define MICROSEC 1000000 #define MICROSEC 1000000
#define NANOSEC 1000000000 #define NANOSEC 1000000000
/* Already defined in include/linux/time.h */ #define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC))
#undef CLOCK_THREAD_CPUTIME_ID #define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC))
#undef CLOCK_REALTIME
#undef CLOCK_MONOTONIC
#undef CLOCK_PROCESS_CPUTIME_ID
typedef enum clock_type { #define hz HZ
__CLOCK_REALTIME0 = 0, /* obsolete; same as CLOCK_REALTIME */
CLOCK_VIRTUAL = 1, /* thread's user-level CPU clock */
CLOCK_THREAD_CPUTIME_ID = 2, /* thread's user+system CPU clock */
CLOCK_REALTIME = 3, /* wall clock */
CLOCK_MONOTONIC = 4, /* high resolution monotonic clock */
CLOCK_PROCESS_CPUTIME_ID = 5, /* process's user+system CPU clock */
CLOCK_HIGHRES = CLOCK_MONOTONIC, /* alternate name */
CLOCK_PROF = CLOCK_THREAD_CPUTIME_ID,/* alternate name */
} clock_type_t;
#define hz \ #define TIMESPEC_OVERFLOW(ts) \
({ \
ASSERT(HZ >= 100 && HZ <= MICROSEC); \
HZ; \
})
extern void __gethrestime(timestruc_t *);
extern int __clock_gettime(clock_type_t, timespec_t *);
extern hrtime_t __gethrtime(void);
#define gethrestime(ts) __gethrestime(ts)
#define clock_gettime(fl, tp) __clock_gettime(fl, tp)
#define gethrtime() __gethrtime()
static __inline__ time_t
gethrestime_sec(void)
{
timestruc_t now;
__gethrestime(&now);
return now.tv_sec;
}
#define TIMESPEC_OVERFLOW(ts) \
((ts)->tv_sec < TIME_MIN || (ts)->tv_sec > TIME_MAX) ((ts)->tv_sec < TIME_MIN || (ts)->tv_sec > TIME_MAX)
static inline void
gethrestime(timestruc_t *now)
{
*now = current_kernel_time();
}
static inline time_t
gethrestime_sec(void)
{
struct timespec ts;
ts = current_kernel_time();
return (ts.tv_sec);
}
static inline hrtime_t
gethrtime(void)
{
struct timespec now;
getrawmonotonic(&now);
return (((hrtime_t)now.tv_sec * NSEC_PER_SEC) + now.tv_nsec);
}
#endif /* _SPL_TIME_H */ #endif /* _SPL_TIME_H */

View File

@ -35,6 +35,20 @@
#define ddi_get_lbolt() ((clock_t)jiffies) #define ddi_get_lbolt() ((clock_t)jiffies)
#define ddi_get_lbolt64() ((int64_t)get_jiffies_64()) #define ddi_get_lbolt64() ((int64_t)get_jiffies_64())
#define ddi_time_before(a, b) (typecheck(clock_t, a) && \
typecheck(clock_t, b) && \
((a) - (b) < 0))
#define ddi_time_after(a, b) ddi_time_before(b, a)
#define ddi_time_before_eq(a, b) (!ddi_time_after(a, b))
#define ddi_time_after_eq(a, b) ddi_time_before_eq(b, a)
#define ddi_time_before64(a, b) (typecheck(int64_t, a) && \
typecheck(int64_t, b) && \
((a) - (b) < 0))
#define ddi_time_after64(a, b) ddi_time_before64(b, a)
#define ddi_time_before_eq64(a, b) (!ddi_time_after64(a, b))
#define ddi_time_after_eq64(a, b) ddi_time_before_eq64(b, a)
#define delay(ticks) schedule_timeout_uninterruptible(ticks) #define delay(ticks) schedule_timeout_uninterruptible(ticks)
#define SEC_TO_TICK(sec) ((sec) * HZ) #define SEC_TO_TICK(sec) ((sec) * HZ)

View File

@ -28,26 +28,6 @@
#include <linux/types.h> #include <linux/types.h>
#include <sys/sysmacros.h> #include <sys/sysmacros.h>
#include <linux/uaccess_compat.h>
#include <linux/file_compat.h>
#include <linux/list_compat.h>
#include <linux/time_compat.h>
#include <linux/bitops_compat.h>
#include <linux/smp_compat.h>
#include <linux/kallsyms_compat.h>
#include <linux/mutex_compat.h>
#include <linux/module_compat.h>
#include <linux/sysctl_compat.h>
#include <linux/proc_compat.h>
#include <linux/math64_compat.h>
#include <linux/zlib_compat.h>
#include <linux/mm_compat.h>
#include <linux/delay.h>
#ifndef HAVE_UINTPTR_T
typedef unsigned long uintptr_t;
#endif
#ifndef ULLONG_MAX #ifndef ULLONG_MAX
#define ULLONG_MAX (~0ULL) #define ULLONG_MAX (~0ULL)
#endif #endif
@ -68,7 +48,6 @@ typedef long long longlong_t;
typedef long long offset_t; typedef long long offset_t;
typedef struct task_struct kthread_t; typedef struct task_struct kthread_t;
typedef struct task_struct proc_t; typedef struct task_struct proc_t;
typedef struct vmem { } vmem_t;
typedef short pri_t; typedef short pri_t;
typedef struct timespec timestruc_t; /* definition per SVr4 */ typedef struct timespec timestruc_t; /* definition per SVr4 */
typedef struct timespec timespec_t; typedef struct timespec timespec_t;

View File

@ -1,34 +0,0 @@
/*****************************************************************************\
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
\*****************************************************************************/
#ifndef _SPL_UTSNAME_H
#define _SPL_UTSNAME_H
#include <linux/utsname.h>
extern struct new_utsname *__utsname(void);
#define utsname (*__utsname())
#endif /* SPL_UTSNAME_H */

109
include/sys/vmem.h Normal file
View File

@ -0,0 +1,109 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_VMEM_H
#define _SPL_VMEM_H
#include <sys/kmem.h>
#include <linux/sched.h>
#include <linux/vmalloc.h>
typedef struct vmem { } vmem_t;
extern vmem_t *heap_arena;
extern vmem_t *zio_alloc_arena;
extern vmem_t *zio_arena;
extern size_t vmem_size(vmem_t *vmp, int typemask);
extern void *spl_vmalloc(unsigned long size, gfp_t lflags, pgprot_t prot);
/*
* Memory allocation interfaces
*/
#define VMEM_ALLOC 0x01
#define VMEM_FREE 0x02
#ifndef VMALLOC_TOTAL
#define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START)
#endif
/*
* vmem_* is an interface to a low level arena-based memory allocator on
* Illumos that is used to allocate virtual address space. The kmem SLAB
* allocator allocates slabs from it. Then the generic allocation functions
* kmem_{alloc,zalloc,free}() are layered on top of SLAB allocators.
*
* On Linux, the primary means of doing allocations is via kmalloc(), which
* is similarly layered on top of something called the buddy allocator. The
* buddy allocator is not available to kernel modules, it uses physical
* memory addresses rather than virtual memory addresses and is prone to
* fragmentation.
*
* Linux sets aside a relatively small address space for in-kernel virtual
* memory from which allocations can be done using vmalloc(). It might seem
* like a good idea to use vmalloc() to implement something similar to
* Illumos' allocator. However, this has the following problems:
*
* 1. Page directory table allocations are hard coded to use GFP_KERNEL.
* Consequently, any KM_PUSHPAGE or KM_NOSLEEP allocations done using
* vmalloc() will not have proper semantics.
*
* 2. Address space exhaustion is a real issue on 32-bit platforms where
* only a few 100MB are available. The kernel will handle it by spinning
* when it runs out of address space.
*
* 3. All vmalloc() allocations and frees are protected by a single global
* lock which serializes all allocations.
*
* 4. Accessing /proc/meminfo and /proc/vmallocinfo will iterate the entire
* list. The former will sum the allocations while the latter will print
* them to user space in a way that user space can keep the lock held
* indefinitely. When the total number of mapped allocations is large
* (several 100,000) a large amount of time will be spent waiting on locks.
*
* 5. Linux has a wait_on_bit() locking primitive that assumes physical
* memory is used, it simply does not work on virtual memory. Certain
* Linux structures (e.g. the superblock) use them and might be embedded
* into a structure from Illumos. This makes using Linux virtual memory
* unsafe in certain situations.
*
* It follows that we cannot obtain identical semantics to those on Illumos.
* Consequently, we implement the kmem_{alloc,zalloc,free}() functions in
* such a way that they can be used as drop-in replacements for small vmem_*
* allocations (8MB in size or smaller) and map vmem_{alloc,zalloc,free}()
* to them.
*/
#define vmem_alloc(sz, fl) spl_vmem_alloc((sz), (fl), __func__, __LINE__)
#define vmem_zalloc(sz, fl) spl_vmem_zalloc((sz), (fl), __func__, __LINE__)
#define vmem_free(ptr, sz) spl_vmem_free((ptr), (sz))
extern void *spl_vmem_alloc(size_t sz, int fl, const char *func, int line);
extern void *spl_vmem_zalloc(size_t sz, int fl, const char *func, int line);
extern void spl_vmem_free(const void *ptr, size_t sz);
int spl_vmem_init(void);
void spl_vmem_fini(void);
#endif /* _SPL_VMEM_H */

View File

@ -29,118 +29,16 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/swap.h> #include <linux/swap.h>
#include <linux/highmem.h> #include <linux/highmem.h>
#include <linux/vmalloc.h>
#include <sys/types.h> #include <sys/types.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
/* These values are loosely coupled with the VM page reclaim. #define membar_producer() smp_wmb()
* Linux uses its own heuristics to trigger page reclamation, and #define physmem totalram_pages
* because those interface are difficult to interface with. These #define freemem nr_free_pages()
* values should only be considered as a rough guide to the system
* memory state and not as direct evidence that page reclamation.
* is or is not currently in progress.
*/
#define membar_producer() smp_wmb()
#define physmem totalram_pages #define xcopyin(from, to, size) copy_from_user(to, from, size)
#define freemem nr_free_pages() #define xcopyout(from, to, size) copy_to_user(to, from, size)
#define availrmem spl_kmem_availrmem()
extern pgcnt_t minfree; /* Sum of zone->pages_min */
extern pgcnt_t desfree; /* Sum of zone->pages_low */
extern pgcnt_t lotsfree; /* Sum of zone->pages_high */
extern pgcnt_t needfree; /* Always 0 unused in new Solaris */
extern pgcnt_t swapfs_minfree; /* Solaris default value */
extern pgcnt_t swapfs_reserve; /* Solaris default value */
extern vmem_t *heap_arena; /* primary kernel heap arena */
extern vmem_t *zio_alloc_arena; /* arena for zio caches */
extern vmem_t *zio_arena; /* arena for allocating zio memory */
extern pgcnt_t spl_kmem_availrmem(void);
extern size_t vmem_size(vmem_t *vmp, int typemask);
/*
* The following symbols are available for use within the kernel
* itself, and they used to be available in older kernels. But it
* looks like they have been removed perhaps due to lack of use.
* For our purposes we need them to access the global memory state
* of the system, which is even available to user space process
* in /proc/meminfo. It's odd to me that there is no kernel API
* to get the same information, minimally the proc handler for
* the above mentioned /proc/meminfo file would make use of it.
*/
/* Source linux/fs/proc/mmu.c */
#ifndef HAVE_GET_VMALLOC_INFO
#ifdef CONFIG_MMU
#ifndef HAVE_VMALLOC_INFO
struct vmalloc_info {
unsigned long used;
unsigned long largest_chunk;
};
#endif
typedef void (*get_vmalloc_info_t)(struct vmalloc_info *);
extern get_vmalloc_info_t get_vmalloc_info_fn;
# define VMEM_ALLOC 0x01
# define VMEM_FREE 0x02
# define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START)
# define get_vmalloc_info(vmi) get_vmalloc_info_fn(vmi)
#else
# error "CONFIG_MMU must be defined"
#endif /* CONFIG_MMU */
#endif /* HAVE_GET_VMALLOC_INFO */
#ifdef HAVE_PGDAT_HELPERS
/* Source linux/mm/mmzone.c */
# ifndef HAVE_FIRST_ONLINE_PGDAT
typedef struct pglist_data *(*first_online_pgdat_t)(void);
extern first_online_pgdat_t first_online_pgdat_fn;
# define first_online_pgdat() first_online_pgdat_fn()
# endif /* HAVE_FIRST_ONLINE_PGDAT */
# ifndef HAVE_NEXT_ONLINE_PGDAT
typedef struct pglist_data *(*next_online_pgdat_t)(struct pglist_data *);
extern next_online_pgdat_t next_online_pgdat_fn;
# define next_online_pgdat(pgd) next_online_pgdat_fn(pgd)
# endif /* HAVE_NEXT_ONLINE_PGDAT */
# ifndef HAVE_NEXT_ZONE
typedef struct zone *(*next_zone_t)(struct zone *);
extern next_zone_t next_zone_fn;
# define next_zone(zone) next_zone_fn(zone)
# endif /* HAVE_NEXT_ZONE */
#else /* HAVE_PGDAT_HELPERS */
# ifndef HAVE_PGDAT_LIST
extern struct pglist_data *pgdat_list_addr;
# define pgdat_list pgdat_list_addr
# endif /* HAVE_PGDAT_LIST */
#endif /* HAVE_PGDAT_HELPERS */
/* Source linux/mm/vmstat.c */
#if defined(NEED_GET_ZONE_COUNTS) && !defined(HAVE_GET_ZONE_COUNTS)
typedef void (*get_zone_counts_t)(unsigned long *, unsigned long *,
unsigned long *);
extern get_zone_counts_t get_zone_counts_fn;
# define get_zone_counts(a,i,f) get_zone_counts_fn(a,i,f)
#endif /* NEED_GET_ZONE_COUNTS && !HAVE_GET_ZONE_COUNTS */
typedef enum spl_zone_stat_item {
SPL_NR_FREE_PAGES,
SPL_NR_INACTIVE,
SPL_NR_ACTIVE,
SPL_NR_ZONE_STAT_ITEMS
} spl_zone_stat_item_t;
extern unsigned long spl_global_page_state(spl_zone_stat_item_t);
#define xcopyin(from, to, size) copy_from_user(to, from, size)
#define xcopyout(from, to, size) copy_to_user(to, from, size)
static __inline__ int static __inline__ int
copyin(const void *from, void *to, size_t len) copyin(const void *from, void *to, size_t len)

View File

@ -103,14 +103,6 @@
#define CREATE_XATTR_DIR 0x04 #define CREATE_XATTR_DIR 0x04
#define ATTR_NOACLCHECK 0x20 #define ATTR_NOACLCHECK 0x20
#ifdef HAVE_PATH_IN_NAMEIDATA
# define nd_dentry path.dentry
# define nd_mnt path.mnt
#else
# define nd_dentry dentry
# define nd_mnt mnt
#endif
typedef enum vtype { typedef enum vtype {
VNON = 0, VNON = 0,
VREG = 1, VREG = 1,
@ -194,7 +186,6 @@ extern file_t *vn_getf(int fd);
extern void vn_releasef(int fd); extern void vn_releasef(int fd);
extern int vn_set_pwd(const char *filename); extern int vn_set_pwd(const char *filename);
int spl_vn_init_kallsyms_lookup(void);
int spl_vn_init(void); int spl_vn_init(void);
void spl_vn_fini(void); void spl_vn_fini(void);

View File

@ -27,7 +27,10 @@
#include <sys/byteorder.h> #include <sys/byteorder.h>
#define zone_dataset_visible(x, y) (1) #define GLOBAL_ZONEID 0
#define INGLOBALZONE(z) (1)
#define zone_dataset_visible(x, y) (1)
#define crgetzoneid(x) (GLOBAL_ZONEID)
#define INGLOBALZONE(z) (1)
#endif /* SPL_ZONE_H */ #endif /* SPL_ZONE_H */

View File

@ -9,6 +9,6 @@ USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL if CONFIG_KERNEL
kerneldir = /usr/src/spl-$(VERSION)/include/util kerneldir = @prefix@/src/spl-$(VERSION)/include/util
kernel_HEADERS = $(KERNEL_H) kernel_HEADERS = $(KERNEL_H)
endif endif

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -52,11 +52,11 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_HEADER = $(top_builddir)/spl_config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
@ -83,6 +83,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(kerneldir)" am__installdirs = "$(DESTDIR)$(kerneldir)"
HEADERS = $(kernel_HEADERS) HEADERS = $(kernel_HEADERS)
ETAGS = etags ETAGS = etags
@ -107,11 +113,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -142,7 +148,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -152,6 +157,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -185,6 +191,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -202,6 +209,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -234,7 +242,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -261,7 +268,7 @@ KERNEL_H = \
USER_H = USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
@CONFIG_KERNEL_TRUE@kerneldir = /usr/src/spl-$(VERSION)/include/util @CONFIG_KERNEL_TRUE@kerneldir = @prefix@/src/spl-$(VERSION)/include/util
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H) @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H)
all: all-am all: all-am
@ -319,9 +326,7 @@ uninstall-kernelHEADERS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \ @list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \ dir='$(DESTDIR)$(kerneldir)'; $(am__uninstall_files_from_dir)
echo " ( cd '$(DESTDIR)$(kerneldir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(kerneldir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@ -422,10 +427,15 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:

View File

@ -10,6 +10,6 @@ USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL if CONFIG_KERNEL
kerneldir = /usr/src/spl-$(VERSION)/include/vm kerneldir = @prefix@/src/spl-$(VERSION)/include/vm
kernel_HEADERS = $(KERNEL_H) kernel_HEADERS = $(KERNEL_H)
endif endif

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -52,11 +52,11 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_HEADER = $(top_builddir)/spl_config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
@ -84,6 +84,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(kerneldir)" am__installdirs = "$(DESTDIR)$(kerneldir)"
HEADERS = $(kernel_HEADERS) HEADERS = $(kernel_HEADERS)
ETAGS = etags ETAGS = etags
@ -108,11 +114,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -143,7 +149,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -153,6 +158,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -186,6 +192,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -203,6 +210,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -235,7 +243,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -263,7 +270,7 @@ KERNEL_H = \
USER_H = USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
@CONFIG_KERNEL_TRUE@kerneldir = /usr/src/spl-$(VERSION)/include/vm @CONFIG_KERNEL_TRUE@kerneldir = @prefix@/src/spl-$(VERSION)/include/vm
@CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H) @CONFIG_KERNEL_TRUE@kernel_HEADERS = $(KERNEL_H)
all: all-am all: all-am
@ -321,9 +328,7 @@ uninstall-kernelHEADERS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \ @list='$(kernel_HEADERS)'; test -n "$(kerneldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \ dir='$(DESTDIR)$(kerneldir)'; $(am__uninstall_files_from_dir)
echo " ( cd '$(DESTDIR)$(kerneldir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(kerneldir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@ -424,10 +429,15 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -64,8 +64,8 @@ LTLIBRARIES = $(noinst_LTLIBRARIES)
libcommon_la_LIBADD = libcommon_la_LIBADD =
am_libcommon_la_OBJECTS = list.lo am_libcommon_la_OBJECTS = list.lo
libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS)
AM_V_lt = $(am__v_lt_$(V)) AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent am__v_lt_0 = --silent
depcomp = $(SHELL) $(top_srcdir)/config/depcomp depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
@ -76,21 +76,21 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS) $(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_$(V)) AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@; am__v_CC_0 = @echo " CC " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
CCLD = $(CC) CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@ $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_$(V)) AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(libcommon_la_SOURCES) SOURCES = $(libcommon_la_SOURCES)
DIST_SOURCES = $(libcommon_la_SOURCES) DIST_SOURCES = $(libcommon_la_SOURCES)
@ -116,11 +116,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -151,7 +151,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -161,6 +160,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -194,6 +194,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -211,6 +212,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -243,7 +245,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -296,6 +297,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac; esac;
$(top_srcdir)/config/Rules.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@ -314,7 +316,7 @@ clean-noinstLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \ echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \ rm -f "$${dir}/so_locations"; \
done done
libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) $(EXTRA_libcommon_la_DEPENDENCIES)
$(AM_V_CCLD)$(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) $(AM_V_CCLD)$(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS)
mostlyclean-compile: mostlyclean-compile:
@ -328,26 +330,23 @@ distclean-compile:
.c.o: .c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $< @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
.c.obj: .c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo: .c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool: mostlyclean-libtool:
-rm -f *.lo -rm -f *.lo
@ -451,10 +450,15 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:

View File

@ -1 +1 @@
SUBDIRS = man1 SUBDIRS = man1 man5

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -50,11 +50,11 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_HEADER = $(top_builddir)/spl_config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
@ -118,11 +118,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -153,7 +153,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -163,6 +162,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -196,6 +196,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -213,6 +214,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -245,7 +247,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -265,7 +266,7 @@ target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
SUBDIRS = man1 SUBDIRS = man1 man5
all: all-recursive all: all-recursive
.SUFFIXES: .SUFFIXES:
@ -514,10 +515,15 @@ install-am: all-am
installcheck: installcheck-recursive installcheck: installcheck-recursive
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:

View File

@ -1,5 +1,4 @@
man_MANS = splat.1 dist_man_MANS = splat.1
EXTRA_DIST = $(man_MANS)
install-data-local: install-data-local:
$(INSTALL) -d -m 0755 "$(DESTDIR)$(mandir)/man1" $(INSTALL) -d -m 0755 "$(DESTDIR)$(mandir)/man1"

View File

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Inc. # Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -35,7 +35,8 @@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
target_triplet = @target@ target_triplet = @target@
subdir = man/man1 subdir = man/man1
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
$(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltoptions.m4 \
@ -50,11 +51,11 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/spl_config.h CONFIG_HEADER = $(top_builddir)/spl_config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V)) AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @ am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
@ -79,10 +80,16 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
man1dir = $(mandir)/man1 man1dir = $(mandir)/man1
am__installdirs = "$(DESTDIR)$(man1dir)" am__installdirs = "$(DESTDIR)$(man1dir)"
NROFF = nroff NROFF = nroff
MANS = $(man_MANS) MANS = $(dist_man_MANS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
ALIEN = @ALIEN@ ALIEN = @ALIEN@
@ -103,11 +110,11 @@ CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@ DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@ DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_LOG = @DEBUG_LOG@
DEBUG_SPL = @DEBUG_SPL@ DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@ DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@ DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@ DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@ DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
@ -138,7 +145,6 @@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LICENSE = @LICENSE@
LINUX = @LINUX@ LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@ LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@ LINUX_SYMBOLS = @LINUX_SYMBOLS@
@ -148,6 +154,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@ NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
@ -181,6 +188,7 @@ SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@ SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@ SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@ SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@ SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
@ -198,6 +206,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -230,7 +239,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -250,8 +258,7 @@ target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
man_MANS = splat.1 dist_man_MANS = splat.1
EXTRA_DIST = $(man_MANS)
all: all-am all: all-am
.SUFFIXES: .SUFFIXES:
@ -291,12 +298,12 @@ mostlyclean-libtool:
clean-libtool: clean-libtool:
-rm -rf .libs _libs -rm -rf .libs _libs
install-man1: $(man_MANS) install-man1: $(dist_man_MANS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
@list=''; test -n "$(man1dir)" || exit 0; \ @list=''; test -n "$(man1dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \ { for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \ sed -n '/\.1[a-z]*$$/p'; \
} | while read p; do \ } | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
@ -322,13 +329,11 @@ uninstall-man1:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list=''; test -n "$(man1dir)" || exit 0; \ @list=''; test -n "$(man1dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \ files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \ sed -n '/\.1[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
test -z "$$files" || { \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
tags: TAGS tags: TAGS
TAGS: TAGS:
@ -396,10 +401,15 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:

4
man/man5/Makefile.am Normal file
View File

@ -0,0 +1,4 @@
dist_man_MANS = spl-module-parameters.5
install-data-local:
$(INSTALL) -d -m 0755 "$(DESTDIR)$(mandir)/man5"

512
man/man5/Makefile.in Normal file
View File

@ -0,0 +1,512 @@
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = man/man5
DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \
$(top_srcdir)/config/ltoptions.m4 \
$(top_srcdir)/config/ltsugar.m4 \
$(top_srcdir)/config/ltversion.m4 \
$(top_srcdir)/config/lt~obsolete.m4 \
$(top_srcdir)/config/spl-build.m4 \
$(top_srcdir)/config/spl-meta.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/spl_config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
man5dir = $(mandir)/man5
am__installdirs = "$(DESTDIR)$(man5dir)"
NROFF = nroff
MANS = $(dist_man_MANS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALIEN = @ALIEN@
ALIEN_VERSION = @ALIEN_VERSION@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEBUG_KMEM = @DEBUG_KMEM@
DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
DEBUG_SPL = @DEBUG_SPL@
DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPKG = @DPKG@
DPKGBUILD = @DPKGBUILD@
DPKGBUILD_VERSION = @DPKGBUILD_VERSION@
DPKG_VERSION = @DPKG_VERSION@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
HAVE_ALIEN = @HAVE_ALIEN@
HAVE_DPKG = @HAVE_DPKG@
HAVE_DPKGBUILD = @HAVE_DPKGBUILD@
HAVE_RPM = @HAVE_RPM@
HAVE_RPMBUILD = @HAVE_RPMBUILD@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
KERNELCPPFLAGS = @KERNELCPPFLAGS@
KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LINUX = @LINUX@
LINUX_OBJ = @LINUX_OBJ@
LINUX_SYMBOLS = @LINUX_SYMBOLS@
LINUX_VERSION = @LINUX_VERSION@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
RPM = @RPM@
RPMBUILD = @RPMBUILD@
RPMBUILD_VERSION = @RPMBUILD_VERSION@
RPM_DEFINE_COMMON = @RPM_DEFINE_COMMON@
RPM_DEFINE_DKMS = @RPM_DEFINE_DKMS@
RPM_DEFINE_KMOD = @RPM_DEFINE_KMOD@
RPM_DEFINE_UTIL = @RPM_DEFINE_UTIL@
RPM_SPEC_DIR = @RPM_SPEC_DIR@
RPM_VERSION = @RPM_VERSION@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SPL_CONFIG = @SPL_CONFIG@
SPL_META_ALIAS = @SPL_META_ALIAS@
SPL_META_AUTHOR = @SPL_META_AUTHOR@
SPL_META_DATA = @SPL_META_DATA@
SPL_META_LICENSE = @SPL_META_LICENSE@
SPL_META_LT_AGE = @SPL_META_LT_AGE@
SPL_META_LT_CURRENT = @SPL_META_LT_CURRENT@
SPL_META_LT_REVISION = @SPL_META_LT_REVISION@
SPL_META_NAME = @SPL_META_NAME@
SPL_META_RELEASE = @SPL_META_RELEASE@
SPL_META_VERSION = @SPL_META_VERSION@
SRPM_DEFINE_COMMON = @SRPM_DEFINE_COMMON@
SRPM_DEFINE_DKMS = @SRPM_DEFINE_DKMS@
SRPM_DEFINE_KMOD = @SRPM_DEFINE_KMOD@
SRPM_DEFINE_UTIL = @SRPM_DEFINE_UTIL@
STRIP = @STRIP@
VENDOR = @VENDOR@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
dist_man_MANS = spl-module-parameters.5
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/man5/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu man/man5/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-man5: $(dist_man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
@list=''; test -n "$(man5dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.5[a-z]*$$/p'; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \
done; }
uninstall-man5:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man5dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.5[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@list='$(MANS)'; if test -n "$$list"; then \
list=`for p in $$list; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
if test -n "$$list" && \
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
echo " typically \`make maintainer-clean' will remove them" >&2; \
exit 1; \
else :; fi; \
else :; fi
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(MANS)
installdirs:
for dir in "$(DESTDIR)$(man5dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-data-local install-man
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man: install-man5
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-man
uninstall-man: uninstall-man5
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-local install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-man5 install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am uninstall uninstall-am uninstall-man uninstall-man5
install-data-local:
$(INSTALL) -d -m 0755 "$(DESTDIR)$(mandir)/man5"
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,251 @@
'\" te
.\"
.\" Copyright 2013 Turbo Fredriksson <turbo@bayour.com>. All rights reserved.
.\"
.TH SPL-MODULE-PARAMETERS 5 "Nov 18, 2013"
.SH NAME
spl\-module\-parameters \- SPL module parameters
.SH DESCRIPTION
.sp
.LP
Description of the different parameters to the SPL module.
.SS "Module parameters"
.sp
.LP
.sp
.ne 2
.na
\fBspl_kmem_cache_expire\fR (uint)
.ad
.RS 12n
Cache expiration is part of default Illumos cache behavior. The idea is
that objects in magazines which have not been recently accessed should be
returned to the slabs periodically. This is known as cache aging and
when enabled objects will be typically returned after 15 seconds.
.sp
On the other hand Linux slabs are designed to never move objects back to
the slabs unless there is memory pressure. This is possible because under
Linux the cache will be notified when memory is low and objects can be
released.
.sp
By default only the Linux method is enabled. It has been shown to improve
responsiveness on low memory systems and not negatively impact the performance
of systems with more memory. This policy may be changed by setting the
\fBspl_kmem_cache_expire\fR bit mask as follows, both policies may be enabled
concurrently.
.sp
0x01 - Aging (Illumos), 0x02 - Low memory (Linux)
.sp
Default value: \fB0x02\fR
.RE
.sp
.ne 2
.na
\fBspl_kmem_cache_reclaim\fR (uint)
.ad
.RS 12n
When this is set it prevents Linux from being able to rapidly reclaim all the
memory held by the kmem caches. This may be useful in circumstances where
it's preferable that Linux reclaim memory from some other subsystem first.
Setting this will increase the likelihood out of memory events on a memory
constrained system.
.sp
Default value: \fB0\fR
.RE
.sp
.ne 2
.na
\fBspl_kmem_cache_obj_per_slab\fR (uint)
.ad
.RS 12n
The preferred number of objects per slab in the cache. In general, a larger
value will increase the caches memory footprint while decreasing the time
required to perform an allocation. Conversely, a smaller value will minimize
the footprint and improve cache reclaim time but individual allocations may
take longer.
.sp
Default value: \fB8\fR
.RE
.sp
.ne 2
.na
\fBspl_kmem_cache_obj_per_slab_min\fR (uint)
.ad
.RS 12n
The minimum number of objects allowed per slab. Normally slabs will contain
\fBspl_kmem_cache_obj_per_slab\fR objects but for caches that contain very
large objects it's desirable to only have a few, or even just one, object per
slab.
.sp
Default value: \fB1\fR
.RE
.sp
.ne 2
.na
\fBspl_kmem_cache_max_size\fR (uint)
.ad
.RS 12n
The maximum size of a kmem cache slab in MiB. This effectively limits
the maximum cache object size to \fBspl_kmem_cache_max_size\fR /
\fBspl_kmem_cache_obj_per_slab\fR. Caches may not be created with
object sized larger than this limit.
.sp
Default value: \fB32 (64-bit) or 4 (32-bit)\fR
.RE
.sp
.ne 2
.na
\fBspl_kmem_cache_slab_limit\fR (uint)
.ad
.RS 12n
For small objects the Linux slab allocator should be used to make the most
efficient use of the memory. However, large objects are not supported by
the Linux slab and therefore the SPL implementation is preferred. This
value is used to determine the cutoff between a small and large object.
.sp
Objects of \fBspl_kmem_cache_slab_limit\fR or smaller will be allocated
using the Linux slab allocator, large objects use the SPL allocator. A
cutoff of 16K was determined to be optimal for architectures using 4K pages.
.sp
Default value: \fB16,384\fR
.RE
.sp
.ne 2
.na
\fBspl_kmem_cache_kmem_limit\fR (uint)
.ad
.RS 12n
Depending on the size of a cache object it may be backed by kmalloc()'d
or vmalloc()'d memory. This is because the size of the required allocation
greatly impacts the best way to allocate the memory.
.sp
When objects are small and only a small number of memory pages need to be
allocated, ideally just one, then kmalloc() is very efficient. However,
when allocating multiple pages with kmalloc() it gets increasingly expensive
because the pages must be physically contiguous.
.sp
For this reason we shift to vmalloc() for slabs of large objects which
which removes the need for contiguous pages. We cannot use vmalloc() in
all cases because there is significant locking overhead involved. This
function takes a single global lock over the entire virtual address range
which serializes all allocations. Using slightly different allocation
functions for small and large objects allows us to handle a wide range of
object sizes.
.sh
The \fBspl_kmem_cache_kmem_limit\fR value is used to determine this cutoff
size. One quarter the PAGE_SIZE is used as the default value because
\fBspl_kmem_cache_obj_per_slab\fR defaults to 16. This means that at
most we will need to allocate four contiguous pages.
.sp
Default value: \fBPAGE_SIZE/4\fR
.RE
.sp
.ne 2
.na
\fBspl_kmem_alloc_warn\fR (uint)
.ad
.RS 12n
As a general rule kmem_alloc() allocations should be small, preferably
just a few pages since they must by physically contiguous. Therefore, a
rate limited warning will be printed to the console for any kmem_alloc()
which exceeds a reasonable threshold.
.sp
The default warning threshold is set to eight pages but capped at 32K to
accommodate systems using large pages. This value was selected to be small
enough to ensure the largest allocations are quickly noticed and fixed.
But large enough to avoid logging any warnings when a allocation size is
larger than optimal but not a serious concern. Since this value is tunable,
developers are encouraged to set it lower when testing so any new largish
allocations are quickly caught. These warnings may be disabled by setting
the threshold to zero.
.sp
Default value: \fB32,768\fR
.RE
.sp
.ne 2
.na
\fBspl_kmem_alloc_max\fR (uint)
.ad
.RS 12n
Large kmem_alloc() allocations will fail if they exceed KMALLOC_MAX_SIZE.
Allocations which are marginally smaller than this limit may succeed but
should still be avoided due to the expense of locating a contiguous range
of free pages. Therefore, a maximum kmem size with reasonable safely
margin of 4x is set. Kmem_alloc() allocations larger than this maximum
will quickly fail. Vmem_alloc() allocations less than or equal to this
value will use kmalloc(), but shift to vmalloc() when exceeding this value.
.sp
Default value: \fBKMALLOC_MAX_SIZE/4\fR
.RE
.sp
.ne 2
.na
\fBspl_kmem_cache_magazine_size\fR (uint)
.ad
.RS 12n
Cache magazines are an optimization designed to minimize the cost of
allocating memory. They do this by keeping a per-cpu cache of recently
freed objects, which can then be reallocated without taking a lock. This
can improve performance on highly contended caches. However, because
objects in magazines will prevent otherwise empty slabs from being
immediately released this may not be ideal for low memory machines.
.sp
For this reason \fBspl_kmem_cache_magazine_size\fR can be used to set a
maximum magazine size. When this value is set to 0 the magazine size will
be automatically determined based on the object size. Otherwise magazines
will be limited to 2-256 objects per magazine (i.e per cpu). Magazines
may never be entirely disabled in this implementation.
.sp
Default value: \fB0\fR
.RE
.sp
.ne 2
.na
\fBspl_hostid\fR (ulong)
.ad
.RS 12n
The system hostid, when set this can be used to uniquely identify a system.
By default this value is set to zero which indicates the hostid is disabled.
It can be explicitly enabled by placing a unique non-zero value in
\fB/etc/hostid/\fR.
.sp
Default value: \fB0\fR
.RE
.sp
.ne 2
.na
\fBspl_hostid_path\fR (charp)
.ad
.RS 12n
The expected path to locate the system hostid when specified. This value
may be overridden for non-standard configurations.
.sp
Default value: \fB/etc/hostid\fR
.RE
.sp
.ne 2
.na
\fBspl_taskq_thread_bind\fR (int)
.ad
.RS 12n
Bind taskq threads to specific CPUs. When enabled all taskq threads will
be distributed evenly over the available CPUs. By default, this behavior
is disabled to allow the Linux scheduler the maximum flexibility to determine
where a thread should run.
.sp
Default value: \fB0\fR
.RE

View File

@ -22,7 +22,8 @@ modules_install:
@# Install the kernel modules @# Install the kernel modules
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \ $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \
INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \ INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
KERNELRELEASE=@LINUX_VERSION@
@# Remove extraneous build products when packaging @# Remove extraneous build products when packaging
kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \ kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
if [ -n $$kmoddir ]; then \ if [ -n $$kmoddir ]; then \

View File

@ -6,15 +6,15 @@ EXTRA_CFLAGS = $(SPL_MODULE_CFLAGS) @KERNELCPPFLAGS@
# Solaris porting layer module # Solaris porting layer module
obj-$(CONFIG_SPL) := $(MODULE).o obj-$(CONFIG_SPL) := $(MODULE).o
$(MODULE)-objs += @top_srcdir@/module/spl/spl-debug.o
$(MODULE)-objs += @top_srcdir@/module/spl/spl-proc.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-proc.o
$(MODULE)-objs += @top_srcdir@/module/spl/spl-kmem.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-kmem.o
$(MODULE)-objs += @top_srcdir@/module/spl/spl-kmem-cache.o
$(MODULE)-objs += @top_srcdir@/module/spl/spl-vmem.o
$(MODULE)-objs += @top_srcdir@/module/spl/spl-thread.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-thread.o
$(MODULE)-objs += @top_srcdir@/module/spl/spl-taskq.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-taskq.o
$(MODULE)-objs += @top_srcdir@/module/spl/spl-rwlock.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-rwlock.o
$(MODULE)-objs += @top_srcdir@/module/spl/spl-vnode.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-vnode.o
$(MODULE)-objs += @top_srcdir@/module/spl/spl-err.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-err.o
$(MODULE)-objs += @top_srcdir@/module/spl/spl-time.o
$(MODULE)-objs += @top_srcdir@/module/spl/spl-kobj.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-kobj.o
$(MODULE)-objs += @top_srcdir@/module/spl/spl-generic.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-generic.o
$(MODULE)-objs += @top_srcdir@/module/spl/spl-atomic.o $(MODULE)-objs += @top_srcdir@/module/spl/spl-atomic.o

View File

@ -25,20 +25,11 @@
\*****************************************************************************/ \*****************************************************************************/
#include <sys/condvar.h> #include <sys/condvar.h>
#include <spl-debug.h> #include <sys/time.h>
#ifdef SS_DEBUG_SUBSYS
#undef SS_DEBUG_SUBSYS
#endif
#define SS_DEBUG_SUBSYS SS_CONDVAR
void void
__cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg) __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg)
{ {
int flags = KM_SLEEP;
SENTRY;
ASSERT(cvp); ASSERT(cvp);
ASSERT(name == NULL); ASSERT(name == NULL);
ASSERT(type == CV_DEFAULT); ASSERT(type == CV_DEFAULT);
@ -50,14 +41,6 @@ __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg)
atomic_set(&cvp->cv_waiters, 0); atomic_set(&cvp->cv_waiters, 0);
atomic_set(&cvp->cv_refs, 1); atomic_set(&cvp->cv_refs, 1);
cvp->cv_mutex = NULL; cvp->cv_mutex = NULL;
/* We may be called when there is a non-zero preempt_count or
* interrupts are disabled is which case we must not sleep.
*/
if (current_thread_info()->preempt_count || irqs_disabled())
flags = KM_NOSLEEP;
SEXIT;
} }
EXPORT_SYMBOL(__cv_init); EXPORT_SYMBOL(__cv_init);
@ -76,7 +59,6 @@ cv_destroy_wakeup(kcondvar_t *cvp)
void void
__cv_destroy(kcondvar_t *cvp) __cv_destroy(kcondvar_t *cvp)
{ {
SENTRY;
ASSERT(cvp); ASSERT(cvp);
ASSERT(cvp->cv_magic == CV_MAGIC); ASSERT(cvp->cv_magic == CV_MAGIC);
@ -91,8 +73,6 @@ __cv_destroy(kcondvar_t *cvp)
ASSERT3S(atomic_read(&cvp->cv_refs), ==, 0); ASSERT3S(atomic_read(&cvp->cv_refs), ==, 0);
ASSERT3S(atomic_read(&cvp->cv_waiters), ==, 0); ASSERT3S(atomic_read(&cvp->cv_waiters), ==, 0);
ASSERT3S(waitqueue_active(&cvp->cv_event), ==, 0); ASSERT3S(waitqueue_active(&cvp->cv_event), ==, 0);
SEXIT;
} }
EXPORT_SYMBOL(__cv_destroy); EXPORT_SYMBOL(__cv_destroy);
@ -100,7 +80,6 @@ static void
cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state, int io) cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state, int io)
{ {
DEFINE_WAIT(wait); DEFINE_WAIT(wait);
SENTRY;
ASSERT(cvp); ASSERT(cvp);
ASSERT(mp); ASSERT(mp);
@ -135,8 +114,6 @@ cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state, int io)
finish_wait(&cvp->cv_event, &wait); finish_wait(&cvp->cv_event, &wait);
atomic_dec(&cvp->cv_refs); atomic_dec(&cvp->cv_refs);
SEXIT;
} }
void void
@ -169,7 +146,6 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp,
{ {
DEFINE_WAIT(wait); DEFINE_WAIT(wait);
clock_t time_left; clock_t time_left;
SENTRY;
ASSERT(cvp); ASSERT(cvp);
ASSERT(mp); ASSERT(mp);
@ -187,7 +163,7 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp,
time_left = expire_time - jiffies; time_left = expire_time - jiffies;
if (time_left <= 0) { if (time_left <= 0) {
atomic_dec(&cvp->cv_refs); atomic_dec(&cvp->cv_refs);
SRETURN(-1); return (-1);
} }
prepare_to_wait_exclusive(&cvp->cv_event, &wait, state); prepare_to_wait_exclusive(&cvp->cv_event, &wait, state);
@ -209,7 +185,7 @@ __cv_timedwait_common(kcondvar_t *cvp, kmutex_t *mp,
finish_wait(&cvp->cv_event, &wait); finish_wait(&cvp->cv_event, &wait);
atomic_dec(&cvp->cv_refs); atomic_dec(&cvp->cv_refs);
SRETURN(time_left > 0 ? time_left : -1); return (time_left > 0 ? time_left : -1);
} }
clock_t clock_t
@ -226,10 +202,89 @@ __cv_timedwait_interruptible(kcondvar_t *cvp, kmutex_t *mp, clock_t exp_time)
} }
EXPORT_SYMBOL(__cv_timedwait_interruptible); EXPORT_SYMBOL(__cv_timedwait_interruptible);
/*
*'expire_time' argument is an absolute clock time in nanoseconds.
* Return value is time left (expire_time - now) or -1 if timeout occurred.
*/
static clock_t
__cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp,
hrtime_t expire_time, int state)
{
DEFINE_WAIT(wait);
hrtime_t time_left, now;
unsigned long time_left_us;
ASSERT(cvp);
ASSERT(mp);
ASSERT(cvp->cv_magic == CV_MAGIC);
ASSERT(mutex_owned(mp));
atomic_inc(&cvp->cv_refs);
if (cvp->cv_mutex == NULL)
cvp->cv_mutex = mp;
/* Ensure the same mutex is used by all callers */
ASSERT(cvp->cv_mutex == mp);
now = gethrtime();
time_left = expire_time - now;
if (time_left <= 0) {
atomic_dec(&cvp->cv_refs);
return (-1);
}
time_left_us = time_left / NSEC_PER_USEC;
prepare_to_wait_exclusive(&cvp->cv_event, &wait, state);
atomic_inc(&cvp->cv_waiters);
/* Mutex should be dropped after prepare_to_wait() this
* ensures we're linked in to the waiters list and avoids the
* race where 'cvp->cv_waiters > 0' but the list is empty. */
mutex_exit(mp);
/* Allow a 100 us range to give kernel an opportunity to coalesce
* interrupts */
usleep_range(time_left_us, time_left_us + 100);
mutex_enter(mp);
/* No more waiters a different mutex could be used */
if (atomic_dec_and_test(&cvp->cv_waiters)) {
cvp->cv_mutex = NULL;
wake_up(&cvp->cv_destroy);
}
finish_wait(&cvp->cv_event, &wait);
atomic_dec(&cvp->cv_refs);
time_left = expire_time - gethrtime();
return (time_left > 0 ? time_left : -1);
}
/*
* Compatibility wrapper for the cv_timedwait_hires() Illumos interface.
*/
clock_t
cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim,
hrtime_t res, int flag)
{
if (res > 1) {
/*
* Align expiration to the specified resolution.
*/
if (flag & CALLOUT_FLAG_ROUNDUP)
tim += res - 1;
tim = (tim / res) * res;
}
if (!(flag & CALLOUT_FLAG_ABSOLUTE))
tim += gethrtime();
return __cv_timedwait_hires(cvp, mp, tim, TASK_UNINTERRUPTIBLE);
}
EXPORT_SYMBOL(cv_timedwait_hires);
void void
__cv_signal(kcondvar_t *cvp) __cv_signal(kcondvar_t *cvp)
{ {
SENTRY;
ASSERT(cvp); ASSERT(cvp);
ASSERT(cvp->cv_magic == CV_MAGIC); ASSERT(cvp->cv_magic == CV_MAGIC);
atomic_inc(&cvp->cv_refs); atomic_inc(&cvp->cv_refs);
@ -242,14 +297,12 @@ __cv_signal(kcondvar_t *cvp)
wake_up(&cvp->cv_event); wake_up(&cvp->cv_event);
atomic_dec(&cvp->cv_refs); atomic_dec(&cvp->cv_refs);
SEXIT;
} }
EXPORT_SYMBOL(__cv_signal); EXPORT_SYMBOL(__cv_signal);
void void
__cv_broadcast(kcondvar_t *cvp) __cv_broadcast(kcondvar_t *cvp)
{ {
SENTRY;
ASSERT(cvp); ASSERT(cvp);
ASSERT(cvp->cv_magic == CV_MAGIC); ASSERT(cvp->cv_magic == CV_MAGIC);
atomic_inc(&cvp->cv_refs); atomic_inc(&cvp->cv_refs);
@ -260,6 +313,5 @@ __cv_broadcast(kcondvar_t *cvp)
wake_up_all(&cvp->cv_event); wake_up_all(&cvp->cv_event);
atomic_dec(&cvp->cv_refs); atomic_dec(&cvp->cv_refs);
SEXIT;
} }
EXPORT_SYMBOL(__cv_broadcast); EXPORT_SYMBOL(__cv_broadcast);

View File

@ -32,11 +32,6 @@
#define DEBUG_SUBSYSTEM S_CRED #define DEBUG_SUBSYSTEM S_CRED
#ifdef HAVE_GROUPS_SEARCH
/* Symbol may be exported by custom kernel patch */
#define cr_groups_search(gi, grp) groups_search(gi, grp)
#else
/* Implementation from 2.6.30 kernel */
static int static int
#ifdef HAVE_KUIDGID_T #ifdef HAVE_KUIDGID_T
cr_groups_search(const struct group_info *group_info, kgid_t grp) cr_groups_search(const struct group_info *group_info, kgid_t grp)
@ -44,7 +39,8 @@ cr_groups_search(const struct group_info *group_info, kgid_t grp)
cr_groups_search(const struct group_info *group_info, gid_t grp) cr_groups_search(const struct group_info *group_info, gid_t grp)
#endif #endif
{ {
unsigned int left, right; unsigned int left, right, mid;
int cmp;
if (!group_info) if (!group_info)
return 0; return 0;
@ -52,8 +48,10 @@ cr_groups_search(const struct group_info *group_info, gid_t grp)
left = 0; left = 0;
right = group_info->ngroups; right = group_info->ngroups;
while (left < right) { while (left < right) {
unsigned int mid = (left+right)/2; mid = (left + right) / 2;
int cmp = KGID_TO_SGID(grp) - KGID_TO_SGID(GROUP_AT(group_info, mid)); cmp = KGID_TO_SGID(grp) -
KGID_TO_SGID(GROUP_AT(group_info, mid));
if (cmp > 0) if (cmp > 0)
left = mid + 1; left = mid + 1;
else if (cmp < 0) else if (cmp < 0)
@ -63,14 +61,6 @@ cr_groups_search(const struct group_info *group_info, gid_t grp)
} }
return 0; return 0;
} }
#endif
#ifdef HAVE_CRED_STRUCT
/*
* As of 2.6.29 a clean credential API appears in the linux kernel.
* We attempt to layer the Solaris API on top of the linux API.
*/
/* Hold a reference on the credential and group info */ /* Hold a reference on the credential and group info */
void void
@ -120,7 +110,7 @@ crgetgroups(const cred_t *cr)
return gids; return gids;
} }
/* Check if the passed gid is available is in supplied credential. */ /* Check if the passed gid is available in supplied credential. */
int int
groupmember(gid_t gid, const cred_t *cr) groupmember(gid_t gid, const cred_t *cr)
{ {
@ -128,93 +118,12 @@ groupmember(gid_t gid, const cred_t *cr)
int rc; int rc;
gi = get_group_info(cr->group_info); gi = get_group_info(cr->group_info);
rc = cr_groups_search(cr->group_info, SGID_TO_KGID(gid)); rc = cr_groups_search(gi, SGID_TO_KGID(gid));
put_group_info(gi); put_group_info(gi);
return rc; return rc;
} }
#else /* HAVE_CRED_STRUCT */
/*
* Until very recently all credential information was embedded in
* the linux task struct. For this reason to simulate a Solaris
* cred_t we need to pass the entire task structure around.
*/
/* Hold a reference on the credential and group info */
void crhold(cred_t *cr) { }
/* Free a reference on the credential and group info */
void crfree(cred_t *cr) { }
/* Return the number of supplemental groups */
int
crgetngroups(const cred_t *cr)
{
int lock, rc;
lock = (cr != current);
if (lock)
task_lock((struct task_struct *)cr);
get_group_info(cr->group_info);
rc = cr->group_info->ngroups;
put_group_info(cr->group_info);
if (lock)
task_unlock((struct task_struct *)cr);
return rc;
}
/*
* Return an array of supplemental gids. The returned address is safe
* to use as long as the caller has taken a reference with crhold().
* The caller is responsible for releasing the reference with crfree().
*/
gid_t *
crgetgroups(const cred_t *cr)
{
gid_t *gids;
int lock;
lock = (cr != current);
if (lock)
task_lock((struct task_struct *)cr);
get_group_info(cr->group_info);
gids = KGID_TO_SGID(cr->group_info->blocks[0]);
put_group_info(cr->group_info);
if (lock)
task_unlock((struct task_struct *)cr);
return gids;
}
/* Check if the passed gid is available is in supplied credential. */
int
groupmember(gid_t gid, const cred_t *cr)
{
int lock, rc;
lock = (cr != current);
if (lock)
task_lock((struct task_struct *)cr);
get_group_info(cr->group_info);
rc = cr_groups_search(cr->group_info, gid);
put_group_info(cr->group_info);
if (lock)
task_unlock((struct task_struct *)cr);
return rc;
}
#endif /* HAVE_CRED_STRUCT */
/* Return the effective user id */ /* Return the effective user id */
uid_t uid_t
crgetuid(const cred_t *cr) crgetuid(const cred_t *cr)

File diff suppressed because it is too large Load Diff

View File

@ -26,45 +26,81 @@
#include <sys/sysmacros.h> #include <sys/sysmacros.h>
#include <sys/cmn_err.h> #include <sys/cmn_err.h>
#include <spl-debug.h> #include <linux/ratelimit.h>
#ifdef SS_DEBUG_SUBSYS /*
#undef SS_DEBUG_SUBSYS * Limit the number of stack traces dumped to not more than 5 every
#endif * 60 seconds to prevent denial-of-service attacks from debug code.
*/
#define SS_DEBUG_SUBSYS SS_GENERIC DEFINE_RATELIMIT_STATE(dumpstack_ratelimit_state, 60 * HZ, 5);
#ifdef DEBUG_LOG
static char ce_prefix[CE_IGNORE][10] = { "", "NOTICE: ", "WARNING: ", "" };
static char ce_suffix[CE_IGNORE][2] = { "", "\n", "\n", "" };
#endif
void void
vpanic(const char *fmt, va_list ap) spl_dumpstack(void)
{ {
char msg[MAXMSGLEN]; if (__ratelimit(&dumpstack_ratelimit_state)) {
printk("Showing stack for process %d\n", current->pid);
dump_stack();
}
}
EXPORT_SYMBOL(spl_dumpstack);
vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); int
PANIC("%s", msg); spl_panic(const char *file, const char *func, int line, const char *fmt, ...) {
} /* vpanic() */ const char *newfile;
EXPORT_SYMBOL(vpanic); char msg[MAXMSGLEN];
va_list ap;
newfile = strrchr(file, '/');
if (newfile != NULL)
newfile = newfile + 1;
else
newfile = file;
va_start(ap, fmt);
(void) vsnprintf(msg, sizeof (msg), fmt, ap);
va_end(ap);
printk(KERN_EMERG "%s", msg);
printk(KERN_EMERG "PANIC at %s:%d:%s()\n", newfile, line, func);
spl_dumpstack();
/* Halt the thread to facilitate further debugging */
set_task_state(current, TASK_UNINTERRUPTIBLE);
while (1)
schedule();
/* Unreachable */
return (1);
}
EXPORT_SYMBOL(spl_panic);
void void
vcmn_err(int ce, const char *fmt, va_list ap) vcmn_err(int ce, const char *fmt, va_list ap)
{ {
char msg[MAXMSGLEN]; char msg[MAXMSGLEN];
if (ce == CE_PANIC) vsnprintf(msg, MAXMSGLEN - 1, fmt, ap);
vpanic(fmt, ap);
if (ce != CE_NOTE) { switch (ce) {
vsnprintf(msg, MAXMSGLEN - 1, fmt, ap); case CE_IGNORE:
break;
case CE_CONT:
printk("%s", msg);
break;
case CE_NOTE:
printk(KERN_NOTICE "NOTICE: %s\n", msg);
break;
case CE_WARN:
printk(KERN_WARNING "WARNING: %s\n", msg);
break;
case CE_PANIC:
printk(KERN_EMERG "PANIC: %s\n", msg);
spl_dumpstack();
if (fmt[0] == '!') /* Halt the thread to facilitate further debugging */
SDEBUG(SD_INFO, "%s%s%s", set_task_state(current, TASK_UNINTERRUPTIBLE);
ce_prefix[ce], msg, ce_suffix[ce]); while (1)
else schedule();
SERROR("%s%s%s", ce_prefix[ce], msg, ce_suffix[ce]);
} }
} /* vcmn_err() */ } /* vcmn_err() */
EXPORT_SYMBOL(vcmn_err); EXPORT_SYMBOL(vcmn_err);
@ -79,4 +115,3 @@ cmn_err(int ce, const char *fmt, ...)
va_end(ap); va_end(ap);
} /* cmn_err() */ } /* cmn_err() */
EXPORT_SYMBOL(cmn_err); EXPORT_SYMBOL(cmn_err);

View File

@ -29,6 +29,8 @@
#include <sys/vmsystm.h> #include <sys/vmsystm.h>
#include <sys/kobj.h> #include <sys/kobj.h>
#include <sys/kmem.h> #include <sys/kmem.h>
#include <sys/kmem_cache.h>
#include <sys/vmem.h>
#include <sys/mutex.h> #include <sys/mutex.h>
#include <sys/rwlock.h> #include <sys/rwlock.h>
#include <sys/taskq.h> #include <sys/taskq.h>
@ -37,69 +39,23 @@
#include <sys/debug.h> #include <sys/debug.h>
#include <sys/proc.h> #include <sys/proc.h>
#include <sys/kstat.h> #include <sys/kstat.h>
#include <sys/utsname.h>
#include <sys/file.h> #include <sys/file.h>
#include <linux/ctype.h>
#include <linux/kmod.h> #include <linux/kmod.h>
#include <linux/math64_compat.h>
#include <linux/proc_compat.h> #include <linux/proc_compat.h>
#include <spl-debug.h>
#ifdef SS_DEBUG_SUBSYS
#undef SS_DEBUG_SUBSYS
#endif
#define SS_DEBUG_SUBSYS SS_GENERIC
char spl_version[32] = "SPL v" SPL_META_VERSION "-" SPL_META_RELEASE; char spl_version[32] = "SPL v" SPL_META_VERSION "-" SPL_META_RELEASE;
EXPORT_SYMBOL(spl_version); EXPORT_SYMBOL(spl_version);
unsigned long spl_hostid = HW_INVALID_HOSTID; unsigned long spl_hostid = 0;
EXPORT_SYMBOL(spl_hostid); EXPORT_SYMBOL(spl_hostid);
module_param(spl_hostid, ulong, 0644); module_param(spl_hostid, ulong, 0644);
MODULE_PARM_DESC(spl_hostid, "The system hostid."); MODULE_PARM_DESC(spl_hostid, "The system hostid.");
char hw_serial[HW_HOSTID_LEN] = "<none>";
EXPORT_SYMBOL(hw_serial);
proc_t p0 = { 0 }; proc_t p0 = { 0 };
EXPORT_SYMBOL(p0); EXPORT_SYMBOL(p0);
#ifndef HAVE_KALLSYMS_LOOKUP_NAME
DECLARE_WAIT_QUEUE_HEAD(spl_kallsyms_lookup_name_waitq);
kallsyms_lookup_name_t spl_kallsyms_lookup_name_fn = SYMBOL_POISON;
#endif
int
highbit(unsigned long i)
{
register int h = 1;
SENTRY;
if (i == 0)
SRETURN(0);
#if BITS_PER_LONG == 64
if (i & 0xffffffff00000000ul) {
h += 32; i >>= 32;
}
#endif
if (i & 0xffff0000) {
h += 16; i >>= 16;
}
if (i & 0xff00) {
h += 8; i >>= 8;
}
if (i & 0xf0) {
h += 4; i >>= 4;
}
if (i & 0xc) {
h += 2; i >>= 2;
}
if (i & 0x2) {
h += 1;
}
SRETURN(h);
}
EXPORT_SYMBOL(highbit);
#if BITS_PER_LONG == 32 #if BITS_PER_LONG == 32
/* /*
* Support 64/64 => 64 division on a 32-bit platform. While the kernel * Support 64/64 => 64 division on a 32-bit platform. While the kernel
@ -411,17 +367,6 @@ __put_task_struct(struct task_struct *t)
EXPORT_SYMBOL(__put_task_struct); EXPORT_SYMBOL(__put_task_struct);
#endif /* HAVE_PUT_TASK_STRUCT */ #endif /* HAVE_PUT_TASK_STRUCT */
struct new_utsname *__utsname(void)
{
#ifdef HAVE_INIT_UTSNAME
return init_utsname();
#else
return &system_utsname;
#endif
}
EXPORT_SYMBOL(__utsname);
/* /*
* Read the unique system identifier from the /etc/hostid file. * Read the unique system identifier from the /etc/hostid file.
* *
@ -467,7 +412,7 @@ hostid_read(void)
int result; int result;
uint64_t size; uint64_t size;
struct _buf *file; struct _buf *file;
unsigned long hostid = 0; uint32_t hostid = 0;
file = kobj_open_file(spl_hostid_path); file = kobj_open_file(spl_hostid_path);
@ -511,45 +456,10 @@ hostid_read(void)
return 0; return 0;
} }
#define GET_HOSTID_CMD \
"exec 0</dev/null " \
" 1>/proc/sys/kernel/spl/hostid " \
" 2>/dev/null; " \
"hostid"
static int
hostid_exec(void)
{
char *argv[] = { "/bin/sh",
"-c",
GET_HOSTID_CMD,
NULL };
char *envp[] = { "HOME=/",
"TERM=linux",
"PATH=/sbin:/usr/sbin:/bin:/usr/bin",
NULL };
int rc;
/* Doing address resolution in the kernel is tricky and just
* not a good idea in general. So to set the proper 'hw_serial'
* use the usermodehelper support to ask '/bin/sh' to run
* '/usr/bin/hostid' and redirect the result to /proc/sys/spl/hostid
* for us to use. It's a horrific solution but it will do for now.
*/
rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
if (rc)
printk("SPL: Failed user helper '%s %s %s', rc = %d\n",
argv[0], argv[1], argv[2], rc);
return rc;
}
uint32_t uint32_t
zone_get_hostid(void *zone) zone_get_hostid(void *zone)
{ {
static int first = 1; static int first = 1;
unsigned long hostid;
int rc;
/* Only the global zone is supported */ /* Only the global zone is supported */
ASSERT(zone == NULL); ASSERT(zone == NULL);
@ -557,134 +467,93 @@ zone_get_hostid(void *zone)
if (first) { if (first) {
first = 0; first = 0;
spl_hostid &= HW_HOSTID_MASK;
/* /*
* Get the hostid if it was not passed as a module parameter. * Get the hostid if it was not passed as a module parameter.
* Try reading the /etc/hostid file directly, and then fall * Try reading the /etc/hostid file directly.
* back to calling the /usr/bin/hostid utility.
*/ */
if ((spl_hostid == HW_INVALID_HOSTID) && if (spl_hostid == 0 && hostid_read())
(rc = hostid_read()) && (rc = hostid_exec())) spl_hostid = 0;
return HW_INVALID_HOSTID;
printk(KERN_NOTICE "SPL: using hostid 0x%08x\n", printk(KERN_NOTICE "SPL: using hostid 0x%08x\n",
(unsigned int) spl_hostid); (unsigned int) spl_hostid);
} }
if (ddi_strtoul(hw_serial, NULL, HW_HOSTID_LEN-1, &hostid) != 0) return spl_hostid;
return HW_INVALID_HOSTID;
return (uint32_t)hostid;
} }
EXPORT_SYMBOL(zone_get_hostid); EXPORT_SYMBOL(zone_get_hostid);
#ifndef HAVE_KALLSYMS_LOOKUP_NAME
/*
* The kallsyms_lookup_name() kernel function is not an exported symbol in
* Linux 2.6.19 through 2.6.32 inclusive.
*
* This function replaces the functionality by performing an upcall to user
* space where /proc/kallsyms is consulted for the requested address.
*
*/
#define GET_KALLSYMS_ADDR_CMD \
"exec 0</dev/null " \
" 1>/proc/sys/kernel/spl/kallsyms_lookup_name " \
" 2>/dev/null; " \
"awk '{ if ( $3 == \"kallsyms_lookup_name\" ) { print $1 } }' " \
" /proc/kallsyms "
static int static int
set_kallsyms_lookup_name(void) spl_kvmem_init(void)
{
char *argv[] = { "/bin/sh",
"-c",
GET_KALLSYMS_ADDR_CMD,
NULL };
char *envp[] = { "HOME=/",
"TERM=linux",
"PATH=/sbin:/usr/sbin:/bin:/usr/bin",
NULL };
int rc;
rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
/*
* Due to I/O buffering the helper may return successfully before
* the proc handler has a chance to execute. To catch this case
* wait up to 1 second to verify spl_kallsyms_lookup_name_fn was
* updated to a non SYMBOL_POISON value.
*/
if (rc == 0) {
rc = wait_event_timeout(spl_kallsyms_lookup_name_waitq,
spl_kallsyms_lookup_name_fn != SYMBOL_POISON, HZ);
if (rc == 0)
rc = -ETIMEDOUT;
else if (spl_kallsyms_lookup_name_fn == SYMBOL_POISON)
rc = -EFAULT;
else
rc = 0;
}
if (rc)
printk("SPL: Failed user helper '%s %s %s', rc = %d\n",
argv[0], argv[1], argv[2], rc);
return rc;
}
#endif
static int
__init spl_init(void)
{ {
int rc = 0; int rc = 0;
if ((rc = spl_debug_init())) rc = spl_kmem_init();
return rc; if (rc)
goto out1;
if ((rc = spl_kmem_init())) rc = spl_vmem_init();
SGOTO(out1, rc); if (rc)
goto out2;
rc = spl_kmem_cache_init();
if (rc)
goto out3;
return (rc);
out3:
spl_vmem_fini();
out2:
spl_kmem_fini();
out1:
return (rc);
}
static void
spl_kvmem_fini(void)
{
spl_kmem_cache_fini();
spl_vmem_fini();
spl_kmem_fini();
}
static int __init
spl_init(void)
{
int rc = 0;
if ((rc = spl_kvmem_init()))
goto out1;
if ((rc = spl_mutex_init())) if ((rc = spl_mutex_init()))
SGOTO(out2, rc); goto out2;
if ((rc = spl_rw_init())) if ((rc = spl_rw_init()))
SGOTO(out3, rc); goto out3;
if ((rc = spl_taskq_init())) if ((rc = spl_taskq_init()))
SGOTO(out4, rc); goto out4;
if ((rc = spl_vn_init())) if ((rc = spl_vn_init()))
SGOTO(out5, rc); goto out5;
if ((rc = spl_proc_init())) if ((rc = spl_proc_init()))
SGOTO(out6, rc); goto out6;
if ((rc = spl_kstat_init())) if ((rc = spl_kstat_init()))
SGOTO(out7, rc); goto out7;
if ((rc = spl_tsd_init())) if ((rc = spl_tsd_init()))
SGOTO(out8, rc); goto out8;
if ((rc = spl_zlib_init())) if ((rc = spl_zlib_init()))
SGOTO(out9, rc); goto out9;
#ifndef HAVE_KALLSYMS_LOOKUP_NAME
if ((rc = set_kallsyms_lookup_name()))
SGOTO(out10, rc = -EADDRNOTAVAIL);
#endif /* HAVE_KALLSYMS_LOOKUP_NAME */
if ((rc = spl_kmem_init_kallsyms_lookup()))
SGOTO(out10, rc);
if ((rc = spl_vn_init_kallsyms_lookup()))
SGOTO(out10, rc);
printk(KERN_NOTICE "SPL: Loaded module v%s-%s%s\n", SPL_META_VERSION, printk(KERN_NOTICE "SPL: Loaded module v%s-%s%s\n", SPL_META_VERSION,
SPL_META_RELEASE, SPL_DEBUG_STR); SPL_META_RELEASE, SPL_DEBUG_STR);
SRETURN(rc); return (rc);
out10:
spl_zlib_fini();
out9: out9:
spl_tsd_fini(); spl_tsd_fini();
out8: out8:
@ -700,21 +569,18 @@ out4:
out3: out3:
spl_mutex_fini(); spl_mutex_fini();
out2: out2:
spl_kmem_fini(); spl_kvmem_fini();
out1: out1:
spl_debug_fini();
printk(KERN_NOTICE "SPL: Failed to Load Solaris Porting Layer " printk(KERN_NOTICE "SPL: Failed to Load Solaris Porting Layer "
"v%s-%s%s, rc = %d\n", SPL_META_VERSION, SPL_META_RELEASE, "v%s-%s%s, rc = %d\n", SPL_META_VERSION, SPL_META_RELEASE,
SPL_DEBUG_STR, rc); SPL_DEBUG_STR, rc);
return rc;
return (rc);
} }
static void static void __exit
spl_fini(void) spl_fini(void)
{ {
SENTRY;
printk(KERN_NOTICE "SPL: Unloaded module v%s-%s%s\n", printk(KERN_NOTICE "SPL: Unloaded module v%s-%s%s\n",
SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR); SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR);
spl_zlib_fini(); spl_zlib_fini();
@ -725,37 +591,13 @@ spl_fini(void)
spl_taskq_fini(); spl_taskq_fini();
spl_rw_fini(); spl_rw_fini();
spl_mutex_fini(); spl_mutex_fini();
spl_kmem_fini(); spl_kvmem_fini();
spl_debug_fini();
} }
/* Called when a dependent module is loaded */
void
spl_setup(void)
{
int rc;
/*
* At module load time the pwd is set to '/' on a Solaris system.
* On a Linux system will be set to whatever directory the caller
* was in when executing insmod/modprobe.
*/
rc = vn_set_pwd("/");
if (rc)
printk("SPL: Warning unable to set pwd to '/': %d\n", rc);
}
EXPORT_SYMBOL(spl_setup);
/* Called when a dependent module is unloaded */
void
spl_cleanup(void)
{
}
EXPORT_SYMBOL(spl_cleanup);
module_init(spl_init); module_init(spl_init);
module_exit(spl_fini); module_exit(spl_fini);
MODULE_AUTHOR("Lawrence Livermore National Labs");
MODULE_DESCRIPTION("Solaris Porting Layer"); MODULE_DESCRIPTION("Solaris Porting Layer");
MODULE_LICENSE("GPL"); MODULE_AUTHOR(SPL_META_AUTHOR);
MODULE_LICENSE(SPL_META_LICENSE);
MODULE_VERSION(SPL_META_VERSION "-" SPL_META_RELEASE);

1739
module/spl/spl-kmem-cache.c Normal file

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More