summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorGeorge Melikov <[email protected]>2017-01-31 04:12:58 +0300
committerBrian Behlendorf <[email protected]>2017-01-30 17:12:58 -0800
commit41425f79dabc58e5ddb16cc701cc435a5480e56a (patch)
tree435d695f41afe0e9d777f1843c892ed1c6df6ecd /module/zfs
parente2da829cc1a92b9f0ebd1eeefc6fadc1ec9f325a (diff)
OpenZFS 7490 - real checksum errors are silenced when zinject is on
Authored by: Pavel Zakharov <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Paul Dagnelie <[email protected]> Reviewed by: Dan Kimmel <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Approved by: Robert Mustacchi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7490 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/6cedfc3 Closes #5693
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/zio_checksum.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/module/zfs/zio_checksum.c b/module/zfs/zio_checksum.c
index 53658daca..e65b3f061 100644
--- a/module/zfs/zio_checksum.c
+++ b/module/zfs/zio_checksum.c
@@ -20,8 +20,8 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2013 Saso Kiselkov. All rights reserved.
* Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+ * Copyright 2013 Saso Kiselkov. All rights reserved.
*/
#include <sys/zfs_context.h>
@@ -441,12 +441,13 @@ zio_checksum_error(zio_t *zio, zio_bad_cksum_t *info)
error = zio_checksum_error_impl(spa, bp, checksum, data, size,
offset, info);
- if (error != 0 && zio_injection_enabled && !zio->io_error &&
- (error = zio_handle_fault_injection(zio, ECKSUM)) != 0) {
- info->zbc_injected = 1;
- return (error);
+ if (zio_injection_enabled && error == 0 && zio->io_error == 0) {
+ error = zio_handle_fault_injection(zio, ECKSUM);
+ if (error != 0)
+ info->zbc_injected = 1;
}
+
return (error);
}