Meta: 1
Name: spl
Branch: 1.0
-Version: 0.6.5.3
+Version: 0.6.5.4
Release: 1
Release-Tags: relext
License: GPL
fi
])
- AC_RUN_IFELSE([
- AC_LANG_PROGRAM([
- #include "$LINUX/include/linux/license.h"
+ AS_IF([test "x$cross_compiling" != xyes], [
+ AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([
+ #include "$LINUX/include/linux/license.h"
+ ], [
+ return !license_is_gpl_compatible(
+ "$SPL_META_LICENSE");
+ ])
+ ], [
+ AC_DEFINE([SPL_IS_GPL_COMPATIBLE], [1],
+ [Define to 1 if GPL-only symbols can be used])
], [
- return !license_is_gpl_compatible("$SPL_META_LICENSE");
])
- ], [
- AC_DEFINE([SPL_IS_GPL_COMPATIBLE], [1],
- [Define to 1 if GPL-only symbols can be used])
- ], [
])
])
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for spl 0.6.5.3.
+# Generated by GNU Autoconf 2.68 for spl 0.6.5.4.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# Identity of this package.
PACKAGE_NAME='spl'
PACKAGE_TARNAME='spl'
-PACKAGE_VERSION='0.6.5.3'
-PACKAGE_STRING='spl 0.6.5.3'
+PACKAGE_VERSION='0.6.5.4'
+PACKAGE_STRING='spl 0.6.5.4'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
# 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.6.5.3 to adapt to many kinds of systems.
+\`configure' configures spl 0.6.5.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of spl 0.6.5.3:";;
+ short | recursive ) echo "Configuration of spl 0.6.5.4:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-spl configure 0.6.5.3
+spl configure 0.6.5.4
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
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.6.5.3, which was
+It was created by spl $as_me 0.6.5.4, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='spl'
- VERSION='0.6.5.3'
+ VERSION='0.6.5.4'
cat >>confdefs.h <<_ACEOF
- if test "$cross_compiling" = yes; then :
+ if test "x$cross_compiling" != xyes; then :
+
+ if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
/* end confdefs.h. */
- #include "$LINUX/include/linux/license.h"
+ #include "$LINUX/include/linux/license.h"
int
main ()
{
- return !license_is_gpl_compatible("$SPL_META_LICENSE");
+ return !license_is_gpl_compatible(
+ "$SPL_META_LICENSE");
;
return 0;
fi
+fi
+
# Check whether --enable-atomic-spinlocks was given.
if test "${enable_atomic_spinlocks+set}" = set; then :
- if test "$cross_compiling" = yes; then :
+ if test "x$cross_compiling" != xyes; then :
+
+ if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
/* end confdefs.h. */
- #include "$LINUX/include/linux/license.h"
+ #include "$LINUX/include/linux/license.h"
int
main ()
{
- return !license_is_gpl_compatible("$SPL_META_LICENSE");
+ return !license_is_gpl_compatible(
+ "$SPL_META_LICENSE");
;
return 0;
fi
+fi
+
# Check whether --enable-atomic-spinlocks was given.
if test "${enable_atomic_spinlocks+set}" = set; then :
# 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.6.5.3, which was
+This file was extended by spl $as_me 0.6.5.4, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-spl config.status 0.6.5.3
+spl config.status 0.6.5.4
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
for MODULE in "${MODULES[@]}"
do
adjust_obj_paths "$KERNEL_DIR/spl/$MODULE/Makefile"
+ sed -i.bak '/obj =/d' "$KERNEL_DIR/spl/$MODULE/Makefile"
+ sed -i.bak '/src =/d' "$KERNEL_DIR/spl/$MODULE/Makefile"
done
cat > "$KERNEL_DIR/spl/Kconfig" <<"EOF"
}
add_after "$KERNEL_DIR/Kconfig" 'source "arch/$SRCARCH/Kconfig"' 'source "spl/Kconfig"'
-# We must take care to build SPL before ZFS, else module initialization order will be wrong
-sed -i 's#kernel/ mm/ fs/#kernel/ mm/ spl/ fs/#' "$KERNEL_DIR/Makefile"
+# We must take care to build SPL before ZFS, otherwise the symbols required
+# to link ZFS will not be available.
+sed -i 's#+= kernel/#+= kernel/ spl/#' "$KERNEL_DIR/Makefile"
echo >&2
echo " $0: done." >&2
#endif
/* powerpc (ppc64) arch specific defines */
-#elif defined(__powerpc) || defined(__powerpc__)
+#elif defined(__powerpc) || defined(__powerpc__) || defined(__powerpc64__)
#if !defined(__powerpc)
#define __powerpc
#define __powerpc__
#endif
+#if defined(__powerpc64__)
#if !defined(_LP64)
#define _LP64
#endif
+#else
+#if !defined(_ILP32)
+#define _ILP32
+#endif
+#endif
/* arm arch specific defines */
#elif defined(__arm) || defined(__arm__) || defined(__aarch64__)
#define __arm__
#endif
+#if defined(__aarch64__)
+#if !defined(_LP64)
+#define _LP64
+#endif
+#else
+#if !defined(_ILP32)
+#define _ILP32
+#endif
+#endif
+
#if defined(__ARMEL__) || defined(__AARCH64EL__)
#define _LITTLE_ENDIAN
#else
#define __sparc__
#endif
-#define _BIG_ENDIAN
-#define _SUNOS_VTOC_16
-
-/* sparc64 arch specific defines */
-#elif defined(__sparc64) || defined(__sparc64__)
-
-#if !defined(__sparc64)
-#define __sparc64
+#if defined(__arch64__)
+#if !defined(_LP64)
+#define _LP64
+#endif
+#else
+#if !defined(_ILP32)
+#define _ILP32
#endif
-
-#if !defined(__sparc64__)
-#define __sparc64__
#endif
#define _BIG_ENDIAN
#error "Both _ILP32 and _LP64 are defined"
#endif
+#if !defined(_ILP32) && !defined(_LP64)
+#error "Neither _ILP32 or _LP64 are defined"
+#endif
+
#include <sys/byteorder.h>
#if defined(__LITTLE_ENDIAN) && !defined(_LITTLE_ENDIAN)
*/
#define P2ALIGN(x, align) ((x) & -(align))
#define P2CROSS(x, y, align) (((x) ^ (y)) > (align) - 1)
-#define P2ROUNDUP(x, align) (-(-(x) & -(align)))
+#define P2ROUNDUP(x, align) ((((x) - 1) | ((align) - 1)) + 1)
#define P2PHASE(x, align) ((x) & ((align) - 1))
#define P2NPHASE(x, align) (-(x) & ((align) - 1))
#define ISP2(x) (((x) & ((x) - 1)) == 0)
#define P2NPHASE_TYPED(x, align, type) \
(-(type)(x) & ((type)(align) - 1))
#define P2ROUNDUP_TYPED(x, align, type) \
- (-(-(type)(x) & -(type)(align)))
+ ((((type)(x) - 1) | ((type)(align) - 1)) + 1)
#define P2END_TYPED(x, align, type) \
(-(~(type)(x) & -(type)(align)))
#define P2PHASEUP_TYPED(x, align, phase, type) \
#define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC))
#define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC))
-#define hz HZ
+static const int hz = HZ;
#define TIMESPEC_OVERFLOW(ts) \
((ts)->tv_sec < TIME_MIN || (ts)->tv_sec > TIME_MAX)
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
KERNELRELEASE=@LINUX_VERSION@
@# Remove extraneous build products when packaging
kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
- if [ -n $$kmoddir ]; then \
+ if [ -n "$(DESTDIR)" ]; then \
find $$kmoddir -name 'modules.*' | xargs $(RM); \
fi
sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
#include <linux/swap.h>
#include <linux/mm_compat.h>
#include <linux/wait_compat.h>
+#include <linux/prefetch.h>
/*
* Within the scope of spl-kmem.c file the kmem_cache_* definitions
ASSERT(ISP2(size));
ptr = (void *)__get_free_pages(lflags, get_order(size));
} else {
- ptr = spl_vmalloc(size, lflags | __GFP_HIGHMEM, PAGE_KERNEL);
+ ptr = __vmalloc(size, lflags | __GFP_HIGHMEM, PAGE_KERNEL);
}
/* Resulting allocated memory will be page aligned */
spl_kmem_cache_t *skc = ska->ska_cache;
spl_kmem_slab_t *sks;
-#if defined(PF_MEMALLOC_NOIO)
- unsigned noio_flag = memalloc_noio_save();
- sks = spl_slab_alloc(skc, ska->ska_flags);
- memalloc_noio_restore(noio_flag);
-#else
fstrans_cookie_t cookie = spl_fstrans_mark();
sks = spl_slab_alloc(skc, ska->ska_flags);
spl_fstrans_unmark(cookie);
-#endif
+
spin_lock(&skc->skc_lock);
if (sks) {
skc->skc_slab_total++;
*/
if ((size > spl_kmem_alloc_max) || use_vmem) {
if (flags & KM_VMEM) {
- ptr = spl_vmalloc(size, lflags, PAGE_KERNEL);
+ ptr = __vmalloc(size, lflags, PAGE_KERNEL);
} else {
return (NULL);
}
/*
* For vmem_alloc() and vmem_zalloc() callers retry immediately
- * using spl_vmalloc() which is unlikely to fail.
+ * using __vmalloc() which is unlikely to fail.
*/
if ((flags & KM_VMEM) && (use_vmem == 0)) {
use_vmem = 1;
}
EXPORT_SYMBOL(taskq_cancel_id);
-static int taskq_thread_spawn(taskq_t *tq, int seq_tasks);
+static int taskq_thread_spawn(taskq_t *tq);
taskqid_t
taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags)
wake_up(&tq->tq_work_waitq);
out:
/* Spawn additional taskq threads if required. */
- if (tq->tq_nactive == tq->tq_nthreads &&
- taskq_member_impl(tq, current))
- (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1);
+ if (tq->tq_nactive == tq->tq_nthreads)
+ (void) taskq_thread_spawn(tq);
spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags);
return (rc);
spin_unlock(&t->tqent_lock);
out:
/* Spawn additional taskq threads if required. */
- if (tq->tq_nactive == tq->tq_nthreads &&
- taskq_member_impl(tq, current))
- (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1);
+ if (tq->tq_nactive == tq->tq_nthreads)
+ (void) taskq_thread_spawn(tq);
spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags);
return (rc);
}
wake_up(&tq->tq_work_waitq);
out:
/* Spawn additional taskq threads if required. */
- if (tq->tq_nactive == tq->tq_nthreads &&
- taskq_member_impl(tq, current))
- (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1);
+ if (tq->tq_nactive == tq->tq_nthreads)
+ (void) taskq_thread_spawn(tq);
spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags);
}
EXPORT_SYMBOL(taskq_dispatch_ent);
* which is also a dynamic taskq cannot be safely used for this.
*/
static int
-taskq_thread_spawn(taskq_t *tq, int seq_tasks)
+taskq_thread_spawn(taskq_t *tq)
{
int spawning = 0;
if (!(tq->tq_flags & TASKQ_DYNAMIC))
return (0);
- if ((seq_tasks > spl_taskq_thread_sequential) &&
- (tq->tq_nthreads + tq->tq_nspawn < tq->tq_maxthreads) &&
+ if ((tq->tq_nthreads + tq->tq_nspawn < tq->tq_maxthreads) &&
(tq->tq_flags & TASKQ_ACTIVE)) {
spawning = (++tq->tq_nspawn);
taskq_dispatch(dynamic_taskq, taskq_thread_spawn_task,
tq = tqt->tqt_tq;
current->flags |= PF_NOFREEZE;
- #if defined(PF_MEMALLOC_NOIO)
- (void) memalloc_noio_save();
- #endif
+ (void) spl_fstrans_mark();
sigfillset(&blocked);
sigprocmask(SIG_BLOCK, &blocked, NULL);
}
/* Spawn additional taskq threads if required. */
- if (taskq_thread_spawn(tq, ++seq_tasks))
+ if ((++seq_tasks) > spl_taskq_thread_sequential &&
+ taskq_thread_spawn(tq))
seq_tasks = 0;
tqt->tqt_id = 0;
}
EXPORT_SYMBOL(spl_vmem_free);
-/*
- * Public vmalloc() interface designed to be safe to be called during I/O.
- */
-void *
-spl_vmalloc(unsigned long size, gfp_t lflags, pgprot_t prot)
-{
-#if defined(PF_MEMALLOC_NOIO)
- void *ptr;
- unsigned noio_flag = 0;
-
- if (spl_fstrans_check())
- noio_flag = memalloc_noio_save();
-
- ptr = __vmalloc(size, lflags, prot);
-
- if (spl_fstrans_check())
- memalloc_noio_restore(noio_flag);
-
- return (ptr);
-#else
- return (__vmalloc(size, lflags, prot));
-#endif
-}
-EXPORT_SYMBOL(spl_vmalloc);
-
int
spl_vmem_init(void)
{
rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Jan 8 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.4-1
+- Build fixes on SPARC and some kernels
+- Fix taskq dynamic spawning deadlock
+- Fix builtin kernel builds
+- Fix crash due to overflow in P2ROUNDUP macro
+- Fix deadlock during direct memory reclaim
* Tue Oct 13 2015 Ned Bass <bass6@llnl.gov> - 0.6.5.3-1
- Fix CPU hotplug zfsonlinux/spl#482
- Disable dynamic taskqs by default to avoid deadlock zfsonlinux/spl#484
%{_mandir}/man5/*
%changelog
+* Fri Jan 8 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.4-1
+- Build fixes on SPARC and some kernels
+- Fix taskq dynamic spawning deadlock
+- Fix builtin kernel builds
+- Fix crash due to overflow in P2ROUNDUP macro
+- Fix deadlock during direct memory reclaim
* Tue Oct 13 2015 Ned Bass <bass6@llnl.gov> - 0.6.5.3-1
- Fix CPU hotplug zfsonlinux/spl#482
- Disable dynamic taskqs by default to avoid deadlock zfsonlinux/spl#484
%{_mandir}/man5/*
%changelog
+* Fri Jan 8 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.4-1
+- Build fixes on SPARC and some kernels
+- Fix taskq dynamic spawning deadlock
+- Fix builtin kernel builds
+- Fix crash due to overflow in P2ROUNDUP macro
+- Fix deadlock during direct memory reclaim
* Tue Oct 13 2015 Ned Bass <bass6@llnl.gov> - 0.6.5.3-1
- Fix CPU hotplug zfsonlinux/spl#482
- Disable dynamic taskqs by default to avoid deadlock zfsonlinux/spl#484