zfs/module/spl
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
..
Makefile.in Add XDR implementation 2009-03-11 13:00:26 -07:00
spl-atomic.c Rename modules to module and update references 2009-01-15 10:44:54 -08:00
spl-condvar.c Rename modules to module and update references 2009-01-15 10:44:54 -08:00
spl-debug.c Ensure -NDEBUG does not get added to spl_config.h and is only set in the build options. This allows other kernel modules to use spl_config to leverage the reset of the config checks without getting confused with the debug options 2009-01-20 11:59:47 -08:00
spl-err.c Rename modules to module and update references 2009-01-15 10:44:54 -08:00
spl-generic.c Linux VM Integration Cleanup 2009-03-04 10:04:15 -08:00
spl-kmem.c Build system and packaging (RPM support) 2009-03-09 15:56:55 -07:00
spl-kobj.c Rename modules to module and update references 2009-01-15 10:44:54 -08:00
spl-kstat.c Rename modules to module and update references 2009-01-15 10:44:54 -08:00
spl-module.c Linux VM integration / device special files 2009-02-04 15:15:41 -08:00
spl-mutex.c Coverity 9649, 9650, 9651: Uninit 2009-02-18 09:48:07 -08:00
spl-proc.c Fix off-by-1 truncation of hw_serial when converting from integer to string, when writing to /proc/sys/kernel/spl/spl_hostid. 2009-03-12 15:47:50 -07:00
spl-rwlock.c Rename modules to module and update references 2009-01-15 10:44:54 -08:00
spl-taskq.c Fix taskq_wait() not waiting bug 2009-03-15 15:13:49 -07:00
spl-thread.c Rename modules to module and update references 2009-01-15 10:44:54 -08:00
spl-time.c Rename modules to module and update references 2009-01-15 10:44:54 -08:00
spl-vnode.c Rename modules to module and update references 2009-01-15 10:44:54 -08:00
spl-xdr.c Minor bug fix in XDR code introduced in last minute change before landing. 2009-03-11 16:27:35 -07:00