| 2510 | } |
| 2511 | |
| 2512 | static int |
| 2513 | ztest_write(ztest_ds_t *zd, uint64_t object, uint64_t offset, uint64_t size, |
| 2514 | void *data) |
| 2515 | { |
| 2516 | lr_write_t *lr; |
| 2517 | int error; |
| 2518 | |
| 2519 | lr = ztest_lr_alloc(sizeof (*lr) + size, NULL); |
| 2520 | |
| 2521 | lr->lr_foid = object; |
| 2522 | lr->lr_offset = offset; |
| 2523 | lr->lr_length = size; |
| 2524 | lr->lr_blkoff = 0; |
| 2525 | BP_ZERO(&lr->lr_blkptr); |
| 2526 | |
| 2527 | bcopy(data, lr + 1, size); |
| 2528 | |
| 2529 | error = ztest_replay_write(zd, lr, B_FALSE); |
| 2530 | |
| 2531 | ztest_lr_free(lr, sizeof (*lr) + size, NULL); |
| 2532 | |
| 2533 | return (error); |
| 2534 | } |
| 2535 | |
| 2536 | static int |
| 2537 | ztest_truncate(ztest_ds_t *zd, uint64_t object, uint64_t offset, uint64_t size) |
no test coverage detected