X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fdsl_pool.c;h=7185540f1a40d1a0908435a10f9ceebcf706a6a4;hb=691f6ac4c2858d64afc2a0dc1bd2b8c041d68502;hp=2cd21a102beb10904ae8139993af786167265dcf;hpb=428870ff734fdaccc342b33fc53cf94724409a46;p=zfs.git diff --git a/module/zfs/dsl_pool.c b/module/zfs/dsl_pool.c index 2cd21a1..7185540 100644 --- a/module/zfs/dsl_pool.c +++ b/module/zfs/dsl_pool.c @@ -42,7 +42,7 @@ int zfs_no_write_throttle = 0; int zfs_write_limit_shift = 3; /* 1/8th of physical memory */ -int zfs_txg_synctime_ms = 5000; /* target millisecs to sync a txg */ +int zfs_txg_synctime_ms = 1000; /* target millisecs to sync a txg */ uint64_t zfs_write_limit_min = 32 << 20; /* min write limit is 32MB */ uint64_t zfs_write_limit_max = 0; /* max data payload per txg */ @@ -92,7 +92,7 @@ dsl_pool_open_impl(spa_t *spa, uint64_t txg) mutex_init(&dp->dp_lock, NULL, MUTEX_DEFAULT, NULL); - dp->dp_vnrele_taskq = taskq_create("zfs_vn_rele_taskq", 1, minclsyspri, + dp->dp_iput_taskq = taskq_create("zfs_iput_taskq", 1, minclsyspri, 1, 4, 0); return (dp); @@ -214,7 +214,7 @@ dsl_pool_close(dsl_pool_t *dp) dsl_scan_fini(dp); rw_destroy(&dp->dp_config_rwlock); mutex_destroy(&dp->dp_lock); - taskq_destroy(dp->dp_vnrele_taskq); + taskq_destroy(dp->dp_iput_taskq); if (dp->dp_blkstats) kmem_free(dp->dp_blkstats, sizeof (zfs_all_blkstats_t)); kmem_free(dp, sizeof (dsl_pool_t)); @@ -322,7 +322,7 @@ dsl_pool_sync(dsl_pool_t *dp, uint64_t txg) start = gethrtime(); zio = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED); - while (ds = txg_list_remove(&dp->dp_dirty_datasets, txg)) { + while ((ds = txg_list_remove(&dp->dp_dirty_datasets, txg))) { /* * We must not sync any non-MOS datasets twice, because * we may have taken a snapshot of them. However, we @@ -350,7 +350,7 @@ dsl_pool_sync(dsl_pool_t *dp, uint64_t txg) * whose ds_bp will be rewritten when we do this 2nd sync. */ zio = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED); - while (ds = txg_list_remove(&dp->dp_dirty_datasets, txg)) { + while ((ds = txg_list_remove(&dp->dp_dirty_datasets, txg))) { ASSERT(list_link_active(&ds->ds_synced_link)); dmu_buf_rele(ds->ds_dbuf, ds); dsl_dataset_sync(ds, zio, tx); @@ -367,7 +367,7 @@ dsl_pool_sync(dsl_pool_t *dp, uint64_t txg) deadlist_enqueue_cb, &ds->ds_deadlist, tx); } - while (dstg = txg_list_remove(&dp->dp_sync_tasks, txg)) { + while ((dstg = txg_list_remove(&dp->dp_sync_tasks, txg))) { /* * No more sync tasks should have been added while we * were syncing. @@ -378,7 +378,7 @@ dsl_pool_sync(dsl_pool_t *dp, uint64_t txg) DTRACE_PROBE(pool_sync__3task); start = gethrtime(); - while (dd = txg_list_remove(&dp->dp_dirty_dirs, txg)) + while ((dd = txg_list_remove(&dp->dp_dirty_dirs, txg))) dsl_dir_sync(dd, tx); write_time += gethrtime() - start; @@ -448,10 +448,10 @@ dsl_pool_sync_done(dsl_pool_t *dp, uint64_t txg) dsl_dataset_t *ds; objset_t *os; - while (ds = list_head(&dp->dp_synced_datasets)) { + while ((ds = list_head(&dp->dp_synced_datasets))) { list_remove(&dp->dp_synced_datasets, ds); os = ds->ds_objset; - zil_clean(os->os_zil); + zil_clean(os->os_zil, txg); ASSERT(!dmu_objset_is_dirty(os, txg)); dmu_buf_rele(ds->ds_dbuf, ds); } @@ -692,9 +692,10 @@ upgrade_dir_clones_cb(spa_t *spa, uint64_t dsobj, const char *dsname, void *arg) void dsl_pool_upgrade_dir_clones(dsl_pool_t *dp, dmu_tx_t *tx) { - ASSERT(dmu_tx_is_syncing(tx)); uint64_t obj; + ASSERT(dmu_tx_is_syncing(tx)); + (void) dsl_dir_create_sync(dp, dp->dp_root_dir, FREE_DIR_NAME, tx); VERIFY(0 == dsl_pool_open_special_dir(dp, FREE_DIR_NAME, &dp->dp_free_dir)); @@ -737,9 +738,9 @@ dsl_pool_create_origin(dsl_pool_t *dp, dmu_tx_t *tx) } taskq_t * -dsl_pool_vnrele_taskq(dsl_pool_t *dp) +dsl_pool_iput_taskq(dsl_pool_t *dp) { - return (dp->dp_vnrele_taskq); + return (dp->dp_iput_taskq); } /* @@ -768,7 +769,7 @@ dsl_pool_clean_tmp_userrefs(dsl_pool_t *dp) *htag = '\0'; ++htag; dsobj = strtonum(za.za_name, NULL); - (void) dsl_dataset_user_release_tmp(dp, dsobj, htag); + (void) dsl_dataset_user_release_tmp(dp, dsobj, htag, B_FALSE); } zap_cursor_fini(&zc); }