diff options
author | mav <mav@FreeBSD.org> | 2016-03-20 20:12:14 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-03-20 20:12:14 +0000 |
commit | 495e63a6681b828671980c26d135f5ed2af0d6c2 (patch) | |
tree | 8794aa6f347757b9c47161ed17bf65e0dbb5fbc1 /cddl/contrib/opensolaris/lib | |
parent | e727ce4355229a44282d4a47836d884f81341982 (diff) | |
download | FreeBSD-src-495e63a6681b828671980c26d135f5ed2af0d6c2.zip FreeBSD-src-495e63a6681b828671980c26d135f5ed2af0d6c2.tar.gz |
MFC r274304 (by delphij): MFV r274272 and diff reduction with upstream.
Illumos issue:
5244 zio pipeline callers should explicitly invoke next stage
Diffstat (limited to 'cddl/contrib/opensolaris/lib')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzpool/common/taskq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c b/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c index 785f106..26d9f36 100644 --- a/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c +++ b/cddl/contrib/opensolaris/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; |