Lines Matching refs:transaction
32 transaction_t *transaction = jh->b_cp_transaction; in __buffer_unlink_first() local
36 if (transaction->t_checkpoint_list == jh) { in __buffer_unlink_first()
37 transaction->t_checkpoint_list = jh->b_cpnext; in __buffer_unlink_first()
38 if (transaction->t_checkpoint_list == jh) in __buffer_unlink_first()
39 transaction->t_checkpoint_list = NULL; in __buffer_unlink_first()
50 transaction_t *transaction = jh->b_cp_transaction; in __buffer_unlink() local
53 if (transaction->t_checkpoint_io_list == jh) { in __buffer_unlink()
54 transaction->t_checkpoint_io_list = jh->b_cpnext; in __buffer_unlink()
55 if (transaction->t_checkpoint_io_list == jh) in __buffer_unlink()
56 transaction->t_checkpoint_io_list = NULL; in __buffer_unlink()
67 transaction_t *transaction = jh->b_cp_transaction; in __buffer_relink_io() local
71 if (!transaction->t_checkpoint_io_list) { in __buffer_relink_io()
74 jh->b_cpnext = transaction->t_checkpoint_io_list; in __buffer_relink_io()
75 jh->b_cpprev = transaction->t_checkpoint_io_list->b_cpprev; in __buffer_relink_io()
79 transaction->t_checkpoint_io_list = jh; in __buffer_relink_io()
202 transaction_t *transaction; in jbd2_log_do_checkpoint() local
226 transaction = journal->j_checkpoint_transactions; in jbd2_log_do_checkpoint()
227 if (transaction->t_chp_stats.cs_chp_time == 0) in jbd2_log_do_checkpoint()
228 transaction->t_chp_stats.cs_chp_time = jiffies; in jbd2_log_do_checkpoint()
229 this_tid = transaction->t_tid; in jbd2_log_do_checkpoint()
236 if (journal->j_checkpoint_transactions != transaction || in jbd2_log_do_checkpoint()
237 transaction->t_tid != this_tid) in jbd2_log_do_checkpoint()
241 while (transaction->t_checkpoint_list) { in jbd2_log_do_checkpoint()
242 jh = transaction->t_checkpoint_list; in jbd2_log_do_checkpoint()
258 transaction->t_chp_stats.cs_forced_to_close++; in jbd2_log_do_checkpoint()
308 transaction->t_chp_stats.cs_written++; in jbd2_log_do_checkpoint()
331 if (journal->j_checkpoint_transactions != transaction || in jbd2_log_do_checkpoint()
332 transaction->t_tid != this_tid) in jbd2_log_do_checkpoint()
335 while (transaction->t_checkpoint_io_list) { in jbd2_log_do_checkpoint()
336 jh = transaction->t_checkpoint_io_list; in jbd2_log_do_checkpoint()
508 transaction_t *transaction, *last_transaction, *next_transaction; in jbd2_journal_shrink_checkpoint_list() local
529 transaction = journal->j_shrink_transaction; in jbd2_journal_shrink_checkpoint_list()
531 transaction = journal->j_checkpoint_transactions; in jbd2_journal_shrink_checkpoint_list()
534 first_tid = transaction->t_tid; in jbd2_journal_shrink_checkpoint_list()
536 next_transaction = transaction; in jbd2_journal_shrink_checkpoint_list()
539 transaction = next_transaction; in jbd2_journal_shrink_checkpoint_list()
540 next_transaction = transaction->t_cpnext; in jbd2_journal_shrink_checkpoint_list()
541 tid = transaction->t_tid; in jbd2_journal_shrink_checkpoint_list()
544 nr_freed += journal_shrink_one_cp_list(transaction->t_checkpoint_list, in jbd2_journal_shrink_checkpoint_list()
553 nr_freed += journal_shrink_one_cp_list(transaction->t_checkpoint_io_list, in jbd2_journal_shrink_checkpoint_list()
559 } while (transaction != last_transaction); in jbd2_journal_shrink_checkpoint_list()
561 if (transaction != last_transaction) { in jbd2_journal_shrink_checkpoint_list()
592 transaction_t *transaction, *last_transaction, *next_transaction; in __jbd2_journal_clean_checkpoint_list() local
595 transaction = journal->j_checkpoint_transactions; in __jbd2_journal_clean_checkpoint_list()
596 if (!transaction) in __jbd2_journal_clean_checkpoint_list()
599 last_transaction = transaction->t_cpprev; in __jbd2_journal_clean_checkpoint_list()
600 next_transaction = transaction; in __jbd2_journal_clean_checkpoint_list()
602 transaction = next_transaction; in __jbd2_journal_clean_checkpoint_list()
603 next_transaction = transaction->t_cpnext; in __jbd2_journal_clean_checkpoint_list()
604 ret = journal_clean_one_cp_list(transaction->t_checkpoint_list, in __jbd2_journal_clean_checkpoint_list()
620 ret = journal_clean_one_cp_list(transaction-> in __jbd2_journal_clean_checkpoint_list()
631 } while (transaction != last_transaction); in __jbd2_journal_clean_checkpoint_list()
677 transaction_t *transaction; in __jbd2_journal_remove_checkpoint() local
683 transaction = jh->b_cp_transaction; in __jbd2_journal_remove_checkpoint()
684 if (!transaction) { in __jbd2_journal_remove_checkpoint()
688 journal = transaction->t_journal; in __jbd2_journal_remove_checkpoint()
708 if (transaction->t_checkpoint_list || transaction->t_checkpoint_io_list) in __jbd2_journal_remove_checkpoint()
720 if (transaction->t_state != T_FINISHED) in __jbd2_journal_remove_checkpoint()
727 stats = &transaction->t_chp_stats; in __jbd2_journal_remove_checkpoint()
732 transaction->t_tid, stats); in __jbd2_journal_remove_checkpoint()
734 __jbd2_journal_drop_transaction(journal, transaction); in __jbd2_journal_remove_checkpoint()
735 jbd2_journal_free_transaction(transaction); in __jbd2_journal_remove_checkpoint()
748 transaction_t *transaction) in __jbd2_journal_insert_checkpoint() argument
756 jh->b_cp_transaction = transaction; in __jbd2_journal_insert_checkpoint()
758 if (!transaction->t_checkpoint_list) { in __jbd2_journal_insert_checkpoint()
761 jh->b_cpnext = transaction->t_checkpoint_list; in __jbd2_journal_insert_checkpoint()
762 jh->b_cpprev = transaction->t_checkpoint_list->b_cpprev; in __jbd2_journal_insert_checkpoint()
766 transaction->t_checkpoint_list = jh; in __jbd2_journal_insert_checkpoint()
767 percpu_counter_inc(&transaction->t_journal->j_checkpoint_jh_count); in __jbd2_journal_insert_checkpoint()
780 void __jbd2_journal_drop_transaction(journal_t *journal, transaction_t *transaction) in __jbd2_journal_drop_transaction() argument
785 if (transaction->t_cpnext) { in __jbd2_journal_drop_transaction()
786 transaction->t_cpnext->t_cpprev = transaction->t_cpprev; in __jbd2_journal_drop_transaction()
787 transaction->t_cpprev->t_cpnext = transaction->t_cpnext; in __jbd2_journal_drop_transaction()
788 if (journal->j_checkpoint_transactions == transaction) in __jbd2_journal_drop_transaction()
790 transaction->t_cpnext; in __jbd2_journal_drop_transaction()
791 if (journal->j_checkpoint_transactions == transaction) in __jbd2_journal_drop_transaction()
795 J_ASSERT(transaction->t_state == T_FINISHED); in __jbd2_journal_drop_transaction()
796 J_ASSERT(transaction->t_buffers == NULL); in __jbd2_journal_drop_transaction()
797 J_ASSERT(transaction->t_forget == NULL); in __jbd2_journal_drop_transaction()
798 J_ASSERT(transaction->t_shadow_list == NULL); in __jbd2_journal_drop_transaction()
799 J_ASSERT(transaction->t_checkpoint_list == NULL); in __jbd2_journal_drop_transaction()
800 J_ASSERT(transaction->t_checkpoint_io_list == NULL); in __jbd2_journal_drop_transaction()
801 J_ASSERT(atomic_read(&transaction->t_updates) == 0); in __jbd2_journal_drop_transaction()
802 J_ASSERT(journal->j_committing_transaction != transaction); in __jbd2_journal_drop_transaction()
803 J_ASSERT(journal->j_running_transaction != transaction); in __jbd2_journal_drop_transaction()
805 trace_jbd2_drop_transaction(journal, transaction); in __jbd2_journal_drop_transaction()
807 jbd_debug(1, "Dropping transaction %d, all done\n", transaction->t_tid); in __jbd2_journal_drop_transaction()