aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r--fs/xfs/xfs_log.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 21ac1a67e3e0..c48bf61f17bd 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -617,7 +617,8 @@ xfs_log_unmount_write(xfs_mount_t *mp)
617 reg[0].i_len = sizeof(magic); 617 reg[0].i_len = sizeof(magic);
618 XLOG_VEC_SET_TYPE(&reg[0], XLOG_REG_TYPE_UNMOUNT); 618 XLOG_VEC_SET_TYPE(&reg[0], XLOG_REG_TYPE_UNMOUNT);
619 619
620 error = xfs_log_reserve(mp, 600, 1, &tic, XFS_LOG, 0, 0); 620 error = xfs_log_reserve(mp, 600, 1, &tic,
621 XFS_LOG, 0, XLOG_UNMOUNT_REC_TYPE);
621 if (!error) { 622 if (!error) {
622 /* remove inited flag */ 623 /* remove inited flag */
623 ((xlog_ticket_t *)tic)->t_flags = 0; 624 ((xlog_ticket_t *)tic)->t_flags = 0;
@@ -655,8 +656,11 @@ xfs_log_unmount_write(xfs_mount_t *mp)
655 } else { 656 } else {
656 LOG_UNLOCK(log, s); 657 LOG_UNLOCK(log, s);
657 } 658 }
658 if (tic) 659 if (tic) {
660 xlog_trace_loggrant(log, tic, "unmount rec");
661 xlog_ungrant_log_space(log, tic);
659 xlog_state_put_ticket(log, tic); 662 xlog_state_put_ticket(log, tic);
663 }
660 } else { 664 } else {
661 /* 665 /*
662 * We're already in forced_shutdown mode, couldn't 666 * We're already in forced_shutdown mode, couldn't
@@ -1196,7 +1200,7 @@ xlog_alloc_log(xfs_mount_t *mp,
1196 kmem_zalloc(sizeof(xlog_in_core_t), KM_SLEEP); 1200 kmem_zalloc(sizeof(xlog_in_core_t), KM_SLEEP);
1197 iclog = *iclogp; 1201 iclog = *iclogp;
1198 iclog->hic_data = (xlog_in_core_2_t *) 1202 iclog->hic_data = (xlog_in_core_2_t *)
1199 kmem_zalloc(iclogsize, KM_SLEEP); 1203 kmem_zalloc(iclogsize, KM_SLEEP | KM_LARGE);
1200 1204
1201 iclog->ic_prev = prev_iclog; 1205 iclog->ic_prev = prev_iclog;
1202 prev_iclog = iclog; 1206 prev_iclog = iclog;
@@ -2212,9 +2216,13 @@ xlog_state_do_callback(
2212 2216
2213 iclog = iclog->ic_next; 2217 iclog = iclog->ic_next;
2214 } while (first_iclog != iclog); 2218 } while (first_iclog != iclog);
2215 if (repeats && (repeats % 10) == 0) { 2219
2220 if (repeats > 5000) {
2221 flushcnt += repeats;
2222 repeats = 0;
2216 xfs_fs_cmn_err(CE_WARN, log->l_mp, 2223 xfs_fs_cmn_err(CE_WARN, log->l_mp,
2217 "xlog_state_do_callback: looping %d", repeats); 2224 "%s: possible infinite loop (%d iterations)",
2225 __FUNCTION__, flushcnt);
2218 } 2226 }
2219 } while (!ioerrors && loopdidcallbacks); 2227 } while (!ioerrors && loopdidcallbacks);
2220 2228
@@ -2246,6 +2254,7 @@ xlog_state_do_callback(
2246 } 2254 }
2247#endif 2255#endif
2248 2256
2257 flushcnt = 0;
2249 if (log->l_iclog->ic_state & (XLOG_STATE_ACTIVE|XLOG_STATE_IOERROR)) { 2258 if (log->l_iclog->ic_state & (XLOG_STATE_ACTIVE|XLOG_STATE_IOERROR)) {
2250 flushcnt = log->l_flushcnt; 2259 flushcnt = log->l_flushcnt;
2251 log->l_flushcnt = 0; 2260 log->l_flushcnt = 0;