mirror_zfs/module/spl
Chunwei Chen 5ce028b0d4 Fix race between taskq_destroy and dynamic spawning thread
While taskq_destroy would wait for dynamic_taskq to finish its tasks, but it
does not implies the thread being spawned is up and running. This will cause
taskq to be freed before the thread can exit.

We fix this by using tq_nspawn to indicate how many threads are being spawned
before they are inserted to the thread list. And have taskq_destroy to wait
for it to drop to zero.

Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tim Chase <tim@chase2k.com>
Issue #553
Closes #550
2016-05-24 13:00:17 -07:00
..
Makefile.in Support parallel build trees (VPATH builds) 2015-07-17 12:53:11 -07:00
spl-atomic.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-condvar.c Restore CALLOUT_FLAG_ABSOLUTE in cv_timedwait_hires 2016-05-24 12:58:49 -07:00
spl-cred.c Remove credential configure checks. 2014-10-17 15:11:51 -07:00
spl-err.c Retire legacy debugging infrastructure 2014-11-19 10:35:07 -08:00
spl-generic.c random_get_pseudo_bytes() need not provide cryptographic strength entropy 2016-02-17 09:49:09 -08:00
spl-kmem-cache.c Use spl_fstrans_mark instead of memalloc_noio_save 2015-12-18 13:24:52 -08:00
spl-kmem.c Use spl_fstrans_mark instead of memalloc_noio_save 2015-12-18 13:24:52 -08:00
spl-kobj.c kobj_read_file: Return -1 on vn_rdwr() error 2016-01-23 10:10:44 -08:00
spl-kstat.c Refactor existing code 2015-01-16 13:55:08 -08:00
spl-mutex.c Remove adaptive mutex implementation 2014-10-17 15:07:28 -07:00
spl-proc.c Provide kstat for taskqs 2015-12-16 09:35:22 -08:00
spl-rwlock.c Add rw_tryupgrade() 2016-03-10 13:05:25 -08:00
spl-taskq.c Fix race between taskq_destroy and dynamic spawning thread 2016-05-24 13:00:17 -07:00
spl-thread.c Retire legacy debugging infrastructure 2014-11-19 10:35:07 -08:00
spl-tsd.c Use tsd to store tq for taskq_member 2016-01-20 13:07:45 -08:00
spl-vmem.c Use spl_fstrans_mark instead of memalloc_noio_save 2015-12-18 13:24:52 -08:00
spl-vnode.c Linux 4.7 compat: inode_lock() and friends 2016-05-20 11:00:14 -07:00
spl-xdr.c Retire legacy debugging infrastructure 2014-11-19 10:35:07 -08:00
spl-zlib.c Refactor existing code 2015-01-16 13:55:08 -08:00