Commit 19d0e61a authored by Eric Sandeen's avatar Eric Sandeen Committed by Nathan Scott

[XFS] Make more xfs errors trappable with panic_mask

SGI Modid: xfs-linux:xfs-kern:164051a6
parent ec6df424
...@@ -218,13 +218,17 @@ xfs_errortag_clearall(xfs_mount_t *mp) ...@@ -218,13 +218,17 @@ xfs_errortag_clearall(xfs_mount_t *mp)
static void static void
xfs_fs_vcmn_err(int level, xfs_mount_t *mp, char *fmt, va_list ap) xfs_fs_vcmn_err(int level, xfs_mount_t *mp, char *fmt, va_list ap)
{ {
char *newfmt; if (mp != NULL) {
int len = 16 + mp->m_fsname_len + strlen(fmt); char *newfmt;
int len = 16 + mp->m_fsname_len + strlen(fmt);
newfmt = kmem_alloc(len, KM_SLEEP);
sprintf(newfmt, "Filesystem \"%s\": %s", mp->m_fsname, fmt); newfmt = kmem_alloc(len, KM_SLEEP);
icmn_err(level, newfmt, ap); sprintf(newfmt, "Filesystem \"%s\": %s", mp->m_fsname, fmt);
kmem_free(newfmt, len); icmn_err(level, newfmt, ap);
kmem_free(newfmt, len);
} else {
icmn_err(level, fmt, ap);
}
} }
void void
...@@ -267,16 +271,10 @@ xfs_error_report( ...@@ -267,16 +271,10 @@ xfs_error_report(
inst_t *ra) inst_t *ra)
{ {
if (level <= xfs_error_level) { if (level <= xfs_error_level) {
if (mp != NULL) { xfs_cmn_err(XFS_PTAG_ERROR_REPORT,
xfs_cmn_err(XFS_PTAG_ERROR_REPORT, CE_ALERT, mp,
CE_ALERT, mp,
"XFS internal error %s at line %d of file %s. Caller 0x%p\n", "XFS internal error %s at line %d of file %s. Caller 0x%p\n",
tag, linenum, fname, ra); tag, linenum, fname, ra);
} else {
cmn_err(CE_ALERT,
"XFS internal error %s at line %d of file %s. Caller 0x%p\n",
tag, linenum, fname, ra);
}
xfs_stack_trace(); xfs_stack_trace();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment