OpenZFS on Linux and FreeBSD
Go to file
Brian Behlendorf 7257ec4185 Fix taskq_wait() not waiting bug
I'm very surprised this has not surfaced until now.  But the taskq_wait()
implementation work only wait successfully the first time it was called.
Subsequent usage of taskq_wait() on the taskq would not wait.

The issue was caused by tq->tq_lowest_id being set to MAX_INT after the
first wait completed.  This caused subsequent waits which check that the
waiting id is less than the lowest taskq id to always succeed.  The fix
is to ensure that tq->tq_lowest_id is never set larger than tq->tq_next.id.

Additional fixes which were added to this patch include:
1) Fix a race by placing the taskq_wait_check() in the tq->tq_lock spinlock.
2) taskq_wait() should wait for the largest outstanding id.
3) Multiple spelling corrections.
4) Added taskq wait regression test to validate correct behavior.
2009-03-15 15:13:49 -07:00
cmd Build system and packaging (RPM support) 2009-03-09 15:56:55 -07:00
config Added SPL_AC_5ARGS_DEVICE_CREATE autoconf configure check 2009-03-13 13:38:43 -07:00
include Fix taskq_wait() not waiting bug 2009-03-15 15:13:49 -07:00
lib Build system and packaging (RPM support) 2009-03-09 15:56:55 -07:00
module Fix taskq_wait() not waiting bug 2009-03-15 15:13:49 -07:00
patches Linux VM Integration Cleanup 2009-03-04 10:04:15 -08:00
scripts Build system and packaging (RPM support) 2009-03-09 15:56:55 -07:00
AUTHORS Go through and add a header with the proper UCRL number. 2008-05-26 04:38:26 +00:00
COPYING Go through and add a header with the proper UCRL number. 2008-05-26 04:38:26 +00:00
ChangeLog Prep for 0.4.2 tag 2009-02-05 13:43:45 -08:00
DISCLAIMER Go through and add a header with the proper UCRL number. 2008-05-26 04:38:26 +00:00
INSTALL Trivial commit to remove whitespace 2008-07-09 19:11:29 +00:00
META Prep for 0.4.2 tag 2009-02-05 13:43:45 -08:00
Makefile.am Build system cleanup 2009-03-11 12:37:34 -07:00
Makefile.in Build system cleanup 2009-03-11 12:37:34 -07:00
autogen.sh * : Add autogen.sh products. 2008-11-24 23:49:18 +00:00
configure Added SPL_AC_5ARGS_DEVICE_CREATE autoconf configure check 2009-03-13 13:38:43 -07:00
configure.ac Added SPL_AC_5ARGS_DEVICE_CREATE autoconf configure check 2009-03-13 13:38:43 -07:00
spl.spec.in Build system cleanup 2009-03-11 12:37:34 -07:00
spl_config.h.in Added SPL_AC_5ARGS_DEVICE_CREATE autoconf configure check 2009-03-13 13:38:43 -07:00