aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2010-05-06 21:05:31 -0400
committerAlex Elder <aelder@sgi.com>2010-05-24 11:33:46 -0400
commit169a7b078eaa765e6bd09865c985298ee9084a89 (patch)
treeee787e600c6c80b6c08ab4d551b8c494daa22e81 /fs/xfs/xfs_log.c
parentc11554104f4dcb509fd43973389b097a04b9d51d (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/xfs_log.c')
-rw-r--r--fs/xfs/xfs_log.c19
1 files changed, 5 insertions, 14 deletions
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;