diff --git a/META b/META index c66cd11..4b0c0bb 100644 --- a/META +++ b/META @@ -1,7 +1,7 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.7.5 +Version: 0.7.6 Release: 1 Release-Tags: relext License: GPL diff --git a/Makefile.in b/Makefile.in index 6d25fba..0ae3d03 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1007,24 +1007,27 @@ deb-kmod: deb-local rpm-kmod name=${PACKAGE}; \ version=${VERSION}-${RELEASE}; \ arch=`$(RPM) -qp $${name}-kmod-$${version}.src.rpm --qf %{arch} | tail -1`; \ + debarch=`$(DPKG) --print-architecture`; \ pkg1=kmod-$${name}*$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --bump=0 --scripts --to-deb $$pkg1; \ + fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1; \ $(RM) $$pkg1 deb-dkms: deb-local rpm-dkms name=${PACKAGE}; \ version=${VERSION}-${RELEASE}; \ arch=`$(RPM) -qp $${name}-dkms-$${version}.src.rpm --qf %{arch} | tail -1`; \ + debarch=`$(DPKG) --print-architecture`; \ pkg1=$${name}-dkms-$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --bump=0 --scripts --to-deb $$pkg1; \ + fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1; \ $(RM) $$pkg1 deb-utils: deb-local rpm-utils name=${PACKAGE}; \ version=${VERSION}-${RELEASE}; \ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ + debarch=`$(DPKG) --print-architecture`; \ pkg1=$${name}-$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --bump=0 --scripts --to-deb $$pkg1; \ + fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1; \ $(RM) $$pkg1 deb: deb-kmod deb-dkms deb-utils diff --git a/config/deb.am b/config/deb.am index e05a175..f745c91 100644 --- a/config/deb.am +++ b/config/deb.am @@ -32,24 +32,27 @@ deb-kmod: deb-local rpm-kmod name=${PACKAGE}; \ version=${VERSION}-${RELEASE}; \ arch=`$(RPM) -qp $${name}-kmod-$${version}.src.rpm --qf %{arch} | tail -1`; \ + debarch=`$(DPKG) --print-architecture`; \ pkg1=kmod-$${name}*$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --bump=0 --scripts --to-deb $$pkg1; \ + fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1; \ $(RM) $$pkg1 deb-dkms: deb-local rpm-dkms name=${PACKAGE}; \ version=${VERSION}-${RELEASE}; \ arch=`$(RPM) -qp $${name}-dkms-$${version}.src.rpm --qf %{arch} | tail -1`; \ + debarch=`$(DPKG) --print-architecture`; \ pkg1=$${name}-dkms-$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --bump=0 --scripts --to-deb $$pkg1; \ + fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1; \ $(RM) $$pkg1 deb-utils: deb-local rpm-utils name=${PACKAGE}; \ version=${VERSION}-${RELEASE}; \ arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ + debarch=`$(DPKG) --print-architecture`; \ pkg1=$${name}-$${version}.$${arch}.rpm; \ - fakeroot $(ALIEN) --bump=0 --scripts --to-deb $$pkg1; \ + fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1; \ $(RM) $$pkg1 deb: deb-kmod deb-dkms deb-utils diff --git a/config/spl-build.m4 b/config/spl-build.m4 index accf675..25013b5 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -56,6 +56,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_WAIT_QUEUE_HEAD_ENTRY SPL_AC_KERNEL_WRITE SPL_AC_KERNEL_READ + SPL_AC_KERNEL_TIMER_FUNCTION_TIMER_LIST ]) AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ @@ -1755,3 +1756,36 @@ AC_DEFUN([SPL_AC_KERNEL_READ], [ ]) EXTRA_KCFLAGS="$tmp_flags" ]) + +dnl # +dnl # 4.15 API change +dnl # https://lkml.org/lkml/2017/11/25/90 +dnl # Check if timer_list.func get passed a timer_list or an unsigned long +dnl # (older kernels). Also sanity check the from_timer() and timer_setup() +dnl # macros are available as well, since they will be used in the same newer +dnl # kernels that support the new timer_list.func signature. +dnl # +AC_DEFUN([SPL_AC_KERNEL_TIMER_FUNCTION_TIMER_LIST], [ + AC_MSG_CHECKING([whether timer_list.function gets a timer_list]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + void task_expire(struct timer_list *tl) {} + ],[ + #ifndef from_timer + #error "No from_timer() macro" + #endif + + struct timer_list timer; + timer.function = task_expire; + timer_setup(&timer, NULL, 0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST, 1, + [timer_list.function gets a timer_list]) + ],[ + AC_MSG_RESULT(no) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/configure b/configure index 593c28c..6ba8608 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for spl 0.7.5. +# Generated by GNU Autoconf 2.63 for spl 0.7.6. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @@ -743,8 +743,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='spl' PACKAGE_TARNAME='spl' -PACKAGE_VERSION='0.7.5' -PACKAGE_STRING='spl 0.7.5' +PACKAGE_VERSION='0.7.6' +PACKAGE_STRING='spl 0.7.6' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. @@ -1535,7 +1535,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures spl 0.7.5 to adapt to many kinds of systems. +\`configure' configures spl 0.7.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1606,7 +1606,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of spl 0.7.5:";; + short | recursive ) echo "Configuration of spl 0.7.6:";; esac cat <<\_ACEOF @@ -1720,7 +1720,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -spl configure 0.7.5 +spl configure 0.7.6 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1734,7 +1734,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by spl $as_me 0.7.5, which was +It was created by spl $as_me 0.7.6, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2888,7 +2888,7 @@ fi # Define the identity of the package. PACKAGE='spl' - VERSION='0.7.5' + VERSION='0.7.6' cat >>confdefs.h <<_ACEOF @@ -15421,6 +15421,83 @@ $as_echo "no" >&6; } +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + + { $as_echo "$as_me:$LINENO: checking whether timer_list.function gets a timer_list" >&5 +$as_echo_n "checking whether timer_list.function gets a timer_list... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + void task_expire(struct timer_list *tl) {} + +int +main (void) +{ + + #ifndef from_timer + #error "No from_timer() macro" + #endif + + struct timer_list timer; + timer.function = task_expire; + timer_setup(&timer, NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + fi rm -Rf build @@ -19150,6 +19227,83 @@ $as_echo "no" >&6; } +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + + { $as_echo "$as_me:$LINENO: checking whether timer_list.function gets a timer_list" >&5 +$as_echo_n "checking whether timer_list.function gets a timer_list... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + void task_expire(struct timer_list *tl) {} + +int +main (void) +{ + + #ifndef from_timer + #error "No from_timer() macro" + #endif + + struct timer_list timer; + timer.function = task_expire; + timer_setup(&timer, NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build && touch build/conftest.mod.c + echo "obj-m := conftest.o" >build/Makefile + modpost_flag='' + test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + fi rm -Rf build @@ -19654,7 +19808,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by spl $as_me 0.7.5, which was +This file was extended by spl $as_me 0.7.6, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19717,7 +19871,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -spl config.status 0.7.5 +spl config.status 0.7.6 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 7cad9f7..89c53a5 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -209,9 +209,9 @@ task_done(taskq_t *tq, taskq_ent_t *t) * add it to the priority list in order for immediate processing. */ static void -task_expire(unsigned long data) +task_expire_impl(taskq_ent_t *t) { - taskq_ent_t *w, *t = (taskq_ent_t *)data; + taskq_ent_t *w; taskq_t *tq = t->tqent_taskq; struct list_head *l; unsigned long flags; @@ -245,6 +245,21 @@ task_expire(unsigned long data) wake_up(&tq->tq_work_waitq); } +#ifdef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST +static void +task_expire(struct timer_list *tl) +{ + taskq_ent_t *t = from_timer(t, tl, tqent_timer); + task_expire_impl(t); +} +#else +static void +task_expire(unsigned long data) +{ + task_expire_impl((taskq_ent_t *)data); +} +#endif + /* * Returns the lowest incomplete taskqid_t. The taskqid_t may * be queued on the pending list, on the priority list, on the @@ -590,7 +605,9 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) t->tqent_func = func; t->tqent_arg = arg; t->tqent_taskq = tq; +#ifndef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST t->tqent_timer.data = 0; +#endif t->tqent_timer.function = NULL; t->tqent_timer.expires = 0; t->tqent_birth = jiffies; @@ -640,7 +657,9 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg, t->tqent_func = func; t->tqent_arg = arg; t->tqent_taskq = tq; +#ifndef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST t->tqent_timer.data = (unsigned long)t; +#endif t->tqent_timer.function = task_expire; t->tqent_timer.expires = (unsigned long)expire_time; add_timer(&t->tqent_timer); @@ -732,7 +751,11 @@ taskq_init_ent(taskq_ent_t *t) { spin_lock_init(&t->tqent_lock); init_waitqueue_head(&t->tqent_waitq); +#ifdef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST + timer_setup(&t->tqent_timer, NULL, 0); +#else init_timer(&t->tqent_timer); +#endif INIT_LIST_HEAD(&t->tqent_list); t->tqent_id = 0; t->tqent_func = NULL; diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in index af7132d..eb38c21 100644 --- a/rpm/generic/spl-kmod.spec.in +++ b/rpm/generic/spl-kmod.spec.in @@ -167,6 +167,9 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/* rm -rf $RPM_BUILD_ROOT %changelog +* Thu Feb 01 2018 Tony Hutter - 0.7.6-1 +- Released 0.7.6-1, detailed release notes are available at: +- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.6 * Mon Dec 18 2017 Tony Hutter - 0.7.5-1 - Released 0.7.5-1, detailed release notes are available at: - https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.5 diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in index f619475..0338a47 100644 --- a/rpm/generic/spl.spec.in +++ b/rpm/generic/spl.spec.in @@ -34,6 +34,9 @@ make install DESTDIR=%{?buildroot} %{_mandir}/man5/* %changelog +* Thu Feb 01 2018 Tony Hutter - 0.7.6-1 +- Released 0.7.6-1, detailed release notes are available at: +- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.6 * Mon Dec 18 2017 Tony Hutter - 0.7.5-1 - Released 0.7.5-1, detailed release notes are available at: - https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.5 diff --git a/rpm/redhat/spl.spec.in b/rpm/redhat/spl.spec.in index f619475..0338a47 100644 --- a/rpm/redhat/spl.spec.in +++ b/rpm/redhat/spl.spec.in @@ -34,6 +34,9 @@ make install DESTDIR=%{?buildroot} %{_mandir}/man5/* %changelog +* Thu Feb 01 2018 Tony Hutter - 0.7.6-1 +- Released 0.7.6-1, detailed release notes are available at: +- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.6 * Mon Dec 18 2017 Tony Hutter - 0.7.5-1 - Released 0.7.5-1, detailed release notes are available at: - https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.5 diff --git a/spl_config.h.in b/spl_config.h.in index d3098bb..2b6a859 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -81,6 +81,9 @@ /* kernel_read() take loff_t pointer */ #undef HAVE_KERNEL_READ_PPOS +/* timer_list.function gets a timer_list */ +#undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST + /* kernel_write() take loff_t pointer */ #undef HAVE_KERNEL_WRITE_PPOS