• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/fs/jbd2/

Lines Matching refs: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.
158 * Clean up transaction's list of buffers submitted for io.
165 static void __wait_cp_io(journal_t *journal, transaction_t *transaction)
172 this_tid = transaction->t_tid;
174 /* Did somebody clean up the transaction in the meanwhile? */
175 if (journal->j_checkpoint_transactions != transaction ||
176 transaction->t_tid != this_tid)
178 while (!released && transaction->t_checkpoint_io_list) {
179 jh = transaction->t_checkpoint_io_list;
271 * We cannot afford to let the transaction logic start
293 * Perform an actual checkpoint. We take the first transaction on the
301 transaction_t *transaction;
318 * OK, we need to start writing disk blocks. Take one transaction
324 transaction = journal->j_checkpoint_transactions;
325 this_tid = transaction->t_tid;
328 * If someone cleaned up this transaction while we slept, we're
329 * done (maybe it's a new transaction, but it fell at the same
332 if (journal->j_checkpoint_transactions == transaction &&
333 transaction->t_tid == this_tid) {
339 while (!retry && transaction->t_checkpoint_list) {
342 jh = transaction->t_checkpoint_list;
370 * Now we have cleaned up the first transaction's checkpoint
373 __wait_cp_io(journal, transaction);
394 * aware of transaction aborts. Checkpointing involves writing to the
402 transaction_t * transaction;
406 /* OK, work out the oldest transaction remaining in the log, and
410 * next transaction ID we will write, and where it will
415 transaction = journal->j_checkpoint_transactions;
416 if (transaction) {
417 first_tid = transaction->t_tid;
418 blocknr = transaction->t_log_start;
419 } else if ((transaction = journal->j_committing_transaction) != NULL) {
420 first_tid = transaction->t_tid;
421 blocknr = transaction->t_log_start;
422 } else if ((transaction = journal->j_running_transaction) != NULL) {
423 first_tid = transaction->t_tid;
432 /* If the oldest pinned transaction is at the tail of the log
523 transaction_t *transaction, *last_transaction, *next_transaction;
527 transaction = journal->j_checkpoint_transactions;
528 if (!transaction)
531 last_transaction = transaction->t_cpprev;
532 next_transaction = transaction;
534 transaction = next_transaction;
535 next_transaction = transaction->t_cpnext;
536 ret += journal_clean_one_cp_list(transaction->
552 ret += journal_clean_one_cp_list(transaction->
556 } while (transaction != last_transaction);
566 * We cannot safely clean a transaction out of the log until all of the
567 * buffer updates committed in that transaction have safely been stored
569 * transaction need to be maintained on the transaction's checkpoint
571 * called to remove the buffer from the existing transaction's
574 * The function returns 1 if it frees the transaction, 0 otherwise.
583 transaction_t *transaction;
589 if ((transaction = jh->b_cp_transaction) == NULL) {
590 JBUFFER_TRACE(jh, "not on transaction");
593 journal = transaction->t_journal;
598 if (transaction->t_checkpoint_list != NULL ||
599 transaction->t_checkpoint_io_list != NULL)
601 JBUFFER_TRACE(jh, "transaction has no more buffers");
605 * buffer off a committing transaction's forget list, then even if the
606 * checkpoint list is empty, the transaction obviously cannot be
612 if (transaction == journal->j_committing_transaction) {
613 JBUFFER_TRACE(jh, "belongs to committing transaction");
617 /* OK, that was the last buffer for the transaction: we can now
618 safely remove this transaction from the log */
620 __jbd2_journal_drop_transaction(journal, transaction);
633 * list so that we know when it is safe to clean the transaction out of
640 transaction_t *transaction)
646 jh->b_cp_transaction = transaction;
648 if (!transaction->t_checkpoint_list) {
651 jh->b_cpnext = transaction->t_checkpoint_list;
652 jh->b_cpprev = transaction->t_checkpoint_list->b_cpprev;
656 transaction->t_checkpoint_list = jh;
660 * We've finished with this transaction structure: adios...
662 * The transaction must have no links except for the checkpoint by this
669 void __jbd2_journal_drop_transaction(journal_t *journal, transaction_t *transaction)
672 if (transaction->t_cpnext) {
673 transaction->t_cpnext->t_cpprev = transaction->t_cpprev;
674 transaction->t_cpprev->t_cpnext = transaction->t_cpnext;
675 if (journal->j_checkpoint_transactions == transaction)
677 transaction->t_cpnext;
678 if (journal->j_checkpoint_transactions == transaction)
682 J_ASSERT(transaction->t_state == T_FINISHED);
683 J_ASSERT(transaction->t_buffers == NULL);
684 J_ASSERT(transaction->t_sync_datalist == NULL);
685 J_ASSERT(transaction->t_forget == NULL);
686 J_ASSERT(transaction->t_iobuf_list == NULL);
687 J_ASSERT(transaction->t_shadow_list == NULL);
688 J_ASSERT(transaction->t_log_list == NULL);
689 J_ASSERT(transaction->t_checkpoint_list == NULL);
690 J_ASSERT(transaction->t_checkpoint_io_list == NULL);
691 J_ASSERT(transaction->t_updates == 0);
692 J_ASSERT(journal->j_committing_transaction != transaction);
693 J_ASSERT(journal->j_running_transaction != transaction);
695 jbd_debug(1, "Dropping transaction %d, all done\n", transaction->t_tid);
696 kfree(transaction);