aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 12:36:55 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 12:36:55 -0400
commitc0341b0f47722fbe5ab45f436fc6ddc1c58c0a6f (patch)
tree63279f95e7250a3c465eb061be97fff071d0903b /fs/xfs/xfs_log.c
parentae1390d8c3e2142e5cf6d192951d6e2b1fa213c5 (diff)
parent1b06e7926694178e146ff708b2c15a6da64c9765 (diff)
Merge git://oss.sgi.com:8090/xfs/xfs-2.6
* git://oss.sgi.com:8090/xfs/xfs-2.6: (49 commits) [XFS] Remove v1 dir trace macro - missed in a past commit. [XFS] 955947: Infinite loop in xfs_bulkstat() on formatter() error [XFS] pv 956241, author: nathans, rv: vapo - make ino validation checks [XFS] pv 956240, author: nathans, rv: vapo - Minor fixes in [XFS] Really fix use after free in xfs_iunpin. [XFS] Collapse sv_init and init_sv into just the one interface. [XFS] standardize on one sema init macro [XFS] Reduce endian flipping in alloc_btree, same as was done for [XFS] Minor cleanup from dio locking fix, remove an extra conditional. [XFS] Fix kmem_zalloc_greedy warnings on 64 bit platforms. [XFS] pv 955157, rv bnaujok - break the loop on EFAULT formatter() error [XFS] pv 955157, rv bnaujok - break the loop on formatter() error [XFS] Fixes the leak in reservation space because we weren't ungranting [XFS] Add lock annotations to xfs_trans_update_ail and [XFS] Fix a porting botch on the realtime subvol growfs code path. [XFS] Minor code rearranging and cleanup to prevent some coverity false [XFS] Remove a no-longer-correct debug assert from dio completion [XFS] Add a greedy allocation interface, allocating within a min/max size [XFS] Improve error handling for the zero-fsblock extent detection code. [XFS] Be more defensive with page flags (error/private) for metadata ...
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;