From 4f34bd9792bad1affe5b93aeef406fd7dc2df0f8 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 4 Jun 2015 16:25:37 -0700 Subject: [PATCH] Add taskq_wait_outstanding() function SPL commit behlendorf/spl@9cef1b5 adds the taskq_wait_outstanding() interface. See the commit log for the full justification for this addition. This patch adds the required user space counterpart. Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase --- include/sys/zfs_context.h | 1 + lib/libzpool/taskq.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index 761b1d57a..8b9a5f46f 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -468,6 +468,7 @@ extern void taskq_init_ent(taskq_ent_t *); extern void taskq_destroy(taskq_t *); extern void taskq_wait(taskq_t *); extern void taskq_wait_id(taskq_t *, taskqid_t); +extern void taskq_wait_outstanding(taskq_t *, taskqid_t); extern int taskq_member(taskq_t *, kthread_t *); extern int taskq_cancel_id(taskq_t *, taskqid_t); extern void system_taskq_init(void); diff --git a/lib/libzpool/taskq.c b/lib/libzpool/taskq.c index d63bc28e2..c6fa2fff7 100644 --- a/lib/libzpool/taskq.c +++ b/lib/libzpool/taskq.c @@ -220,6 +220,12 @@ taskq_wait_id(taskq_t *tq, taskqid_t id) taskq_wait(tq); } +void +taskq_wait_outstanding(taskq_t *tq, taskqid_t id) +{ + taskq_wait(tq); +} + static void taskq_thread(void *arg) { -- 2.40.0