Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ASSERT(!"...") to cmn_err(CE_PANIC, ...) #3138

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion module/zcommon/zfs_deleg.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ zfs_deleg_whokey(char *attr, zfs_deleg_who_type_t type,
ZFS_DELEG_FIELD_SEP_CHR);
break;
default:
ASSERT(!"bad zfs_deleg_who_type_t");
cmn_err(CE_PANIC, "bad zfs_deleg_who_type_t %d", type);
}
}

Expand Down
2 changes: 1 addition & 1 deletion module/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2944,7 +2944,7 @@ arc_access(arc_buf_hdr_t *buf, kmutex_t *hash_lock)
DTRACE_PROBE1(new_state__mfu, arc_buf_hdr_t *, buf);
arc_change_state(arc_mfu, buf, hash_lock);
} else {
ASSERT(!"invalid arc state");
cmn_err(CE_PANIC, "invalid arc state 0x%p", buf->b_state);
}
}

Expand Down
3 changes: 2 additions & 1 deletion module/zfs/dmu_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,8 @@ dmu_tx_dirty_buf(dmu_tx_t *tx, dmu_buf_impl_t *db)
match_object = TRUE;
break;
default:
ASSERT(!"bad txh_type");
cmn_err(CE_PANIC, "bad txh_type %d",
txh->txh_type);
}
}
if (match_object && match_offset) {
Expand Down
9 changes: 6 additions & 3 deletions module/zfs/zap_leaf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}

Expand Down Expand Up @@ -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);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion module/zfs/zap_micro.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ mzap_addent(zap_name_t *zn, uint64_t value)
start = 0;
goto again;
}
ASSERT(!"out of entries!");
cmn_err(CE_PANIC, "out of entries!");
}

int
Expand Down