Removed unused zio_decompress_fail_fraction variable

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Alek Pinchuk <alek.pinchuk@connectwise.com>
Closes #17599
This commit is contained in:
Alek P 2025-08-06 20:10:03 -04:00 committed by GitHub
parent 25930cb8a1
commit 3e004369f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 16 deletions

View File

@ -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;

View File

@ -37,12 +37,6 @@
#include <sys/zio_compress.h>
#include <sys/zstd/zstd.h>
/*
* 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);
}