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.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 3d9a36e77363..9176995160ed 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -403,7 +403,7 @@ xfs_log_release_iclog(xfs_mount_t *mp,
403 403
404 if (xlog_state_release_iclog(log, iclog)) { 404 if (xlog_state_release_iclog(log, iclog)) {
405 xfs_force_shutdown(mp, XFS_LOG_IO_ERROR); 405 xfs_force_shutdown(mp, XFS_LOG_IO_ERROR);
406 return(EIO); 406 return EIO;
407 } 407 }
408 408
409 return 0; 409 return 0;
@@ -556,7 +556,7 @@ xfs_log_unmount(xfs_mount_t *mp)
556 556
557 error = xfs_log_unmount_write(mp); 557 error = xfs_log_unmount_write(mp);
558 xfs_log_unmount_dealloc(mp); 558 xfs_log_unmount_dealloc(mp);
559 return (error); 559 return error;
560} 560}
561 561
562/* 562/*
@@ -728,7 +728,7 @@ xfs_log_write(xfs_mount_t * mp,
728 if ((error = xlog_write(mp, reg, nentries, tic, start_lsn, NULL, 0))) { 728 if ((error = xlog_write(mp, reg, nentries, tic, start_lsn, NULL, 0))) {
729 xfs_force_shutdown(mp, XFS_LOG_IO_ERROR); 729 xfs_force_shutdown(mp, XFS_LOG_IO_ERROR);
730 } 730 }
731 return (error); 731 return error;
732} /* xfs_log_write */ 732} /* xfs_log_write */
733 733
734 734
@@ -836,7 +836,7 @@ xfs_log_need_covered(xfs_mount_t *mp)
836 needed = 1; 836 needed = 1;
837 } 837 }
838 LOG_UNLOCK(log, s); 838 LOG_UNLOCK(log, s);
839 return(needed); 839 return needed;
840} 840}
841 841
842/****************************************************************************** 842/******************************************************************************
@@ -1003,7 +1003,7 @@ xlog_bdstrat_cb(struct xfs_buf *bp)
1003 XFS_BUF_ERROR(bp, EIO); 1003 XFS_BUF_ERROR(bp, EIO);
1004 XFS_BUF_STALE(bp); 1004 XFS_BUF_STALE(bp);
1005 xfs_biodone(bp); 1005 xfs_biodone(bp);
1006 return (XFS_ERROR(EIO)); 1006 return XFS_ERROR(EIO);
1007 1007
1008 1008
1009} 1009}
@@ -1263,7 +1263,7 @@ xlog_commit_record(xfs_mount_t *mp,
1263 iclog, XLOG_COMMIT_TRANS))) { 1263 iclog, XLOG_COMMIT_TRANS))) {
1264 xfs_force_shutdown(mp, XFS_LOG_IO_ERROR); 1264 xfs_force_shutdown(mp, XFS_LOG_IO_ERROR);
1265 } 1265 }
1266 return (error); 1266 return error;
1267} /* xlog_commit_record */ 1267} /* xlog_commit_record */
1268 1268
1269 1269
@@ -1460,7 +1460,7 @@ xlog_sync(xlog_t *log,
1460 if ((error = XFS_bwrite(bp))) { 1460 if ((error = XFS_bwrite(bp))) {
1461 xfs_ioerror_alert("xlog_sync", log->l_mp, bp, 1461 xfs_ioerror_alert("xlog_sync", log->l_mp, bp,
1462 XFS_BUF_ADDR(bp)); 1462 XFS_BUF_ADDR(bp));
1463 return (error); 1463 return error;
1464 } 1464 }
1465 if (split) { 1465 if (split) {
1466 bp = iclog->ic_log->l_xbuf; 1466 bp = iclog->ic_log->l_xbuf;
@@ -1498,10 +1498,10 @@ xlog_sync(xlog_t *log,
1498 if ((error = XFS_bwrite(bp))) { 1498 if ((error = XFS_bwrite(bp))) {
1499 xfs_ioerror_alert("xlog_sync (split)", log->l_mp, 1499 xfs_ioerror_alert("xlog_sync (split)", log->l_mp,
1500 bp, XFS_BUF_ADDR(bp)); 1500 bp, XFS_BUF_ADDR(bp));
1501 return (error); 1501 return error;
1502 } 1502 }
1503 } 1503 }
1504 return (0); 1504 return 0;
1505} /* xlog_sync */ 1505} /* xlog_sync */
1506 1506
1507 1507
@@ -1798,7 +1798,7 @@ xlog_write(xfs_mount_t * mp,
1798 for (index = 0; index < nentries; ) { 1798 for (index = 0; index < nentries; ) {
1799 if ((error = xlog_state_get_iclog_space(log, len, &iclog, ticket, 1799 if ((error = xlog_state_get_iclog_space(log, len, &iclog, ticket,
1800 &contwr, &log_offset))) 1800 &contwr, &log_offset)))
1801 return (error); 1801 return error;
1802 1802
1803 ASSERT(log_offset <= iclog->ic_size - 1); 1803 ASSERT(log_offset <= iclog->ic_size - 1);
1804 ptr = (__psint_t) ((char *)iclog->ic_datap+log_offset); 1804 ptr = (__psint_t) ((char *)iclog->ic_datap+log_offset);
@@ -1903,7 +1903,7 @@ xlog_write(xfs_mount_t * mp,
1903 xlog_state_finish_copy(log, iclog, record_cnt, data_cnt); 1903 xlog_state_finish_copy(log, iclog, record_cnt, data_cnt);
1904 record_cnt = data_cnt = 0; 1904 record_cnt = data_cnt = 0;
1905 if ((error = xlog_state_release_iclog(log, iclog))) 1905 if ((error = xlog_state_release_iclog(log, iclog)))
1906 return (error); 1906 return error;
1907 break; /* don't increment index */ 1907 break; /* don't increment index */
1908 } else { /* copied entire region */ 1908 } else { /* copied entire region */
1909 index++; 1909 index++;
@@ -1917,7 +1917,7 @@ xlog_write(xfs_mount_t * mp,
1917 ASSERT(flags & XLOG_COMMIT_TRANS); 1917 ASSERT(flags & XLOG_COMMIT_TRANS);
1918 *commit_iclog = iclog; 1918 *commit_iclog = iclog;
1919 } else if ((error = xlog_state_release_iclog(log, iclog))) 1919 } else if ((error = xlog_state_release_iclog(log, iclog)))
1920 return (error); 1920 return error;
1921 if (index == nentries) 1921 if (index == nentries)
1922 return 0; /* we are done */ 1922 return 0; /* we are done */
1923 else 1923 else
@@ -1934,7 +1934,7 @@ xlog_write(xfs_mount_t * mp,
1934 *commit_iclog = iclog; 1934 *commit_iclog = iclog;
1935 return 0; 1935 return 0;
1936 } 1936 }
1937 return (xlog_state_release_iclog(log, iclog)); 1937 return xlog_state_release_iclog(log, iclog);
1938} /* xlog_write */ 1938} /* xlog_write */
1939 1939
1940 1940
@@ -2050,7 +2050,7 @@ xlog_get_lowest_lsn(
2050 } 2050 }
2051 lsn_log = lsn_log->ic_next; 2051 lsn_log = lsn_log->ic_next;
2052 } while (lsn_log != log->l_iclog); 2052 } while (lsn_log != log->l_iclog);
2053 return(lowest_lsn); 2053 return lowest_lsn;
2054} 2054}
2055 2055
2056 2056
@@ -2402,7 +2402,7 @@ restart:
2402 if (iclog->ic_refcnt == 1) { 2402 if (iclog->ic_refcnt == 1) {
2403 LOG_UNLOCK(log, s); 2403 LOG_UNLOCK(log, s);
2404 if ((error = xlog_state_release_iclog(log, iclog))) 2404 if ((error = xlog_state_release_iclog(log, iclog)))
2405 return (error); 2405 return error;
2406 } else { 2406 } else {
2407 iclog->ic_refcnt--; 2407 iclog->ic_refcnt--;
2408 LOG_UNLOCK(log, s); 2408 LOG_UNLOCK(log, s);
@@ -2569,7 +2569,7 @@ xlog_regrant_write_log_space(xlog_t *log,
2569 XLOG_TIC_RESET_RES(tic); 2569 XLOG_TIC_RESET_RES(tic);
2570 2570
2571 if (tic->t_cnt > 0) 2571 if (tic->t_cnt > 0)
2572 return (0); 2572 return 0;
2573 2573
2574#ifdef DEBUG 2574#ifdef DEBUG
2575 if (log->l_flags & XLOG_ACTIVE_RECOVERY) 2575 if (log->l_flags & XLOG_ACTIVE_RECOVERY)
@@ -2667,7 +2667,7 @@ redo:
2667 xlog_trace_loggrant(log, tic, "xlog_regrant_write_log_space: exit"); 2667 xlog_trace_loggrant(log, tic, "xlog_regrant_write_log_space: exit");
2668 xlog_verify_grant_head(log, 1); 2668 xlog_verify_grant_head(log, 1);
2669 GRANT_UNLOCK(log, s); 2669 GRANT_UNLOCK(log, s);
2670 return (0); 2670 return 0;
2671 2671
2672 2672
2673 error_return: 2673 error_return:
@@ -2837,7 +2837,7 @@ xlog_state_release_iclog(xlog_t *log,
2837 if (sync) { 2837 if (sync) {
2838 return xlog_sync(log, iclog); 2838 return xlog_sync(log, iclog);
2839 } 2839 }
2840 return (0); 2840 return 0;
2841 2841
2842} /* xlog_state_release_iclog */ 2842} /* xlog_state_release_iclog */
2843 2843
@@ -3127,7 +3127,7 @@ try_again:
3127 } while (iclog != log->l_iclog); 3127 } while (iclog != log->l_iclog);
3128 3128
3129 LOG_UNLOCK(log, s); 3129 LOG_UNLOCK(log, s);
3130 return (0); 3130 return 0;
3131} /* xlog_state_sync */ 3131} /* xlog_state_sync */
3132 3132
3133 3133
@@ -3545,12 +3545,12 @@ xlog_state_ioerror(
3545 ic->ic_state = XLOG_STATE_IOERROR; 3545 ic->ic_state = XLOG_STATE_IOERROR;
3546 ic = ic->ic_next; 3546 ic = ic->ic_next;
3547 } while (ic != iclog); 3547 } while (ic != iclog);
3548 return (0); 3548 return 0;
3549 } 3549 }
3550 /* 3550 /*
3551 * Return non-zero, if state transition has already happened. 3551 * Return non-zero, if state transition has already happened.
3552 */ 3552 */
3553 return (1); 3553 return 1;
3554} 3554}
3555 3555
3556/* 3556/*
@@ -3587,7 +3587,7 @@ xfs_log_force_umount(
3587 log->l_flags & XLOG_ACTIVE_RECOVERY) { 3587 log->l_flags & XLOG_ACTIVE_RECOVERY) {
3588 mp->m_flags |= XFS_MOUNT_FS_SHUTDOWN; 3588 mp->m_flags |= XFS_MOUNT_FS_SHUTDOWN;
3589 XFS_BUF_DONE(mp->m_sb_bp); 3589 XFS_BUF_DONE(mp->m_sb_bp);
3590 return (0); 3590 return 0;
3591 } 3591 }
3592 3592
3593 /* 3593 /*
@@ -3596,7 +3596,7 @@ xfs_log_force_umount(
3596 */ 3596 */
3597 if (logerror && log->l_iclog->ic_state & XLOG_STATE_IOERROR) { 3597 if (logerror && log->l_iclog->ic_state & XLOG_STATE_IOERROR) {
3598 ASSERT(XLOG_FORCED_SHUTDOWN(log)); 3598 ASSERT(XLOG_FORCED_SHUTDOWN(log));
3599 return (1); 3599 return 1;
3600 } 3600 }
3601 retval = 0; 3601 retval = 0;
3602 /* 3602 /*
@@ -3678,7 +3678,7 @@ xfs_log_force_umount(
3678 } 3678 }
3679#endif 3679#endif
3680 /* return non-zero if log IOERROR transition had already happened */ 3680 /* return non-zero if log IOERROR transition had already happened */
3681 return (retval); 3681 return retval;
3682} 3682}
3683 3683
3684STATIC int 3684STATIC int
@@ -3692,8 +3692,8 @@ xlog_iclogs_empty(xlog_t *log)
3692 * any language. 3692 * any language.
3693 */ 3693 */
3694 if (iclog->ic_header.h_num_logops) 3694 if (iclog->ic_header.h_num_logops)
3695 return(0); 3695 return 0;
3696 iclog = iclog->ic_next; 3696 iclog = iclog->ic_next;
3697 } while (iclog != log->l_iclog); 3697 } while (iclog != log->l_iclog);
3698 return(1); 3698 return 1;
3699} 3699}