From 3e004369f743dde631dcfb71a4ebb085a77dc6b4 Mon Sep 17 00:00:00 2001 From: Alek P Date: Wed, 6 Aug 2025 20:10:03 -0400 Subject: [PATCH] Removed unused zio_decompress_fail_fraction variable Reviewed-by: Brian Behlendorf Reviewed-by: George Melikov Signed-off-by: Alek Pinchuk Closes #17599 --- cmd/ztest.c | 1 - module/zfs/zio_compress.c | 15 --------------- 2 files changed, 16 deletions(-) diff --git a/cmd/ztest.c b/cmd/ztest.c index 2e88ae3e7..0f10572b1 100644 --- a/cmd/ztest.c +++ b/cmd/ztest.c @@ -273,7 +273,6 @@ extern int zfs_compressed_arc_enabled; extern int zfs_abd_scatter_enabled; extern uint_t dmu_object_alloc_chunk_shift; extern boolean_t zfs_force_some_double_word_sm_entries; -extern unsigned long zio_decompress_fail_fraction; extern unsigned long zfs_reconstruct_indirect_damage_fraction; extern uint64_t raidz_expand_max_reflow_bytes; extern uint_t raidz_expand_pause_point; diff --git a/module/zfs/zio_compress.c b/module/zfs/zio_compress.c index 9f0ac1b63..89ceeb58a 100644 --- a/module/zfs/zio_compress.c +++ b/module/zfs/zio_compress.c @@ -37,12 +37,6 @@ #include #include -/* - * If nonzero, every 1/X decompression attempts will fail, simulating - * an undetected memory error. - */ -static unsigned long zio_decompress_fail_fraction = 0; - /* * Compression vectors. */ @@ -171,15 +165,6 @@ zio_decompress_data(enum zio_compress c, abd_t *src, abd_t *dst, else err = ci->ci_decompress(src, dst, s_len, d_len, ci->ci_level); - /* - * Decompression shouldn't fail, because we've already verified - * the checksum. However, for extra protection (e.g. against bitflips - * in non-ECC RAM), we handle this error (and test it). - */ - if (zio_decompress_fail_fraction != 0 && - random_in_range(zio_decompress_fail_fraction) == 0) - err = SET_ERROR(EINVAL); - return (err); }