]> git.proxmox.com Git - mirror_spl.git/commit
Make taskq_wait() block until the queue is empty
authorChris Dunlop <chris@onthe.net.au>
Thu, 14 May 2015 19:26:51 +0000 (12:26 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 9 Jun 2015 19:20:12 +0000 (12:20 -0700)
commita876b0305e94eea9505e7ecbae93cf7a1d24f743
tree767f824f2d828165b6ddda760f6610c31a83ae72
parentdc5e8b70416e5d511bc361309bd426c767177723
Make taskq_wait() block until the queue is empty

Under Illumos taskq_wait() returns when there are no more tasks
in the queue.  This behavior differs from ZoL and FreeBSD where
taskq_wait() returns when all the tasks in the queue at the
beginning of the taskq_wait() call are complete.  New tasks
added whilst taskq_wait() is running will be ignored.

This difference in semantics makes it possible that new subtle
issues could be introduced when porting changes from Illumos.
To avoid that possibility the taskq_wait() function is being
updated such that it blocks until the queue in empty.

The previous behavior remains available through the
taskq_wait_outstanding() interface.  Note that this function
was previously called taskq_wait_all() but has been renamed
to avoid confusion.

Signed-off-by: Chris Dunlop <chris@onthe.net.au>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #455
include/sys/taskq.h
module/spl/spl-taskq.c
module/splat/splat-taskq.c