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