Lines Matching refs:tr

94 			       struct gfs2_trans *tr)  in gfs2_ail1_start_one()  argument
103 list_for_each_entry_safe_reverse(bd, s, &tr->tr_ail1_list, bd_ail_st_list) { in gfs2_ail1_start_one()
106 gfs2_assert(sdp, bd->bd_tr == tr); in gfs2_ail1_start_one()
111 list_move(&bd->bd_ail_st_list, &tr->tr_ail2_list); in gfs2_ail1_start_one()
120 list_move(&bd->bd_ail_st_list, &tr->tr_ail1_list); in gfs2_ail1_start_one()
148 struct gfs2_trans *tr; in gfs2_ail1_flush() local
155 list_for_each_entry_reverse(tr, head, tr_list) { in gfs2_ail1_flush()
158 if (gfs2_ail1_start_one(sdp, wbc, tr)) in gfs2_ail1_flush()
190 static void gfs2_ail1_empty_one(struct gfs2_sbd *sdp, struct gfs2_trans *tr) in gfs2_ail1_empty_one() argument
195 list_for_each_entry_safe_reverse(bd, s, &tr->tr_ail1_list, in gfs2_ail1_empty_one()
198 gfs2_assert(sdp, bd->bd_tr == tr); in gfs2_ail1_empty_one()
203 list_move(&bd->bd_ail_st_list, &tr->tr_ail2_list); in gfs2_ail1_empty_one()
217 struct gfs2_trans *tr, *s; in gfs2_ail1_empty() local
222 list_for_each_entry_safe_reverse(tr, s, &sdp->sd_ail1_list, tr_list) { in gfs2_ail1_empty()
223 gfs2_ail1_empty_one(sdp, tr); in gfs2_ail1_empty()
224 if (list_empty(&tr->tr_ail1_list) && oldest_tr) in gfs2_ail1_empty()
225 list_move(&tr->tr_list, &sdp->sd_ail2_list); in gfs2_ail1_empty()
237 struct gfs2_trans *tr; in gfs2_ail1_wait() local
242 list_for_each_entry_reverse(tr, &sdp->sd_ail1_list, tr_list) { in gfs2_ail1_wait()
243 list_for_each_entry(bd, &tr->tr_ail1_list, bd_ail_st_list) { in gfs2_ail1_wait()
264 static void gfs2_ail2_empty_one(struct gfs2_sbd *sdp, struct gfs2_trans *tr) in gfs2_ail2_empty_one() argument
266 struct list_head *head = &tr->tr_ail2_list; in gfs2_ail2_empty_one()
272 gfs2_assert(sdp, bd->bd_tr == tr); in gfs2_ail2_empty_one()
279 struct gfs2_trans *tr, *safe; in ail2_empty() local
286 list_for_each_entry_safe(tr, safe, &sdp->sd_ail2_list, tr_list) { in ail2_empty()
287 a = (old_tail <= tr->tr_first); in ail2_empty()
288 b = (tr->tr_first < new_tail); in ail2_empty()
293 gfs2_ail2_empty_one(sdp, tr); in ail2_empty()
294 list_del(&tr->tr_list); in ail2_empty()
295 gfs2_assert_warn(sdp, list_empty(&tr->tr_ail1_list)); in ail2_empty()
296 gfs2_assert_warn(sdp, list_empty(&tr->tr_ail2_list)); in ail2_empty()
297 kfree(tr); in ail2_empty()
446 struct gfs2_trans *tr = sdp->sd_log_tr; in calc_reserved() local
448 if (tr) { in calc_reserved()
449 mbuf = tr->tr_num_buf_new - tr->tr_num_buf_rm; in calc_reserved()
450 dbuf = tr->tr_num_databuf_new - tr->tr_num_databuf_rm; in calc_reserved()
468 struct gfs2_trans *tr; in current_tail() local
476 tr = list_entry(sdp->sd_ail1_list.prev, struct gfs2_trans, in current_tail()
478 tail = tr->tr_first; in current_tail()
596 struct gfs2_trans *tr; in gfs2_write_revokes() local
603 list_for_each_entry(tr, &sdp->sd_ail1_list, tr_list) { in gfs2_write_revokes()
604 list_for_each_entry(bd, &tr->tr_ail2_list, bd_ail_st_list) { in gfs2_write_revokes()
627 list_for_each_entry(tr, &sdp->sd_ail1_list, tr_list) { in gfs2_write_revokes()
628 list_for_each_entry_safe(bd, tmp, &tr->tr_ail2_list, bd_ail_st_list) { in gfs2_write_revokes()
707 struct gfs2_trans *tr; in gfs2_log_flush() local
721 tr = sdp->sd_log_tr; in gfs2_log_flush()
722 if (tr) { in gfs2_log_flush()
724 INIT_LIST_HEAD(&tr->tr_ail1_list); in gfs2_log_flush()
725 INIT_LIST_HEAD(&tr->tr_ail2_list); in gfs2_log_flush()
726 tr->tr_first = sdp->sd_log_flush_head; in gfs2_log_flush()
728 gfs2_assert_withdraw(sdp, !tr->tr_num_buf_new && !tr->tr_num_databuf_new); in gfs2_log_flush()
737 lops_before_commit(sdp, tr); in gfs2_log_flush()
748 lops_after_commit(sdp, tr); in gfs2_log_flush()
756 if (tr && !list_empty(&tr->tr_ail1_list)) { in gfs2_log_flush()
757 list_add(&tr->tr_list, &sdp->sd_ail1_list); in gfs2_log_flush()
758 tr = NULL; in gfs2_log_flush()
786 kfree(tr); in gfs2_log_flush()
810 static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr) in log_refund() argument
819 gfs2_merge_trans(sdp->sd_log_tr, tr); in log_refund()
820 } else if (tr->tr_num_buf_new || tr->tr_num_databuf_new) { in log_refund()
821 gfs2_assert_withdraw(sdp, tr->tr_alloced); in log_refund()
822 sdp->sd_log_tr = tr; in log_refund()
823 tr->tr_attached = 1; in log_refund()
826 sdp->sd_log_commited_revoke += tr->tr_num_revoke - tr->tr_num_revoke_rm; in log_refund()
828 maxres = sdp->sd_log_blks_reserved + tr->tr_reserved; in log_refund()
855 void gfs2_log_commit(struct gfs2_sbd *sdp, struct gfs2_trans *tr) in gfs2_log_commit() argument
857 log_refund(sdp, tr); in gfs2_log_commit()