From 5acbedbbe882319cd8877a5870835a68801ad784 Mon Sep 17 00:00:00 2001 From: Ned Bass Date: Fri, 2 Sep 2016 11:40:36 -0700 Subject: [PATCH] Add ZIO_CHECKSUM_IS_ZERO The ZIO_CHECKSUM_IS_ZERO macro was added in master commit: 37f8a88 Illumos 5746 - more checksumming in zfs send That whole patch is not suitable for the release branch but some other backported patches on that macro. Signed-off-by: Ned Bass --- include/sys/spa.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/sys/spa.h b/include/sys/spa.h index 5dc9084dad..bfd2e7902e 100644 --- a/include/sys/spa.h +++ b/include/sys/spa.h @@ -446,6 +446,10 @@ _NOTE(CONSTCOND) } while (0) ((zc1).zc_word[2] - (zc2).zc_word[2]) | \ ((zc1).zc_word[3] - (zc2).zc_word[3]))) +#define ZIO_CHECKSUM_IS_ZERO(zc) \ + (0 == ((zc)->zc_word[0] | (zc)->zc_word[1] | \ + (zc)->zc_word[2] | (zc)->zc_word[3])) + #define DVA_IS_VALID(dva) (DVA_GET_ASIZE(dva) != 0) #define ZIO_SET_CHECKSUM(zcp, w0, w1, w2, w3) \