aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorloli10K <[email protected]>2019-06-25 03:02:17 +0200
committerBrian Behlendorf <[email protected]>2019-06-24 18:02:17 -0700
commit746d4a451eaff3d90fb63b853b3f91920d8ab69c (patch)
tree34aee26b0cf37167e12ff50b9eb31397dec4e588 /module
parent13d454c6ca12327f0080c14eaae78dc2f67d7d73 (diff)
Fix bp_embedded_type enum definition
With the addition of BP_EMBEDDED_TYPE_REDACTED in 30af21b0 a couple of codepaths make wrong assumptions and could potentially result in errors. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Chris Dunlop <[email protected]> Reviewed-by: Paul Dagnelie <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #8951
Diffstat (limited to 'module')
-rw-r--r--module/zfs/zio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zio.c b/module/zfs/zio.c
index b2f722eb2..6454ae5e3 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));
}