X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fzil.c;h=db3822f5a8873dec5978950ff20d50f04dc01209;hb=6119cb885a976e175a6e827894accf657ff1984f;hp=53d9d9bf7ecc732e1aa18eaee9493a4c5493747b;hpb=9babb37438b58e77bad04e820d5702e15b79e6a6;p=zfs.git diff --git a/module/zfs/zil.c b/module/zfs/zil.c index 53d9d9b..db3822f 100644 --- a/module/zfs/zil.c +++ b/module/zfs/zil.c @@ -714,14 +714,15 @@ zil_lwb_write_done(zio_t *zio) lwb->lwb_buf = NULL; if (zio->io_error) zilog->zl_log_error = B_TRUE; - mutex_exit(&zilog->zl_lock); /* * Now that we've written this log block, we have a stable pointer * to the next block in the chain, so it's OK to let the txg in - * which we allocated the next block sync. + * which we allocated the next block sync. We still have the + * zl_lock to ensure zil_sync doesn't kmem free the lwb. */ txg_rele_to_sync(&lwb->lwb_txgh); + mutex_exit(&zilog->zl_lock); } /* @@ -925,6 +926,10 @@ zil_lwb_commit(zilog_t *zilog, itx_t *itx, lwb_t *lwb) } error = zilog->zl_get_data( itx->itx_private, lr, dbuf, lwb->lwb_zio); + if (error == EIO) { + txg_wait_synced(zilog->zl_dmu_pool, txg); + return (lwb); + } if (error) { ASSERT(error == ENOENT || error == EEXIST || error == EALREADY);