[XFS] remove XFS_LOG_RES_DEBUG and turn on the res history all the time to get more useful error info on space for trans items

SGI-PV: 947110
SGI-Modid: xfs-linux-melb:xfs-kern:24886a

Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>

authored by Tim Shimmin and committed by Nathan Scott 1259845d 71df099d

+6 -28
+2 -6
fs/xfs/xfs_log.c
··· 1591 1591 * print out info relating to regions written which consume 1592 1592 * the reservation 1593 1593 */ 1594 - #if defined(XFS_LOG_RES_DEBUG) 1595 1594 STATIC void 1596 1595 xlog_print_tic_res(xfs_mount_t *mp, xlog_ticket_t *ticket) 1597 1596 { ··· 1680 1681 ticket->t_res_arr_sum, ticket->t_res_o_flow, 1681 1682 ticket->t_res_num_ophdrs, ophdr_spc, 1682 1683 ticket->t_res_arr_sum + 1683 - ticket->t_res_o_flow + ophdr_spc, 1684 + ticket->t_res_o_flow + ophdr_spc, 1684 1685 ticket->t_res_num); 1685 1686 1686 1687 for (i = 0; i < ticket->t_res_num; i++) { 1687 - uint r_type = ticket->t_res_arr[i].r_type; 1688 + uint r_type = ticket->t_res_arr[i].r_type; 1688 1689 cmn_err(CE_WARN, 1689 1690 "region[%u]: %s - %u bytes\n", 1690 1691 i, ··· 1693 1694 ticket->t_res_arr[i].r_len); 1694 1695 } 1695 1696 } 1696 - #else 1697 - #define xlog_print_tic_res(mp, ticket) 1698 - #endif 1699 1697 1700 1698 /* 1701 1699 * Write some region out to in-core log
+1 -10
fs/xfs/xfs_log.h
··· 96 96 97 97 98 98 /* Region types for iovec's i_type */ 99 - #if defined(XFS_LOG_RES_DEBUG) 100 99 #define XLOG_REG_TYPE_BFORMAT 1 101 100 #define XLOG_REG_TYPE_BCHUNK 2 102 101 #define XLOG_REG_TYPE_EFI_FORMAT 3 ··· 116 117 #define XLOG_REG_TYPE_COMMIT 18 117 118 #define XLOG_REG_TYPE_TRANSHDR 19 118 119 #define XLOG_REG_TYPE_MAX 19 119 - #endif 120 120 121 - #if defined(XFS_LOG_RES_DEBUG) 122 121 #define XLOG_VEC_SET_TYPE(vecp, t) ((vecp)->i_type = (t)) 123 - #else 124 - #define XLOG_VEC_SET_TYPE(vecp, t) 125 - #endif 126 - 127 122 128 123 typedef struct xfs_log_iovec { 129 124 xfs_caddr_t i_addr; /* beginning address of region */ 130 125 int i_len; /* length in bytes of region */ 131 - #if defined(XFS_LOG_RES_DEBUG) 132 - uint i_type; /* type of region */ 133 - #endif 126 + uint i_type; /* type of region */ 134 127 } xfs_log_iovec_t; 135 128 136 129 typedef void* xfs_log_ticket_t;
+3 -12
fs/xfs/xfs_log_priv.h
··· 253 253 254 254 255 255 /* Ticket reservation region accounting */ 256 - #if defined(XFS_LOG_RES_DEBUG) 257 256 #define XLOG_TIC_LEN_MAX 15 258 257 #define XLOG_TIC_RESET_RES(t) ((t)->t_res_num = \ 259 258 (t)->t_res_arr_sum = (t)->t_res_num_ophdrs = 0) ··· 277 278 * we don't care about. 278 279 */ 279 280 typedef struct xlog_res { 280 - uint r_len; 281 - uint r_type; 281 + uint r_len; /* region length :4 */ 282 + uint r_type; /* region's transaction type :4 */ 282 283 } xlog_res_t; 283 - #else 284 - #define XLOG_TIC_RESET_RES(t) 285 - #define XLOG_TIC_ADD_OPHDR(t) 286 - #define XLOG_TIC_ADD_REGION(t, len, type) 287 - #endif 288 - 289 284 290 285 typedef struct xlog_ticket { 291 286 sv_t t_sema; /* sleep on this semaphore : 20 */ ··· 294 301 char t_flags; /* properties of reservation : 1 */ 295 302 uint t_trans_type; /* transaction type : 4 */ 296 303 297 - #if defined (XFS_LOG_RES_DEBUG) 298 304 /* reservation array fields */ 299 305 uint t_res_num; /* num in array : 4 */ 300 - xlog_res_t t_res_arr[XLOG_TIC_LEN_MAX]; /* array of res : X */ 301 306 uint t_res_num_ophdrs; /* num op hdrs : 4 */ 302 307 uint t_res_arr_sum; /* array sum : 4 */ 303 308 uint t_res_o_flow; /* sum overflow : 4 */ 304 - #endif 309 + xlog_res_t t_res_arr[XLOG_TIC_LEN_MAX]; /* array of res : 8 * 15 */ 305 310 } xlog_ticket_t; 306 311 307 312 #endif