3246 ZFS I/O deadman thread
[zfs.git] / lib / libzpool / taskq.c
index 6143a91..64e2142 100644 (file)
@@ -24,6 +24,7 @@
  */
 /*
  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2012 Garrett D'Amore <garrett@damore.org>.  All rights reserved.
  */
 
 #include <sys/zfs_context.h>
@@ -140,14 +141,19 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t tqflags)
        t->tqent_prev->tqent_next = t;
        t->tqent_func = func;
        t->tqent_arg = arg;
-
-       ASSERT(!(t->tqent_flags & TQENT_FLAG_PREALLOC));
-
+       t->tqent_flags = 0;
        cv_signal(&tq->tq_dispatch_cv);
        mutex_exit(&tq->tq_lock);
        return (1);
 }
 
+taskqid_t
+taskq_dispatch_delay(taskq_t *tq,  task_func_t func, void *arg, uint_t tqflags,
+    clock_t expire_time)
+{
+       return (0);
+}
+
 int
 taskq_empty_ent(taskq_ent_t *t)
 {
@@ -340,6 +346,12 @@ taskq_member(taskq_t *tq, kthread_t *t)
        return (0);
 }
 
+int
+taskq_cancel_id(taskq_t *tq, taskqid_t id)
+{
+       return (ENOENT);
+}
+
 void
 system_taskq_init(void)
 {