Lines Matching refs:commit_transaction
119 transaction_t *commit_transaction, in journal_submit_commit_record() argument
133 bh = jbd2_journal_get_descriptor_buffer(commit_transaction, in journal_submit_commit_record()
242 transaction_t *commit_transaction) in journal_submit_data_buffers() argument
248 list_for_each_entry(jinode, &commit_transaction->t_inode_list, i_list) { in journal_submit_data_buffers()
261 J_ASSERT(jinode->i_transaction == commit_transaction); in journal_submit_data_buffers()
285 transaction_t *commit_transaction) in journal_finish_inode_data_buffers() argument
292 list_for_each_entry(jinode, &commit_transaction->t_inode_list, i_list) { in journal_finish_inode_data_buffers()
311 &commit_transaction->t_inode_list, i_list) { in journal_finish_inode_data_buffers()
384 transaction_t *commit_transaction; in jbd2_journal_commit_transaction() local
465 commit_transaction = journal->j_running_transaction; in jbd2_journal_commit_transaction()
467 trace_jbd2_start_commit(journal, commit_transaction); in jbd2_journal_commit_transaction()
469 commit_transaction->t_tid); in jbd2_journal_commit_transaction()
473 J_ASSERT(commit_transaction->t_state == T_RUNNING); in jbd2_journal_commit_transaction()
474 commit_transaction->t_state = T_LOCKED; in jbd2_journal_commit_transaction()
476 trace_jbd2_commit_locking(journal, commit_transaction); in jbd2_journal_commit_transaction()
477 stats.run.rs_wait = commit_transaction->t_max_wait; in jbd2_journal_commit_transaction()
480 if (commit_transaction->t_requested) in jbd2_journal_commit_transaction()
482 jbd2_time_diff(commit_transaction->t_requested, in jbd2_journal_commit_transaction()
484 stats.run.rs_running = jbd2_time_diff(commit_transaction->t_start, in jbd2_journal_commit_transaction()
490 commit_transaction->t_state = T_SWITCH; in jbd2_journal_commit_transaction()
492 J_ASSERT (atomic_read(&commit_transaction->t_outstanding_credits) <= in jbd2_journal_commit_transaction()
513 while (commit_transaction->t_reserved_list) { in jbd2_journal_commit_transaction()
514 jh = commit_transaction->t_reserved_list; in jbd2_journal_commit_transaction()
559 &commit_transaction->t_outstanding_credits); in jbd2_journal_commit_transaction()
561 trace_jbd2_commit_flushing(journal, commit_transaction); in jbd2_journal_commit_transaction()
566 commit_transaction->t_state = T_FLUSH; in jbd2_journal_commit_transaction()
567 journal->j_committing_transaction = commit_transaction; in jbd2_journal_commit_transaction()
570 commit_transaction->t_log_start = journal->j_head; in jbd2_journal_commit_transaction()
580 err = journal_submit_data_buffers(journal, commit_transaction); in jbd2_journal_commit_transaction()
585 jbd2_journal_write_revoke_records(commit_transaction, &log_bufs); in jbd2_journal_commit_transaction()
595 commit_transaction->t_state = T_COMMIT; in jbd2_journal_commit_transaction()
598 trace_jbd2_commit_logging(journal, commit_transaction); in jbd2_journal_commit_transaction()
602 stats.run.rs_blocks = commit_transaction->t_nr_buffers; in jbd2_journal_commit_transaction()
605 J_ASSERT(commit_transaction->t_nr_buffers <= in jbd2_journal_commit_transaction()
606 atomic_read(&commit_transaction->t_outstanding_credits)); in jbd2_journal_commit_transaction()
611 while (commit_transaction->t_buffers) { in jbd2_journal_commit_transaction()
615 jh = commit_transaction->t_buffers; in jbd2_journal_commit_transaction()
632 if (!commit_transaction->t_buffers) in jbd2_journal_commit_transaction()
646 commit_transaction, in jbd2_journal_commit_transaction()
685 atomic_dec(&commit_transaction->t_outstanding_credits); in jbd2_journal_commit_transaction()
698 flags = jbd2_journal_write_metadata_buffer(commit_transaction, in jbd2_journal_commit_transaction()
719 commit_transaction->t_tid); in jbd2_journal_commit_transaction()
735 commit_transaction->t_buffers == NULL || in jbd2_journal_commit_transaction()
775 err = journal_finish_inode_data_buffers(journal, commit_transaction); in jbd2_journal_commit_transaction()
805 J_ASSERT(commit_transaction->t_state == T_COMMIT); in jbd2_journal_commit_transaction()
806 commit_transaction->t_state = T_COMMIT_DFLUSH; in jbd2_journal_commit_transaction()
814 if (commit_transaction->t_need_data_flush && in jbd2_journal_commit_transaction()
821 err = journal_submit_commit_record(journal, commit_transaction, in jbd2_journal_commit_transaction()
865 jh = commit_transaction->t_shadow_list->b_tprev; in jbd2_journal_commit_transaction()
876 jbd2_journal_file_buffer(jh, commit_transaction, BJ_Forget); in jbd2_journal_commit_transaction()
881 J_ASSERT (commit_transaction->t_shadow_list == NULL); in jbd2_journal_commit_transaction()
909 J_ASSERT(commit_transaction->t_state == T_COMMIT_DFLUSH); in jbd2_journal_commit_transaction()
910 commit_transaction->t_state = T_COMMIT_JFLUSH; in jbd2_journal_commit_transaction()
914 err = journal_submit_commit_record(journal, commit_transaction, in jbd2_journal_commit_transaction()
931 atomic_read(&commit_transaction->t_outstanding_credits) < 0); in jbd2_journal_commit_transaction()
948 J_ASSERT(list_empty(&commit_transaction->t_inode_list)); in jbd2_journal_commit_transaction()
949 J_ASSERT(commit_transaction->t_buffers == NULL); in jbd2_journal_commit_transaction()
950 J_ASSERT(commit_transaction->t_checkpoint_list == NULL); in jbd2_journal_commit_transaction()
951 J_ASSERT(commit_transaction->t_shadow_list == NULL); in jbd2_journal_commit_transaction()
959 while (commit_transaction->t_forget) { in jbd2_journal_commit_transaction()
965 jh = commit_transaction->t_forget; in jbd2_journal_commit_transaction()
974 J_ASSERT_JH(jh, jh->b_transaction == commit_transaction); in jbd2_journal_commit_transaction()
1055 __jbd2_journal_insert_checkpoint(jh, commit_transaction); in jbd2_journal_commit_transaction()
1096 if (commit_transaction->t_forget) { in jbd2_journal_commit_transaction()
1106 journal->j_checkpoint_transactions = commit_transaction; in jbd2_journal_commit_transaction()
1107 commit_transaction->t_cpnext = commit_transaction; in jbd2_journal_commit_transaction()
1108 commit_transaction->t_cpprev = commit_transaction; in jbd2_journal_commit_transaction()
1110 commit_transaction->t_cpnext = in jbd2_journal_commit_transaction()
1112 commit_transaction->t_cpprev = in jbd2_journal_commit_transaction()
1113 commit_transaction->t_cpnext->t_cpprev; in jbd2_journal_commit_transaction()
1114 commit_transaction->t_cpnext->t_cpprev = in jbd2_journal_commit_transaction()
1115 commit_transaction; in jbd2_journal_commit_transaction()
1116 commit_transaction->t_cpprev->t_cpnext = in jbd2_journal_commit_transaction()
1117 commit_transaction; in jbd2_journal_commit_transaction()
1125 J_ASSERT(commit_transaction->t_state == T_COMMIT_JFLUSH); in jbd2_journal_commit_transaction()
1127 commit_transaction->t_start = jiffies; in jbd2_journal_commit_transaction()
1129 commit_transaction->t_start); in jbd2_journal_commit_transaction()
1134 stats.ts_tid = commit_transaction->t_tid; in jbd2_journal_commit_transaction()
1136 atomic_read(&commit_transaction->t_handle_count); in jbd2_journal_commit_transaction()
1138 commit_transaction->t_tid, &stats.run); in jbd2_journal_commit_transaction()
1139 stats.ts_requested = (commit_transaction->t_requested) ? 1 : 0; in jbd2_journal_commit_transaction()
1141 commit_transaction->t_state = T_COMMIT_CALLBACK; in jbd2_journal_commit_transaction()
1142 J_ASSERT(commit_transaction == journal->j_committing_transaction); in jbd2_journal_commit_transaction()
1143 journal->j_commit_sequence = commit_transaction->t_tid; in jbd2_journal_commit_transaction()
1160 journal->j_commit_callback(journal, commit_transaction); in jbd2_journal_commit_transaction()
1162 journal->j_fc_cleanup_callback(journal, 1, commit_transaction->t_tid); in jbd2_journal_commit_transaction()
1164 trace_jbd2_end_commit(journal, commit_transaction); in jbd2_journal_commit_transaction()
1172 commit_transaction->t_state = T_FINISHED; in jbd2_journal_commit_transaction()
1174 if (commit_transaction->t_checkpoint_list == NULL && in jbd2_journal_commit_transaction()
1175 commit_transaction->t_checkpoint_io_list == NULL) { in jbd2_journal_commit_transaction()
1176 __jbd2_journal_drop_transaction(journal, commit_transaction); in jbd2_journal_commit_transaction()
1177 jbd2_journal_free_transaction(commit_transaction); in jbd2_journal_commit_transaction()