Skip to content

Commit

Permalink
ZIL: Avoid dbuf_read() in ztest_get_data()
Browse files Browse the repository at this point in the history
While working on similar patches for zfs and zvol in #15153 I've
forgot about ztest.  Update it also so that we test the same code
paths as use in production.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes #15301
  • Loading branch information
amotin authored and behlendorf committed Sep 28, 2023
1 parent 5f30698 commit 0aabd6b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/ztest.c
Original file line number Diff line number Diff line change
Expand Up @@ -2457,8 +2457,7 @@ ztest_get_data(void *arg, uint64_t arg2, lr_write_t *lr, char *buf,
zgd->zgd_lr = (struct zfs_locked_range *)ztest_range_lock(zd,
object, offset, size, RL_READER);

error = dmu_buf_hold(os, object, offset, zgd, &db,
DMU_READ_NO_PREFETCH);
error = dmu_buf_hold_noread(os, object, offset, zgd, &db);

if (error == 0) {
blkptr_t *bp = &lr->lr_blkptr;
Expand Down

0 comments on commit 0aabd6b

Please sign in to comment.