diff --git a/module/zfs/vdev_raidz_math.c b/module/zfs/vdev_raidz_math.c index 25d76970e9..2ce0dc5cc7 100644 --- a/module/zfs/vdev_raidz_math.c +++ b/module/zfs/vdev_raidz_math.c @@ -465,6 +465,7 @@ benchmark_raidz(void) raidz_supp_impl_cnt = c; /* number of supported impl */ #if defined(_KERNEL) + abd_t *pabd; zio_t *bench_zio = NULL; raidz_map_t *bench_rm = NULL; uint64_t bench_parity; @@ -492,6 +493,12 @@ benchmark_raidz(void) bench_rm = vdev_raidz_map_alloc(bench_zio, SPA_MINBLOCKSHIFT, BENCH_COLS, PARITY_PQR); + /* Ensure that fake parity blocks are initialized */ + for (c = 0; c < bench_rm->rm_row[0]->rr_firstdatacol; c++) { + pabd = bench_rm->rm_row[0]->rr_col[c].rc_abd; + memset(abd_to_buf(pabd), 0xAA, abd_get_size(pabd)); + } + for (int fn = 0; fn < RAIDZ_REC_NUM; fn++) benchmark_raidz_impl(bench_rm, fn, benchmark_rec_impl);