Commit 169a7b078eaa765e6bd09865c985298ee9084a89
Committed by
Alex Elder
1 parent
c11554104f
Exists in
master
and in
7 other branches
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>
Showing 2 changed files with 6 additions and 15 deletions Side-by-side Diff
fs/xfs/xfs_error.c
fs/xfs/xfs_log.c
... | ... | @@ -1645,6 +1645,10 @@ |
1645 | 1645 | "bad-rtype" : res_type_str[r_type-1]), |
1646 | 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 | /* |
1651 | 1655 | |
... | ... | @@ -1897,21 +1901,8 @@ |
1897 | 1901 | *start_lsn = 0; |
1898 | 1902 | |
1899 | 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 | 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 | 1906 | ticket->t_curr_res -= len; |
1916 | 1907 | |
1917 | 1908 | index = 0; |