Merge commit 'refs/top-bases/linux-zpios' into linux-zpios

This commit is contained in:
Brian Behlendorf 2010-05-27 16:22:23 -07:00
commit dec9d57ca6
3 changed files with 8 additions and 16 deletions

View 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;
@ -2562,8 +2557,8 @@ ztest_dmu_write_parallel(ztest_args_t *za)
uint64_t off, txg, txg_how;
mutex_t *lp;
char osname[MAXNAMELEN];
char *iobuf;
blkptr_t blk;
char iobuf[SPA_MAXBLOCKSIZE];
blkptr_t blk = { 0 };
uint64_t blkoff;
zbookmark_t zb;
dmu_tx_t *tx = dmu_tx_create(os);
@ -2732,8 +2727,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
@ -2752,10 +2745,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);
@ -2771,8 +2764,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);
}
/*

View File

@ -336,7 +336,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

View 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;