• Home
  • Raw
  • Download

Lines Matching refs:tr

92 			       struct gfs2_trans *tr)  in gfs2_ail1_start_one()  argument
102 list_for_each_entry_safe_reverse(bd, s, &tr->tr_ail1_list, bd_ail_st_list) { in gfs2_ail1_start_one()
105 gfs2_assert(sdp, bd->bd_tr == tr); in gfs2_ail1_start_one()
110 &tr->tr_ail2_list); in gfs2_ail1_start_one()
128 list_move(&bd->bd_ail_st_list, &tr->tr_ail1_list); in gfs2_ail1_start_one()
147 struct gfs2_trans *tr; in dump_ail_list() local
151 list_for_each_entry_reverse(tr, &sdp->sd_ail1_list, tr_list) { in dump_ail_list()
152 list_for_each_entry_reverse(bd, &tr->tr_ail1_list, in dump_ail_list()
189 struct gfs2_trans *tr; in gfs2_ail1_flush() local
205 list_for_each_entry_reverse(tr, head, tr_list) { in gfs2_ail1_flush()
208 ret = gfs2_ail1_start_one(sdp, wbc, tr); in gfs2_ail1_flush()
252 static int gfs2_ail1_empty_one(struct gfs2_sbd *sdp, struct gfs2_trans *tr, in gfs2_ail1_empty_one() argument
259 list_for_each_entry_safe_reverse(bd, s, &tr->tr_ail1_list, in gfs2_ail1_empty_one()
262 gfs2_assert(sdp, bd->bd_tr == tr); in gfs2_ail1_empty_one()
292 list_move(&bd->bd_ail_st_list, &tr->tr_ail2_list); in gfs2_ail1_empty_one()
307 struct gfs2_trans *tr, *s; in gfs2_ail1_empty() local
312 list_for_each_entry_safe_reverse(tr, s, &sdp->sd_ail1_list, tr_list) { in gfs2_ail1_empty()
313 if (!gfs2_ail1_empty_one(sdp, tr, &max_revokes) && oldest_tr) in gfs2_ail1_empty()
314 list_move(&tr->tr_list, &sdp->sd_ail2_list); in gfs2_ail1_empty()
331 struct gfs2_trans *tr; in gfs2_ail1_wait() local
336 list_for_each_entry_reverse(tr, &sdp->sd_ail1_list, tr_list) { in gfs2_ail1_wait()
337 list_for_each_entry(bd, &tr->tr_ail1_list, bd_ail_st_list) { in gfs2_ail1_wait()
355 static void gfs2_ail_empty_tr(struct gfs2_sbd *sdp, struct gfs2_trans *tr, in gfs2_ail_empty_tr() argument
363 gfs2_assert(sdp, bd->bd_tr == tr); in gfs2_ail_empty_tr()
370 struct gfs2_trans *tr, *safe; in ail2_empty() local
377 list_for_each_entry_safe(tr, safe, &sdp->sd_ail2_list, tr_list) { in ail2_empty()
378 a = (old_tail <= tr->tr_first); in ail2_empty()
379 b = (tr->tr_first < new_tail); in ail2_empty()
384 gfs2_ail_empty_tr(sdp, tr, &tr->tr_ail2_list); in ail2_empty()
385 list_del(&tr->tr_list); in ail2_empty()
386 gfs2_assert_warn(sdp, list_empty(&tr->tr_ail1_list)); in ail2_empty()
387 gfs2_assert_warn(sdp, list_empty(&tr->tr_ail2_list)); in ail2_empty()
388 gfs2_trans_free(sdp, tr); in ail2_empty()
539 struct gfs2_trans *tr = sdp->sd_log_tr; in calc_reserved() local
541 if (tr) { in calc_reserved()
542 mbuf = tr->tr_num_buf_new - tr->tr_num_buf_rm; in calc_reserved()
543 dbuf = tr->tr_num_databuf_new - tr->tr_num_databuf_rm; in calc_reserved()
560 struct gfs2_trans *tr; in current_tail() local
568 tr = list_last_entry(&sdp->sd_ail1_list, struct gfs2_trans, in current_tail()
570 tail = tr->tr_first; in current_tail()
868 struct gfs2_trans *tr; in ail_drain() local
879 tr = list_first_entry(&sdp->sd_ail1_list, struct gfs2_trans, in ail_drain()
881 gfs2_ail_empty_tr(sdp, tr, &tr->tr_ail1_list); in ail_drain()
882 gfs2_ail_empty_tr(sdp, tr, &tr->tr_ail2_list); in ail_drain()
883 list_del(&tr->tr_list); in ail_drain()
884 gfs2_trans_free(sdp, tr); in ail_drain()
887 tr = list_first_entry(&sdp->sd_ail2_list, struct gfs2_trans, in ail_drain()
889 gfs2_ail_empty_tr(sdp, tr, &tr->tr_ail2_list); in ail_drain()
890 list_del(&tr->tr_list); in ail_drain()
891 gfs2_trans_free(sdp, tr); in ail_drain()
926 static void trans_drain(struct gfs2_trans *tr) in trans_drain() argument
931 if (!tr) in trans_drain()
934 head = &tr->tr_buf; in trans_drain()
942 head = &tr->tr_databuf; in trans_drain()
962 struct gfs2_trans *tr = NULL; in gfs2_log_flush() local
983 tr = sdp->sd_log_tr; in gfs2_log_flush()
984 if (tr) { in gfs2_log_flush()
986 tr->tr_first = sdp->sd_log_flush_head; in gfs2_log_flush()
989 !tr->tr_num_buf_new && !tr->tr_num_databuf_new)) in gfs2_log_flush()
1003 lops_before_commit(sdp, tr); in gfs2_log_flush()
1020 lops_after_commit(sdp, tr); in gfs2_log_flush()
1028 if (tr && !list_empty(&tr->tr_ail1_list)) { in gfs2_log_flush()
1029 list_add(&tr->tr_list, &sdp->sd_ail1_list); in gfs2_log_flush()
1030 tr = NULL; in gfs2_log_flush()
1056 gfs2_trans_free(sdp, tr); in gfs2_log_flush()
1062 trans_drain(tr); in gfs2_log_flush()
1070 if (tr && list_empty(&tr->tr_list)) in gfs2_log_flush()
1071 list_add(&tr->tr_list, &sdp->sd_ail1_list); in gfs2_log_flush()
1074 tr = NULL; in gfs2_log_flush()
1106 static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr) in log_refund() argument
1115 gfs2_merge_trans(sdp, tr); in log_refund()
1116 } else if (tr->tr_num_buf_new || tr->tr_num_databuf_new) { in log_refund()
1117 gfs2_assert_withdraw(sdp, test_bit(TR_ALLOCED, &tr->tr_flags)); in log_refund()
1118 sdp->sd_log_tr = tr; in log_refund()
1119 set_bit(TR_ATTACHED, &tr->tr_flags); in log_refund()
1122 sdp->sd_log_committed_revoke += tr->tr_num_revoke - tr->tr_num_revoke_rm; in log_refund()
1124 maxres = sdp->sd_log_blks_reserved + tr->tr_reserved; in log_refund()
1151 void gfs2_log_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr) in gfs2_log_commit() argument
1153 log_refund(sdp, tr); in gfs2_log_commit()