]> granicus.if.org Git - zfs/commitdiff
Revert all remaining changes.
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 27 May 2010 21:25:06 +0000 (14:25 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 27 May 2010 21:25:06 +0000 (14:25 -0700)
cmd/ztest/ztest.c
lib/libzpool/include/sys/zfs_context.h
lib/libzpool/taskq.c

index c153ca6b17703dc2c2c1ce091762dbc916fede7c..5f49fd5a06056aae706c83e6e3c83f05c4455461 100644 (file)
@@ -58,9 +58,6 @@
  *     the transaction group number is less than the current, open txg.
  *     If you add a new test, please do this if applicable.
  *
- * (7) Threads are created with a reduced stack size, for sanity checking.
- *     Therefore, it's important not to allocate huge buffers on the stack.
- *
  * When run with no arguments, ztest runs for about five minutes and
  * produces no output if successful.  To get a little bit of information,
  * specify -V.  To get more information, specify -VV, and so on.
@@ -159,7 +156,6 @@ typedef struct ztest_args {
        ztest_block_tag_t za_wbt;
        dmu_object_info_t za_doi;
        dmu_buf_t       *za_dbuf;
-       boolean_t       za_exited;
 } ztest_args_t;
 
 typedef void ztest_func_t(ztest_args_t *);
@@ -254,7 +250,6 @@ static int ztest_dump_core = 1;
 
 static uint64_t metaslab_sz;
 static boolean_t ztest_exiting;
-static boolean_t resume_thr_exited;
 
 extern uint64_t metaslab_gang_bang;
 extern uint64_t metaslab_df_alloc_threshold;
@@ -2549,7 +2544,7 @@ ztest_dmu_write_parallel(ztest_args_t *za)
        uint64_t off, txg, txg_how;
        mutex_t *lp;
        char osname[MAXNAMELEN];
-       char *iobuf;
+       char iobuf[SPA_MAXBLOCKSIZE];
        blkptr_t blk = { 0 };
        uint64_t blkoff;
        zbookmark_t zb;
@@ -2718,8 +2713,6 @@ ztest_dmu_write_parallel(ztest_args_t *za)
        ASSERT3U(BP_GET_LEVEL(&blk), ==, 0);
        ASSERT3U(BP_GET_LSIZE(&blk), ==, bs);
 
-       iobuf = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL);
-
        /*
         * Read the block that dmu_sync() returned to make sure its contents
         * match what we wrote.  We do this while still txg_suspend()ed
@@ -2738,10 +2731,10 @@ ztest_dmu_write_parallel(ztest_args_t *za)
        bcopy(&iobuf[blkoff], rbt, btsize);
 
        if (rbt->bt_objset == 0)                /* concurrent free */
-               goto out;
+               return;
 
        if (wbt->bt_objset == 0)                /* all-zero overwrite */
-               goto out;
+               return;
 
        ASSERT3U(rbt->bt_objset, ==, wbt->bt_objset);
        ASSERT3U(rbt->bt_object, ==, wbt->bt_object);
@@ -2757,8 +2750,6 @@ ztest_dmu_write_parallel(ztest_args_t *za)
                ASSERT3U(rbt->bt_seq, ==, wbt->bt_seq);
        else
                ASSERT3U(rbt->bt_seq, >, wbt->bt_seq);
-out:
-       umem_free(iobuf, SPA_MAXBLOCKSIZE);
 }
 
 /*
index 327f817856ee1695651533509d3f596ef2778f99..230c233a242c369a88c662f4006aea8702cf4726 100644 (file)
@@ -330,7 +330,7 @@ extern taskq_t      *taskq_create(const char *, int, pri_t, int, int, uint_t);
 extern taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, uint_t);
 extern void    taskq_destroy(taskq_t *);
 extern void    taskq_wait(taskq_t *);
-extern int     taskq_member(taskq_t *, kthread_t *);
+extern int     taskq_member(taskq_t *, void *);
 extern void    system_taskq_init(void);
 
 #define        XVA_MAPSIZE     3
index 70b720ed8e3719d040a941aacf9b833cd346f35b..1a73fe83cc3e891f243b40d2b6cc1d63acdf95e5 100644 (file)
@@ -134,7 +134,7 @@ taskq_wait(taskq_t *tq)
        mutex_exit(&tq->tq_lock);
 }
 
-static void
+static void *
 taskq_thread(void *arg)
 {
        taskq_t *tq = arg;
@@ -217,6 +217,7 @@ taskq_create(const char *name, int nthreads, pri_t pri,
 void
 taskq_destroy(taskq_t *tq)
 {
+       int t;
        int nthreads = tq->tq_nthreads;
 
        taskq_wait(tq);
@@ -251,7 +252,7 @@ taskq_destroy(taskq_t *tq)
 }
 
 int
-taskq_member(taskq_t *tq, kthread_t *t)
+taskq_member(taskq_t *tq, void *t)
 {
        int i;