• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/jbd/

Lines Matching defs:transaction

27  * Unlink a buffer from a transaction checkpoint list.
33 transaction_t *transaction = jh->b_cp_transaction;
37 if (transaction->t_checkpoint_list == jh) {
38 transaction->t_checkpoint_list = jh->b_cpnext;
39 if (transaction->t_checkpoint_list == jh)
40 transaction->t_checkpoint_list = NULL;
45 * Unlink a buffer from a transaction checkpoint(io) list.
51 transaction_t *transaction = jh->b_cp_transaction;
54 if (transaction->t_checkpoint_io_list == jh) {
55 transaction->t_checkpoint_io_list = jh->b_cpnext;
56 if (transaction->t_checkpoint_io_list == jh)
57 transaction->t_checkpoint_io_list = NULL;
68 transaction_t *transaction = jh->b_cp_transaction;
72 if (!transaction->t_checkpoint_io_list) {
75 jh->b_cpnext = transaction->t_checkpoint_io_list;
76 jh->b_cpprev = transaction->t_checkpoint_io_list->b_cpprev;
80 transaction->t_checkpoint_io_list = jh;
84 * Try to release a checkpointed buffer from its transaction.
86 * whole transaction.
134 * transaction to complete. If there is absolutely no way
191 * Clean up transaction's list of buffers submitted for io.
201 static int __wait_cp_io(journal_t *journal, transaction_t *transaction)
209 this_tid = transaction->t_tid;
211 /* Did somebody clean up the transaction in the meanwhile? */
212 if (journal->j_checkpoint_transactions != transaction ||
213 transaction->t_tid != this_tid)
215 while (!released && transaction->t_checkpoint_io_list) {
216 jh = transaction->t_checkpoint_io_list;
318 * We cannot afford to let the transaction logic start
340 * Perform an actual checkpoint. We take the first transaction on the
349 transaction_t *transaction;
366 * OK, we need to start writing disk blocks. Take one transaction
373 transaction = journal->j_checkpoint_transactions;
374 this_tid = transaction->t_tid;
377 * If someone cleaned up this transaction while we slept, we're
378 * done (maybe it's a new transaction, but it fell at the same
381 if (journal->j_checkpoint_transactions == transaction &&
382 transaction->t_tid == this_tid) {
388 while (!retry && transaction->t_checkpoint_list) {
391 jh = transaction->t_checkpoint_list;
422 * Now we have cleaned up the first transaction's checkpoint
425 err = __wait_cp_io(journal, transaction);
450 * aware of transaction aborts. Checkpointing involves writing to the
459 transaction_t * transaction;
466 /* OK, work out the oldest transaction remaining in the log, and
470 * next transaction ID we will write, and where it will
475 transaction = journal->j_checkpoint_transactions;
476 if (transaction) {
477 first_tid = transaction->t_tid;
478 blocknr = transaction->t_log_start;
479 } else if ((transaction = journal->j_committing_transaction) != NULL) {
480 first_tid = transaction->t_tid;
481 blocknr = transaction->t_log_start;
482 } else if ((transaction = journal->j_running_transaction) != NULL) {
483 first_tid = transaction->t_tid;
492 /* If the oldest pinned transaction is at the tail of the log
583 transaction_t *transaction, *last_transaction, *next_transaction;
587 transaction = journal->j_checkpoint_transactions;
588 if (!transaction)
591 last_transaction = transaction->t_cpprev;
592 next_transaction = transaction;
594 transaction = next_transaction;
595 next_transaction = transaction->t_cpnext;
596 ret += journal_clean_one_cp_list(transaction->
612 ret += journal_clean_one_cp_list(transaction->
616 } while (transaction != last_transaction);
626 * We cannot safely clean a transaction out of the log until all of the
627 * buffer updates committed in that transaction have safely been stored
629 * transaction need to be maintained on the transaction's checkpoint
631 * called to remove the buffer from the existing transaction's
634 * The function returns 1 if it frees the transaction, 0 otherwise.
643 transaction_t *transaction;
649 if ((transaction = jh->b_cp_transaction) == NULL) {
650 JBUFFER_TRACE(jh, "not on transaction");
653 journal = transaction->t_journal;
658 if (transaction->t_checkpoint_list != NULL ||
659 transaction->t_checkpoint_io_list != NULL)
661 JBUFFER_TRACE(jh, "transaction has no more buffers");
665 * buffer off a running or committing transaction's checkpoing list,
666 * then even if the checkpoint list is empty, the transaction obviously
672 if (transaction->t_state != T_FINISHED) {
673 JBUFFER_TRACE(jh, "belongs to running/committing transaction");
677 /* OK, that was the last buffer for the transaction: we can now
678 safely remove this transaction from the log */
680 __journal_drop_transaction(journal, transaction);
693 * list so that we know when it is safe to clean the transaction out of
700 transaction_t *transaction)
706 jh->b_cp_transaction = transaction;
708 if (!transaction->t_checkpoint_list) {
711 jh->b_cpnext = transaction->t_checkpoint_list;
712 jh->b_cpprev = transaction->t_checkpoint_list->b_cpprev;
716 transaction->t_checkpoint_list = jh;
720 * We've finished with this transaction structure: adios...
722 * The transaction must have no links except for the checkpoint by this
729 void __journal_drop_transaction(journal_t *journal, transaction_t *transaction)
732 if (transaction->t_cpnext) {
733 transaction->t_cpnext->t_cpprev = transaction->t_cpprev;
734 transaction->t_cpprev->t_cpnext = transaction->t_cpnext;
735 if (journal->j_checkpoint_transactions == transaction)
737 transaction->t_cpnext;
738 if (journal->j_checkpoint_transactions == transaction)
742 J_ASSERT(transaction->t_state == T_FINISHED);
743 J_ASSERT(transaction->t_buffers == NULL);
744 J_ASSERT(transaction->t_sync_datalist == NULL);
745 J_ASSERT(transaction->t_forget == NULL);
746 J_ASSERT(transaction->t_iobuf_list == NULL);
747 J_ASSERT(transaction->t_shadow_list == NULL);
748 J_ASSERT(transaction->t_log_list == NULL);
749 J_ASSERT(transaction->t_checkpoint_list == NULL);
750 J_ASSERT(transaction->t_checkpoint_io_list == NULL);
751 J_ASSERT(transaction->t_updates == 0);
752 J_ASSERT(journal->j_committing_transaction != transaction);
753 J_ASSERT(journal->j_running_transaction != transaction);
755 jbd_debug(1, "Dropping transaction %d, all done\n", transaction->t_tid);
756 kfree(transaction);