aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zap_leaf.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2015-02-27 12:53:35 -0800
committerBrian Behlendorf <[email protected]>2015-03-03 13:22:21 -0800
commit989fd514b1053d5443b4e6155af9c8d863f5f0f2 (patch)
treebf21efdd55cfa3ce96ec62ac21aad31e2faedfb6 /module/zfs/zap_leaf.c
parent8c45def24a5c640a3b44ce38cc3482b9c89a3b1d (diff)
Change ASSERT(!"...") to cmn_err(CE_PANIC, ...)
There are a handful of ASSERT(!"...")'s throughout the code base for cases which should be impossible. This patch converts them to use cmn_err(CE_PANIC, ...) to ensure they are always enabled and so that additional debugging is logged if they were to occur. Signed-off-by: Brian Behlendorf <[email protected]> Issue #1445
Diffstat (limited to 'module/zfs/zap_leaf.c')
-rw-r--r--module/zfs/zap_leaf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/module/zfs/zap_leaf.c b/module/zfs/zap_leaf.c
index 78f05d7a7..957804825 100644
--- a/module/zfs/zap_leaf.c
+++ b/module/zfs/zap_leaf.c
@@ -79,8 +79,9 @@ stv(int len, void *addr, uint64_t value)
case 8:
*(uint64_t *)addr = value;
return;
+ default:
+ cmn_err(CE_PANIC, "bad int len %d", len);
}
- ASSERT(!"bad int len");
}
static uint64_t
@@ -95,8 +96,9 @@ ldv(int len, const void *addr)
return (*(uint32_t *)addr);
case 8:
return (*(uint64_t *)addr);
+ default:
+ cmn_err(CE_PANIC, "bad int len %d", len);
}
- ASSERT(!"bad int len");
return (0xFEEDFACEDEADBEEFULL);
}
@@ -147,7 +149,8 @@ zap_leaf_byteswap(zap_leaf_phys_t *buf, int size)
/* la_array doesn't need swapping */
break;
default:
- ASSERT(!"bad leaf type");
+ cmn_err(CE_PANIC, "bad leaf type %d",
+ lc->l_free.lf_type);
}
}
}