aboutsummaryrefslogtreecommitdiff
path: root/lib/libzpool/common/taskq.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2014-11-08 06:34:37 +0000
committerXin LI <delphij@FreeBSD.org>2014-11-08 06:34:37 +0000
commit6c426f3bd473343f9e556a900758e03b8269d0f9 (patch)
tree666d931b81c59dbec9e8a30d5766372a82129939 /lib/libzpool/common/taskq.c
parentf41c6565a56cc169c6a869bdd05690a3afddd7da (diff)
downloadsrc-6c426f3bd473343f9e556a900758e03b8269d0f9.tar.gz
src-6c426f3bd473343f9e556a900758e03b8269d0f9.zip
5244 zio pipeline callers should explicitly invoke next stage
Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: Alex Reece <alex.reece@delphix.com> Reviewed by: Christopher Siden <christopher.siden@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Richard Elling <richard.elling@gmail.com> Reviewed by: Dan McDonald <danmcd@omniti.com> Reviewed by: Steven Hartland <killing@multiplay.co.uk> Approved by: Gordon Ross <gwr@nexenta.com> Author: George Wilson <george.wilson@delphix.com> illumos/illumos-gate@738f37bc3dcd61e8a893af0f2d466d76690b70ec
Notes
Notes: svn path=/vendor-sys/illumos/dist/; revision=274272
Diffstat (limited to 'lib/libzpool/common/taskq.c')
-rw-r--r--lib/libzpool/common/taskq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libzpool/common/taskq.c b/lib/libzpool/common/taskq.c
index 2c5dfd86dcc0..a4ab58963d75 100644
--- a/lib/libzpool/common/taskq.c
+++ b/lib/libzpool/common/taskq.c
@@ -25,6 +25,7 @@
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright 2012 Garrett D'Amore <garrett@damore.org>. All rights reserved.
+ * Copyright (c) 2014 by Delphix. All rights reserved.
*/
#include <sys/zfs_context.h>
@@ -33,8 +34,10 @@ int taskq_now;
taskq_t *system_taskq;
#define TASKQ_ACTIVE 0x00010000
+#define TASKQ_NAMELEN 31
struct taskq {
+ char tq_name[TASKQ_NAMELEN + 1];
kmutex_t tq_lock;
krwlock_t tq_threadlock;
kcondvar_t tq_dispatch_cv;
@@ -247,6 +250,7 @@ taskq_create(const char *name, int nthreads, pri_t pri,
cv_init(&tq->tq_dispatch_cv, NULL, CV_DEFAULT, NULL);
cv_init(&tq->tq_wait_cv, NULL, CV_DEFAULT, NULL);
cv_init(&tq->tq_maxalloc_cv, NULL, CV_DEFAULT, NULL);
+ (void) strncpy(tq->tq_name, name, TASKQ_NAMELEN + 1);
tq->tq_flags = flags | TASKQ_ACTIVE;
tq->tq_active = nthreads;
tq->tq_nthreads = nthreads;