]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Illumos 5348 - zio_checksum_error() only fills in info if ECKSUM
authorMatthew Ahrens <mahrens@delphix.com>
Sun, 23 Nov 2014 03:24:52 +0000 (19:24 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 5 May 2015 18:05:37 +0000 (11:05 -0700)
5348 zio_checksum_error() only fills in info if ECKSUM
Reviewed by: Alex Reece <alex.reece@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Approved by: Dan McDonald <danmcd@omniti.com>

References:
  https://www.illumos.org/issues/5348
  https://github.com/illumos/illumos-gate/commit/373dc1cf

Ported-by: DHE <git@dehacked.net>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3372

module/zfs/zio.c

index 0323413787df7c731036b3179219a85c8e5179e4..c89a2f99e654b7f36f0b18cf6e7798213e98a04b 100644 (file)
@@ -2879,7 +2879,8 @@ zio_checksum_verify(zio_t *zio)
 
        if ((error = zio_checksum_error(zio, &info)) != 0) {
                zio->io_error = error;
-               if (!(zio->io_flags & ZIO_FLAG_SPECULATIVE)) {
+               if (error == ECKSUM &&
+                   !(zio->io_flags & ZIO_FLAG_SPECULATIVE)) {
                        zfs_ereport_start_checksum(zio->io_spa,
                            zio->io_vd, zio, zio->io_offset,
                            zio->io_size, NULL, &info);