diff --git a/include/sys/spa.h b/include/sys/spa.h index 9cc958c7c730..a7e4d154fe0d 100644 --- a/include/sys/spa.h +++ b/include/sys/spa.h @@ -407,9 +407,9 @@ _NOTE(CONSTCOND) } while (0) typedef enum bp_embedded_type { BP_EMBEDDED_TYPE_DATA, - BP_EMBEDDED_TYPE_RESERVED, /* Reserved for an unintegrated feature. */ + BP_EMBEDDED_TYPE_RESERVED, /* Reserved for Delphix byteswap feature. */ BP_EMBEDDED_TYPE_REDACTED, - NUM_BP_EMBEDDED_TYPES = BP_EMBEDDED_TYPE_RESERVED + NUM_BP_EMBEDDED_TYPES } bp_embedded_type_t; #define BPE_NUM_WORDS 14 diff --git a/module/zfs/zio.c b/module/zfs/zio.c index b2f722eb2f53..6454ae5e3865 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -908,7 +908,7 @@ zfs_blkptr_verify(spa_t *spa, const blkptr_t *bp) } if (BP_IS_EMBEDDED(bp)) { - if (BPE_GET_ETYPE(bp) > NUM_BP_EMBEDDED_TYPES) { + if (BPE_GET_ETYPE(bp) >= NUM_BP_EMBEDDED_TYPES) { zfs_panic_recover("blkptr at %p has invalid ETYPE %llu", bp, (longlong_t)BPE_GET_ETYPE(bp)); }