Skip to content

Commit

Permalink
[XFS] Ensure xlog_state_do_callback does not report spurious warnings on
Browse files Browse the repository at this point in the history
ramdisks.

SGI-PV: 954802
SGI-Modid: xfs-linux-melb:xfs-kern:26627a

Signed-off-by: Nathan Scott <nathans@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
  • Loading branch information
Nathan Scott authored and Tim Shimmin committed Sep 28, 2006
1 parent bb3c7d2 commit a3c6685
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fs/xfs/xfs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -2212,9 +2212,13 @@ xlog_state_do_callback(

iclog = iclog->ic_next;
} while (first_iclog != iclog);
if (repeats && (repeats % 10) == 0) {

if (repeats > 5000) {
flushcnt += repeats;
repeats = 0;
xfs_fs_cmn_err(CE_WARN, log->l_mp,
"xlog_state_do_callback: looping %d", repeats);
"%s: possible infinite loop (%d iterations)",
__FUNCTION__, flushcnt);
}
} while (!ioerrors && loopdidcallbacks);

Expand Down Expand Up @@ -2246,6 +2250,7 @@ xlog_state_do_callback(
}
#endif

flushcnt = 0;
if (log->l_iclog->ic_state & (XLOG_STATE_ACTIVE|XLOG_STATE_IOERROR)) {
flushcnt = log->l_flushcnt;
log->l_flushcnt = 0;
Expand Down

0 comments on commit a3c6685

Please sign in to comment.