From 7a3066ffddcf4f87470e33a1cd414e558b90249c Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Sat, 22 Nov 2014 19:24:52 -0800 Subject: [PATCH] Illumos 5348 - zio_checksum_error() only fills in info if ECKSUM 5348 zio_checksum_error() only fills in info if ECKSUM Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Steven Hartland Approved by: Dan McDonald References: https://www.illumos.org/issues/5348 https://github.com/illumos/illumos-gate/commit/373dc1cf Ported-by: DHE Signed-off-by: Brian Behlendorf Closes #3372 --- module/zfs/zio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/zfs/zio.c b/module/zfs/zio.c index 0323413787..c89a2f99e6 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -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);