* 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);
}
}
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);
zil_alloc(objset_t *os, zil_header_t *zh_phys)
{
zilog_t *zilog;
+ int i;
zilog = kmem_zalloc(sizeof (zilog_t), KM_SLEEP);
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);
}
zil_free(zilog_t *zilog)
{
lwb_t *head_lwb;
+ int i;
zilog->zl_stop_sync = 1;
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()