aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trans.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2005-11-01 23:12:04 -0500
committerNathan Scott <nathans@sgi.com>2005-11-01 23:12:04 -0500
commitcfcbbbd089eadcaa86abb2c0f352e1ab23e16f72 (patch)
tree956db132cef0939564d2ce3acbbb8cf581f35be9 /fs/xfs/xfs_trans.c
parentc11e2c369d06576c9e4a900a975cbfab5e7e3c53 (diff)
[XFS] Remove old, broken nolog-mode code - noone plans to ever fix it.
SGI-PV: 944821 SGI-Modid: xfs-linux:xfs-kern:24213a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_trans.c')
-rw-r--r--fs/xfs/xfs_trans.c43
1 files changed, 6 insertions, 37 deletions
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index de3abf868ee3..279e043d7323 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -176,12 +176,8 @@ xfs_trans_dup(
176 XFS_LBC_INIT(&(ntp->t_busy)); 176 XFS_LBC_INIT(&(ntp->t_busy));
177 177
178 ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); 178 ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES);
179
180#if defined(XLOG_NOLOG) || defined(DEBUG)
181 ASSERT(!xlog_debug || tp->t_ticket != NULL);
182#else
183 ASSERT(tp->t_ticket != NULL); 179 ASSERT(tp->t_ticket != NULL);
184#endif 180
185 ntp->t_flags = XFS_TRANS_PERM_LOG_RES | (tp->t_flags & XFS_TRANS_RESERVE); 181 ntp->t_flags = XFS_TRANS_PERM_LOG_RES | (tp->t_flags & XFS_TRANS_RESERVE);
186 ntp->t_ticket = tp->t_ticket; 182 ntp->t_ticket = tp->t_ticket;
187 ntp->t_blk_res = tp->t_blk_res - tp->t_blk_res_used; 183 ntp->t_blk_res = tp->t_blk_res - tp->t_blk_res_used;
@@ -663,9 +659,6 @@ _xfs_trans_commit(
663 int sync; 659 int sync;
664#define XFS_TRANS_LOGVEC_COUNT 16 660#define XFS_TRANS_LOGVEC_COUNT 16
665 xfs_log_iovec_t log_vector_fast[XFS_TRANS_LOGVEC_COUNT]; 661 xfs_log_iovec_t log_vector_fast[XFS_TRANS_LOGVEC_COUNT];
666#if defined(XLOG_NOLOG) || defined(DEBUG)
667 static xfs_lsn_t trans_lsn = 1;
668#endif
669 void *commit_iclog; 662 void *commit_iclog;
670 int shutdown; 663 int shutdown;
671 664
@@ -716,11 +709,7 @@ shut_us_down:
716 *commit_lsn_p = commit_lsn; 709 *commit_lsn_p = commit_lsn;
717 return (shutdown); 710 return (shutdown);
718 } 711 }
719#if defined(XLOG_NOLOG) || defined(DEBUG)
720 ASSERT(!xlog_debug || tp->t_ticket != NULL);
721#else
722 ASSERT(tp->t_ticket != NULL); 712 ASSERT(tp->t_ticket != NULL);
723#endif
724 713
725 /* 714 /*
726 * If we need to update the superblock, then do it now. 715 * If we need to update the superblock, then do it now.
@@ -737,14 +726,10 @@ shut_us_down:
737 * by using a vector from the stack when it fits. 726 * by using a vector from the stack when it fits.
738 */ 727 */
739 nvec = xfs_trans_count_vecs(tp); 728 nvec = xfs_trans_count_vecs(tp);
740
741 if (nvec == 0) { 729 if (nvec == 0) {
742 xfs_force_shutdown(mp, XFS_LOG_IO_ERROR); 730 xfs_force_shutdown(mp, XFS_LOG_IO_ERROR);
743 goto shut_us_down; 731 goto shut_us_down;
744 } 732 } else if (nvec <= XFS_TRANS_LOGVEC_COUNT) {
745
746
747 if (nvec <= XFS_TRANS_LOGVEC_COUNT) {
748 log_vector = log_vector_fast; 733 log_vector = log_vector_fast;
749 } else { 734 } else {
750 log_vector = (xfs_log_iovec_t *)kmem_alloc(nvec * 735 log_vector = (xfs_log_iovec_t *)kmem_alloc(nvec *
@@ -758,30 +743,14 @@ shut_us_down:
758 */ 743 */
759 xfs_trans_fill_vecs(tp, log_vector); 744 xfs_trans_fill_vecs(tp, log_vector);
760 745
761 /* 746 error = xfs_log_write(mp, log_vector, nvec, tp->t_ticket, &(tp->t_lsn));
762 * Ignore errors here. xfs_log_done would do the right thing.
763 * We need to put the ticket, etc. away.
764 */
765 error = xfs_log_write(mp, log_vector, nvec, tp->t_ticket,
766 &(tp->t_lsn));
767 747
768#if defined(XLOG_NOLOG) || defined(DEBUG)
769 if (xlog_debug) {
770 commit_lsn = xfs_log_done(mp, tp->t_ticket,
771 &commit_iclog, log_flags);
772 } else {
773 commit_lsn = 0;
774 tp->t_lsn = trans_lsn++;
775 }
776#else
777 /* 748 /*
778 * This is the regular case. At this point (after the call finishes), 749 * The transaction is committed incore here, and can go out to disk
779 * the transaction is committed incore and could go out to disk at 750 * at any time after this call. However, all the items associated
780 * any time. However, all the items associated with the transaction 751 * with the transaction are still locked and pinned in memory.
781 * are still locked and pinned in memory.
782 */ 752 */
783 commit_lsn = xfs_log_done(mp, tp->t_ticket, &commit_iclog, log_flags); 753 commit_lsn = xfs_log_done(mp, tp->t_ticket, &commit_iclog, log_flags);
784#endif
785 754
786 tp->t_commit_lsn = commit_lsn; 755 tp->t_commit_lsn = commit_lsn;
787 if (nvec > XFS_TRANS_LOGVEC_COUNT) { 756 if (nvec > XFS_TRANS_LOGVEC_COUNT) {