Commit 1259845d3f3e1d1cf96b2a78f3aec824b9d1e109
Committed by
Nathan Scott
1 parent
71df099dc3
[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>
Showing 3 changed files with 6 additions and 28 deletions Side-by-side Diff
fs/xfs/xfs_log.c
... | ... | @@ -1591,7 +1591,6 @@ |
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 | { |
1598 | 1597 | |
... | ... | @@ -1681,11 +1680,11 @@ |
1681 | 1680 | ticket->t_res_arr_sum, ticket->t_res_o_flow, |
1682 | 1681 | ticket->t_res_num_ophdrs, ophdr_spc, |
1683 | 1682 | ticket->t_res_arr_sum + |
1684 | - ticket->t_res_o_flow + ophdr_spc, | |
1683 | + ticket->t_res_o_flow + ophdr_spc, | |
1685 | 1684 | ticket->t_res_num); |
1686 | 1685 | |
1687 | 1686 | for (i = 0; i < ticket->t_res_num; i++) { |
1688 | - uint r_type = ticket->t_res_arr[i].r_type; | |
1687 | + uint r_type = ticket->t_res_arr[i].r_type; | |
1689 | 1688 | cmn_err(CE_WARN, |
1690 | 1689 | "region[%u]: %s - %u bytes\n", |
1691 | 1690 | i, |
... | ... | @@ -1694,9 +1693,6 @@ |
1694 | 1693 | ticket->t_res_arr[i].r_len); |
1695 | 1694 | } |
1696 | 1695 | } |
1697 | -#else | |
1698 | -#define xlog_print_tic_res(mp, ticket) | |
1699 | -#endif | |
1700 | 1696 | |
1701 | 1697 | /* |
1702 | 1698 | * Write some region out to in-core log |
fs/xfs/xfs_log.h
... | ... | @@ -96,7 +96,6 @@ |
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 |
103 | 102 | |
104 | 103 | |
105 | 104 | |
106 | 105 | |
... | ... | @@ -117,21 +116,13 @@ |
117 | 116 | #define XLOG_REG_TYPE_COMMIT 18 |
118 | 117 | #define XLOG_REG_TYPE_TRANSHDR 19 |
119 | 118 | #define XLOG_REG_TYPE_MAX 19 |
120 | -#endif | |
121 | 119 | |
122 | -#if defined(XFS_LOG_RES_DEBUG) | |
123 | 120 | #define XLOG_VEC_SET_TYPE(vecp, t) ((vecp)->i_type = (t)) |
124 | -#else | |
125 | -#define XLOG_VEC_SET_TYPE(vecp, t) | |
126 | -#endif | |
127 | 121 | |
128 | - | |
129 | 122 | typedef struct xfs_log_iovec { |
130 | 123 | xfs_caddr_t i_addr; /* beginning address of region */ |
131 | 124 | int i_len; /* length in bytes of region */ |
132 | -#if defined(XFS_LOG_RES_DEBUG) | |
133 | - uint i_type; /* type of region */ | |
134 | -#endif | |
125 | + uint i_type; /* type of region */ | |
135 | 126 | } xfs_log_iovec_t; |
136 | 127 | |
137 | 128 | typedef void* xfs_log_ticket_t; |
fs/xfs/xfs_log_priv.h
... | ... | @@ -253,7 +253,6 @@ |
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) |
260 | 259 | |
261 | 260 | |
... | ... | @@ -278,16 +277,10 @@ |
278 | 277 | * we don't care about. |
279 | 278 | */ |
280 | 279 | typedef struct xlog_res { |
281 | - uint r_len; | |
282 | - uint r_type; | |
280 | + uint r_len; /* region length :4 */ | |
281 | + uint r_type; /* region's transaction type :4 */ | |
283 | 282 | } xlog_res_t; |
284 | -#else | |
285 | -#define XLOG_TIC_RESET_RES(t) | |
286 | -#define XLOG_TIC_ADD_OPHDR(t) | |
287 | -#define XLOG_TIC_ADD_REGION(t, len, type) | |
288 | -#endif | |
289 | 283 | |
290 | - | |
291 | 284 | typedef struct xlog_ticket { |
292 | 285 | sv_t t_sema; /* sleep on this semaphore : 20 */ |
293 | 286 | struct xlog_ticket *t_next; /* :4|8 */ |
294 | 287 | |
295 | 288 | |
... | ... | @@ -301,14 +294,12 @@ |
301 | 294 | char t_flags; /* properties of reservation : 1 */ |
302 | 295 | uint t_trans_type; /* transaction type : 4 */ |
303 | 296 | |
304 | -#if defined (XFS_LOG_RES_DEBUG) | |
305 | 297 | /* reservation array fields */ |
306 | 298 | uint t_res_num; /* num in array : 4 */ |
307 | - xlog_res_t t_res_arr[XLOG_TIC_LEN_MAX]; /* array of res : X */ | |
308 | 299 | uint t_res_num_ophdrs; /* num op hdrs : 4 */ |
309 | 300 | uint t_res_arr_sum; /* array sum : 4 */ |
310 | 301 | uint t_res_o_flow; /* sum overflow : 4 */ |
311 | -#endif | |
302 | + xlog_res_t t_res_arr[XLOG_TIC_LEN_MAX]; /* array of res : 8 * 15 */ | |
312 | 303 | } xlog_ticket_t; |
313 | 304 | |
314 | 305 | #endif |