mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user