summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2017-09-13 10:59:36 +0000
committerAndriy Gapon <avg@FreeBSD.org>2017-09-13 10:59:36 +0000
commitf3dbcb8c81432ef26a56091b9ec040a1ab017443 (patch)
tree1a084f5940b87f61da9c9297868a9a87d672328a /cmd
parentf8453396dcc44b96806aeb697b91a4539850a3ce (diff)
Notes
Diffstat (limited to 'cmd')
-rw-r--r--cmd/ztest/ztest.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index 24ff971efa29..c187a0358aa9 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -1829,13 +1829,14 @@ ztest_get_done(zgd_t *zgd, int error)
ztest_object_unlock(zd, object);
if (error == 0 && zgd->zgd_bp)
- zil_add_block(zgd->zgd_zilog, zgd->zgd_bp);
+ zil_lwb_add_block(zgd->zgd_lwb, zgd->zgd_bp);
umem_free(zgd, sizeof (*zgd));
}
static int
-ztest_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio)
+ztest_get_data(void *arg, lr_write_t *lr, char *buf, struct lwb *lwb,
+ zio_t *zio)
{
ztest_ds_t *zd = arg;
objset_t *os = zd->zd_os;
@@ -1849,6 +1850,10 @@ ztest_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio)
zgd_t *zgd;
int error;
+ ASSERT3P(lwb, !=, NULL);
+ ASSERT3P(zio, !=, NULL);
+ ASSERT3U(size, !=, 0);
+
ztest_object_lock(zd, object, RL_READER);
error = dmu_bonus_hold(os, object, FTAG, &db);
if (error) {
@@ -1869,7 +1874,7 @@ ztest_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio)
db = NULL;
zgd = umem_zalloc(sizeof (*zgd), UMEM_NOFAIL);
- zgd->zgd_zilog = zd->zd_zilog;
+ zgd->zgd_lwb = lwb;
zgd->zgd_private = zd;
if (buf != NULL) { /* immediate write */