Meta: 1
Name: spl
Branch: 1.0
-Version: 0.6.5.4
+Version: 0.6.5.5
Release: 1
Release-Tags: relext
License: GPL
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for spl 0.6.5.4.
+# Generated by GNU Autoconf 2.68 for spl 0.6.5.5.
#
#
# 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.4'
-PACKAGE_STRING='spl 0.6.5.4'
+PACKAGE_VERSION='0.6.5.5'
+PACKAGE_STRING='spl 0.6.5.5'
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.4 to adapt to many kinds of systems.
+\`configure' configures spl 0.6.5.5 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.4:";;
+ short | recursive ) echo "Configuration of spl 0.6.5.5:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-spl configure 0.6.5.4
+spl configure 0.6.5.5
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.4, which was
+It was created by spl $as_me 0.6.5.5, 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.4'
+ VERSION='0.6.5.5'
cat >>confdefs.h <<_ACEOF
# 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.4, which was
+This file was extended by spl $as_me 0.6.5.5, 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.4
+spl config.status 0.6.5.5
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
add_after "$KERNEL_DIR/Kconfig" 'source "arch/$SRCARCH/Kconfig"' 'source "spl/Kconfig"'
# 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"
+sed -i 's~mm/ fs/~mm/ spl/ fs/~' "$KERNEL_DIR/Makefile"
echo >&2
echo " $0: done." >&2
unsigned int saved_flags;
} fstrans_cookie_t;
+#ifdef PF_MEMALLOC_NOIO
+#define SPL_FSTRANS (PF_FSTRANS|PF_MEMALLOC_NOIO)
+#else
+#define SPL_FSTRANS (PF_FSTRANS)
+#endif
+
static inline fstrans_cookie_t
spl_fstrans_mark(void)
{
fstrans_cookie_t cookie;
cookie.fstrans_thread = current;
- cookie.saved_flags = current->flags & PF_FSTRANS;
- current->flags |= PF_FSTRANS;
+ cookie.saved_flags = current->flags & SPL_FSTRANS;
+ current->flags |= SPL_FSTRANS;
return (cookie);
}
spl_fstrans_unmark(fstrans_cookie_t cookie)
{
ASSERT3P(cookie.fstrans_thread, ==, current);
- ASSERT(current->flags & PF_FSTRANS);
+ ASSERT((current->flags & SPL_FSTRANS) == SPL_FSTRANS);
- current->flags &= ~(PF_FSTRANS);
+ current->flags &= ~SPL_FSTRANS;
current->flags |= cookie.saved_flags;
}
typedef ushort_t o_mode_t;
typedef uint_t major_t;
typedef uint_t minor_t;
-typedef ulong_t pfn_t;
typedef ulong_t pgcnt_t;
typedef long spgcnt_t;
typedef short index_t;
cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state, int io)
{
DEFINE_WAIT(wait);
+ kmutex_t *m;
ASSERT(cvp);
ASSERT(mp);
ASSERT(mutex_owned(mp));
atomic_inc(&cvp->cv_refs);
- if (cvp->cv_mutex == NULL)
- cvp->cv_mutex = mp;
-
+ m = ACCESS_ONCE(cvp->cv_mutex);
+ if (!m)
+ m = xchg(&cvp->cv_mutex, mp);
/* Ensure the same mutex is used by all callers */
- ASSERT(cvp->cv_mutex == mp);
+ ASSERT(m == NULL || m == mp);
prepare_to_wait_exclusive(&cvp->cv_event, &wait, state);
atomic_inc(&cvp->cv_waiters);
io_schedule();
else
schedule();
- mutex_enter(mp);
/* No more waiters a different mutex could be used */
if (atomic_dec_and_test(&cvp->cv_waiters)) {
+ /*
+ * This is set without any lock, so it's racy. But this is
+ * just for debug anyway, so make it best-effort
+ */
cvp->cv_mutex = NULL;
wake_up(&cvp->cv_destroy);
}
finish_wait(&cvp->cv_event, &wait);
atomic_dec(&cvp->cv_refs);
+
+ /*
+ * Hold mutex after we release the cvp, otherwise we could dead lock
+ * with a thread holding the mutex and call cv_destroy.
+ */
+ mutex_enter(mp);
}
void
int state)
{
DEFINE_WAIT(wait);
+ kmutex_t *m;
clock_t time_left;
ASSERT(cvp);
ASSERT(mutex_owned(mp));
atomic_inc(&cvp->cv_refs);
- if (cvp->cv_mutex == NULL)
- cvp->cv_mutex = mp;
-
+ m = ACCESS_ONCE(cvp->cv_mutex);
+ if (!m)
+ m = xchg(&cvp->cv_mutex, mp);
/* Ensure the same mutex is used by all callers */
- ASSERT(cvp->cv_mutex == mp);
+ ASSERT(m == NULL || m == mp);
/* XXX - Does not handle jiffie wrap properly */
time_left = expire_time - jiffies;
if (time_left <= 0) {
+ /* XXX - doesn't reset cv_mutex */
atomic_dec(&cvp->cv_refs);
return (-1);
}
*/
mutex_exit(mp);
time_left = schedule_timeout(time_left);
- mutex_enter(mp);
/* No more waiters a different mutex could be used */
if (atomic_dec_and_test(&cvp->cv_waiters)) {
+ /*
+ * This is set without any lock, so it's racy. But this is
+ * just for debug anyway, so make it best-effort
+ */
cvp->cv_mutex = NULL;
wake_up(&cvp->cv_destroy);
}
finish_wait(&cvp->cv_event, &wait);
atomic_dec(&cvp->cv_refs);
+ /*
+ * Hold mutex after we release the cvp, otherwise we could dead lock
+ * with a thread holding the mutex and call cv_destroy.
+ */
+ mutex_enter(mp);
return (time_left > 0 ? time_left : -1);
}
int state)
{
DEFINE_WAIT(wait);
+ kmutex_t *m;
hrtime_t time_left, now;
unsigned long time_left_us;
ASSERT(mutex_owned(mp));
atomic_inc(&cvp->cv_refs);
- if (cvp->cv_mutex == NULL)
- cvp->cv_mutex = mp;
-
+ m = ACCESS_ONCE(cvp->cv_mutex);
+ if (!m)
+ m = xchg(&cvp->cv_mutex, mp);
/* Ensure the same mutex is used by all callers */
- ASSERT(cvp->cv_mutex == mp);
+ ASSERT(m == NULL || m == mp);
now = gethrtime();
time_left = expire_time - now;
* 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)) {
+ /*
+ * This is set without any lock, so it's racy. But this is
+ * just for debug anyway, so make it best-effort
+ */
cvp->cv_mutex = NULL;
wake_up(&cvp->cv_destroy);
}
finish_wait(&cvp->cv_event, &wait);
atomic_dec(&cvp->cv_refs);
+ mutex_enter(mp);
time_left = expire_time - gethrtime();
return (time_left > 0 ? time_left : -1);
}
atomic_inc(&skc->skc_ref);
/*
- * Execute the registered reclaim callback if it exists. The
- * per-cpu caches will be drained when is set KMC_EXPIRE_MEM.
+ * Execute the registered reclaim callback if it exists.
*/
if (skc->skc_flags & KMC_SLAB) {
if (skc->skc_reclaim)
skc->skc_reclaim(skc->skc_private);
-
- if (spl_kmem_cache_expire & KMC_EXPIRE_MEM)
- kmem_cache_shrink(skc->skc_linux_cache);
-
goto out;
}
ct->ct_thread->comm, atomic_read(&cv->cv_condvar.cv_waiters));
mutex_exit(&cv->cv_mtx);
+ /* wait for main thread reap us */
+ while (!kthread_should_stop())
+ schedule();
return 0;
}
/* Wake everything for the failure case */
cv_broadcast(&cv.cv_condvar);
cv_destroy(&cv.cv_condvar);
+
+ /* wait for threads to exit */
+ for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) {
+ if (!IS_ERR(ct[i].ct_thread))
+ kthread_stop(ct[i].ct_thread);
+ }
mutex_destroy(&cv.cv_mtx);
return rc;
/* Wake everything for the failure case */
cv_destroy(&cv.cv_condvar);
+
+ /* wait for threads to exit */
+ for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) {
+ if (!IS_ERR(ct[i].ct_thread))
+ kthread_stop(ct[i].ct_thread);
+ }
mutex_destroy(&cv.cv_mtx);
return rc;
mutex_exit(&cv->cv_mtx);
+ /* wait for main thread reap us */
+ while (!kthread_should_stop())
+ schedule();
return 0;
}
/* Wake everything for the failure case */
cv_broadcast(&cv.cv_condvar);
cv_destroy(&cv.cv_condvar);
+
+ /* wait for threads to exit */
+ for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) {
+ if (!IS_ERR(ct[i].ct_thread))
+ kthread_stop(ct[i].ct_thread);
+ }
mutex_destroy(&cv.cv_mtx);
return rc;
/* Wake everything for the failure case */
cv_broadcast(&cv.cv_condvar);
cv_destroy(&cv.cv_condvar);
+
+ /* wait for threads to exit */
+ for (i = 0; i < SPLAT_CONDVAR_TEST_COUNT; i++) {
+ if (!IS_ERR(ct[i].ct_thread))
+ kthread_stop(ct[i].ct_thread);
+ }
mutex_destroy(&cv.cv_mtx);
return rc;
INSTALL_MOD_DIR=%{kmodinstdir_postfix}
cd ..
done
+
+# find-debuginfo.sh only considers executables
chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/*
%{?akmod_install}
rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed Mar 9 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.5-1
+- Linux 4.5 compatibility zfsonlinux/spl#524
+- Create working debuginfo packages on Red Hat zfsonlinux/zfs#4224
+- Allow copy-builtin to run multiple times zfsonlinux/spl#526
+- Use safer flags for in-kernel memory allocations zfsonlinux/spl#523
+- Fix potential deadlock in cv_wait() zfsonlinux/zfs#4106
+- Fix livelock in shrinker zfsonlinux/zfs#3936
* 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
%{_mandir}/man5/*
%changelog
+* Wed Mar 9 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.5-1
+- Linux 4.5 compatibility zfsonlinux/spl#524
+- Create working debuginfo packages on Red Hat zfsonlinux/zfs#4224
+- Allow copy-builtin to run multiple times zfsonlinux/spl#526
+- Use safer flags for in-kernel memory allocations zfsonlinux/spl#523
+- Fix potential deadlock in cv_wait() zfsonlinux/zfs#4106
+- Fix livelock in shrinker zfsonlinux/zfs#3936
* 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
several interfaces provided by the Solaris kernel.
%define kmod_name spl
-%define debug_package %{nil}
%kernel_module_package -n %{kmod_name} -p %{_sourcedir}/kmod-preamble
DESTDIR=${RPM_BUILD_ROOT} \
INSTALL_MOD_DIR=extra/%{kmod_name}
%{__rm} -f %{buildroot}/lib/modules/%{kverrel}/modules.*
+# find-debuginfo.sh only considers executables
+%{__chmod} u+x %{buildroot}/lib/modules/%{kverrel}/extra/*/*/*
%clean
rm -rf $RPM_BUILD_ROOT
%{_mandir}/man5/*
%changelog
+* Wed Mar 9 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.5-1
+- Linux 4.5 compatibility zfsonlinux/spl#524
+- Create working debuginfo packages on Red Hat zfsonlinux/zfs#4224
+- Allow copy-builtin to run multiple times zfsonlinux/spl#526
+- Use safer flags for in-kernel memory allocations zfsonlinux/spl#523
+- Fix potential deadlock in cv_wait() zfsonlinux/zfs#4106
+- Fix livelock in shrinker zfsonlinux/zfs#3936
* 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