diff options
author | Dave Chinner <dchinner@redhat.com> | 2010-05-06 21:05:31 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-05-24 11:33:46 -0400 |
commit | 169a7b078eaa765e6bd09865c985298ee9084a89 (patch) | |
tree | ee787e600c6c80b6c08ab4d551b8c494daa22e81 /fs/xfs | |
parent | c11554104f4dcb509fd43973389b097a04b9d51d (diff) |
xfs: clean up log ticket overrun debug output
Push the error message output when a ticket overrun is detected
into the ticket printing functions. Also remove the debug version
of the code as the production version will still panic just as
effectively on a debug kernel via the panic mask being set.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_error.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_log.c | 19 |
2 files changed, 6 insertions, 15 deletions
diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c index ef96175c0744..047b8a8e5c29 100644 --- a/fs/xfs/xfs_error.c +++ b/fs/xfs/xfs_error.c | |||
@@ -170,7 +170,7 @@ xfs_cmn_err(int panic_tag, int level, xfs_mount_t *mp, char *fmt, ...) | |||
170 | va_list ap; | 170 | va_list ap; |
171 | 171 | ||
172 | #ifdef DEBUG | 172 | #ifdef DEBUG |
173 | xfs_panic_mask |= XFS_PTAG_SHUTDOWN_CORRUPT; | 173 | xfs_panic_mask |= (XFS_PTAG_SHUTDOWN_CORRUPT | XFS_PTAG_LOGRES); |
174 | #endif | 174 | #endif |
175 | 175 | ||
176 | if (xfs_panic_mask && (xfs_panic_mask & panic_tag) | 176 | if (xfs_panic_mask && (xfs_panic_mask & panic_tag) |
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 83be6a6aa0dc..1efb303d3aaf 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -1645,6 +1645,10 @@ xlog_print_tic_res(xfs_mount_t *mp, xlog_ticket_t *ticket) | |||
1645 | "bad-rtype" : res_type_str[r_type-1]), | 1645 | "bad-rtype" : res_type_str[r_type-1]), |
1646 | ticket->t_res_arr[i].r_len); | 1646 | ticket->t_res_arr[i].r_len); |
1647 | } | 1647 | } |
1648 | |||
1649 | xfs_cmn_err(XFS_PTAG_LOGRES, CE_ALERT, mp, | ||
1650 | "xfs_log_write: reservation ran out. Need to up reservation"); | ||
1651 | xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); | ||
1648 | } | 1652 | } |
1649 | 1653 | ||
1650 | /* | 1654 | /* |
@@ -1897,21 +1901,8 @@ xlog_write( | |||
1897 | *start_lsn = 0; | 1901 | *start_lsn = 0; |
1898 | 1902 | ||
1899 | len = xlog_write_calc_vec_length(ticket, log_vector); | 1903 | len = xlog_write_calc_vec_length(ticket, log_vector); |
1900 | if (ticket->t_curr_res < len) { | 1904 | if (ticket->t_curr_res < len) |
1901 | xlog_print_tic_res(log->l_mp, ticket); | 1905 | xlog_print_tic_res(log->l_mp, ticket); |
1902 | #ifdef DEBUG | ||
1903 | xlog_panic( | ||
1904 | "xfs_log_write: reservation ran out. Need to up reservation"); | ||
1905 | #else | ||
1906 | /* Customer configurable panic */ | ||
1907 | xfs_cmn_err(XFS_PTAG_LOGRES, CE_ALERT, log->l_mp, | ||
1908 | "xfs_log_write: reservation ran out. Need to up reservation"); | ||
1909 | |||
1910 | /* If we did not panic, shutdown the filesystem */ | ||
1911 | xfs_force_shutdown(log->l_mp, SHUTDOWN_CORRUPT_INCORE); | ||
1912 | #endif | ||
1913 | } | ||
1914 | |||
1915 | ticket->t_curr_res -= len; | 1906 | ticket->t_curr_res -= len; |
1916 | 1907 | ||
1917 | index = 0; | 1908 | index = 0; |