diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_log.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 21ac1a67e3e0..2a46919110f2 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -2212,9 +2212,13 @@ xlog_state_do_callback( | |||
2212 | 2212 | ||
2213 | iclog = iclog->ic_next; | 2213 | iclog = iclog->ic_next; |
2214 | } while (first_iclog != iclog); | 2214 | } while (first_iclog != iclog); |
2215 | if (repeats && (repeats % 10) == 0) { | 2215 | |
2216 | if (repeats > 5000) { | ||
2217 | flushcnt += repeats; | ||
2218 | repeats = 0; | ||
2216 | xfs_fs_cmn_err(CE_WARN, log->l_mp, | 2219 | xfs_fs_cmn_err(CE_WARN, log->l_mp, |
2217 | "xlog_state_do_callback: looping %d", repeats); | 2220 | "%s: possible infinite loop (%d iterations)", |
2221 | __FUNCTION__, flushcnt); | ||
2218 | } | 2222 | } |
2219 | } while (!ioerrors && loopdidcallbacks); | 2223 | } while (!ioerrors && loopdidcallbacks); |
2220 | 2224 | ||
@@ -2246,6 +2250,7 @@ xlog_state_do_callback( | |||
2246 | } | 2250 | } |
2247 | #endif | 2251 | #endif |
2248 | 2252 | ||
2253 | flushcnt = 0; | ||
2249 | if (log->l_iclog->ic_state & (XLOG_STATE_ACTIVE|XLOG_STATE_IOERROR)) { | 2254 | if (log->l_iclog->ic_state & (XLOG_STATE_ACTIVE|XLOG_STATE_IOERROR)) { |
2250 | flushcnt = log->l_flushcnt; | 2255 | flushcnt = log->l_flushcnt; |
2251 | log->l_flushcnt = 0; | 2256 | log->l_flushcnt = 0; |