X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fzil.c;h=751806d331ffaa19a86907989d01889bf5540222;hb=c65aa5b2b9c48375ea1c451f252f0056e16f4e49;hp=c66313ff6f85c5bb4f2043530d3940c9a2a078e7;hpb=572e285762521df27fe5b026f409ba1a21abb7ac;p=zfs.git diff --git a/module/zfs/zil.c b/module/zfs/zil.c index c66313f..751806d 100644 --- a/module/zfs/zil.c +++ b/module/zfs/zil.c @@ -1299,7 +1299,7 @@ zil_clean(zilog_t *zilog, uint64_t synced_txg) * created a bad performance problem. */ if (taskq_dispatch(zilog->zl_clean_taskq, - (void (*)(void *))zil_itxg_clean, clean_me, TQ_NOSLEEP) == NULL) + (void (*)(void *))zil_itxg_clean, clean_me, TQ_NOSLEEP) == 0) zil_itxg_clean(clean_me); } @@ -1421,7 +1421,7 @@ zil_commit_writer(zilog_t *zilog) } DTRACE_PROBE1(zil__cw1, zilog_t *, zilog); - while (itx = list_head(&zilog->zl_itx_commit_list)) { + while ((itx = list_head(&zilog->zl_itx_commit_list))) { txg = itx->itx_lr.lrc_txg; ASSERT(txg); @@ -1620,6 +1620,7 @@ zilog_t * zil_alloc(objset_t *os, zil_header_t *zh_phys) { zilog_t *zilog; + int i; zilog = kmem_zalloc(sizeof (zilog_t), KM_SLEEP); @@ -1634,7 +1635,7 @@ zil_alloc(objset_t *os, zil_header_t *zh_phys) mutex_init(&zilog->zl_lock, NULL, MUTEX_DEFAULT, NULL); - for (int i = 0; i < TXG_SIZE; i++) { + for (i = 0; i < TXG_SIZE; i++) { mutex_init(&zilog->zl_itxg[i].itxg_lock, NULL, MUTEX_DEFAULT, NULL); } @@ -1662,6 +1663,7 @@ void zil_free(zilog_t *zilog) { lwb_t *head_lwb; + int i; zilog->zl_stop_sync = 1; @@ -1683,7 +1685,7 @@ zil_free(zilog_t *zilog) ASSERT(list_is_empty(&zilog->zl_itx_commit_list)); list_destroy(&zilog->zl_itx_commit_list); - for (int i = 0; i < TXG_SIZE; i++) { + for (i = 0; i < TXG_SIZE; i++) { /* * It's possible for an itx to be generated that doesn't dirty * a txg (e.g. ztest TX_TRUNCATE). So there's no zil_clean()