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

Lines Matching refs:transaction

28  * Unlink a buffer from a transaction. 
35 hfsplus_transaction_t *transaction;
37 transaction = jh->b_cp_transaction;
42 if (transaction->t_checkpoint_list == jh)
43 transaction->t_checkpoint_list = jh->b_cpnext;
44 if (transaction->t_checkpoint_list == jh)
45 transaction->t_checkpoint_list = NULL;
49 * Try to release a checkpointed buffer from its transaction.
121 * Clean up a transaction's checkpoint list.
124 * buffers are removed from the transaction.
127 * checkpoint. (hfsplus_jbd_remove_checkpoint() deletes the transaction when
132 static int __cleanup_transaction(hfsplus_jbd_t *journal, hfsplus_transaction_t *transaction)
139 jh = transaction->t_checkpoint_list;
241 * We cannot afford to let the transaction logic start
259 /* We may be about to drop the transaction. Tell the
312 hfsplus_transaction_t *transaction;
318 transaction = journal->j_checkpoint_transactions;
319 this_tid = transaction->t_tid;
320 jh = transaction->t_checkpoint_list;
348 * If someone cleaned up this transaction while we slept, we're
351 if (journal->j_checkpoint_transactions != transaction)
356 * Maybe it's a new transaction, but it fell at the same
359 if (transaction->t_tid != this_tid)
362 * We have walked the whole transaction list without
366 cleanup_ret = __cleanup_transaction(journal, transaction);
368 if (journal->j_checkpoint_transactions != transaction)
390 * aware of transaction aborts. Checkpointing involves writing to the
398 hfsplus_transaction_t * transaction;
402 /* OK, work out the oldest transaction remaining in the log, and
406 * next transaction ID we will write, and where it will
411 transaction = journal->j_checkpoint_transactions;
412 if (transaction) {
413 first_tid = transaction->t_tid;
414 blocknr = transaction->t_log_start;
415 } else if ((transaction = journal->j_committing_transaction) != NULL) {
416 first_tid = transaction->t_tid;
417 blocknr = transaction->t_log_start;
418 } else if ((transaction = journal->j_running_transaction) != NULL) {
419 first_tid = transaction->t_tid;
428 /* If the oldest pinned transaction is at the tail of the log
475 hfsplus_transaction_t *transaction, *last_transaction, *next_transaction;
478 transaction = journal->j_checkpoint_transactions;
479 if (transaction == 0)
482 last_transaction = transaction->t_cpprev;
483 next_transaction = transaction;
487 transaction = next_transaction;
488 next_transaction = transaction->t_cpnext;
489 jh = transaction->t_checkpoint_list;
510 } while (transaction != last_transaction);
520 * We cannot safely clean a transaction out of the log until all of the
521 * buffer updates committed in that transaction have safely been stored
523 * transaction need to be maintained on the transaction's checkpoint
525 * called to remove the buffer from the existing transaction's
534 hfsplus_transaction_t *transaction;
539 if ((transaction = jh->b_cp_transaction) == NULL) {
540 HFSPLUS_JBUFFER_TRACE(jh, "not on transaction");
543 journal = transaction->t_journal;
547 if (transaction->t_checkpoint_list != NULL)
549 HFSPLUS_JBUFFER_TRACE(jh, "transaction has no more buffers");
553 * buffer off a committing transaction's forget list, then even if the
554 * checkpoint list is empty, the transaction obviously cannot be
560 if (transaction == journal->j_committing_transaction) {
561 HFSPLUS_JBUFFER_TRACE(jh, "belongs to committing transaction");
565 /* OK, that was the last buffer for the transaction: we can now
566 safely remove this transaction from the log */
568 __hfsplus_jbd_drop_transaction(journal, transaction);
579 * list so that we know when it is safe to clean the transaction out of
586 hfsplus_transaction_t *transaction)
592 jh->b_cp_transaction = transaction;
594 if (!transaction->t_checkpoint_list) {
597 jh->b_cpnext = transaction->t_checkpoint_list;
598 jh->b_cpprev = transaction->t_checkpoint_list->b_cpprev;
602 transaction->t_checkpoint_list = jh;
606 * We've finished with this transaction structure: adios...
608 * The transaction must have no links except for the checkpoint by this
615 void __hfsplus_jbd_drop_transaction(hfsplus_jbd_t *journal, hfsplus_transaction_t *transaction)
618 if (transaction->t_cpnext) {
619 transaction->t_cpnext->t_cpprev = transaction->t_cpprev;
620 transaction->t_cpprev->t_cpnext = transaction->t_cpnext;
621 if (journal->j_checkpoint_transactions == transaction)
623 transaction->t_cpnext;
624 if (journal->j_checkpoint_transactions == transaction)
628 HFSPLUS_J_ASSERT(transaction->t_state == HFSPLUS_T_FINISHED);
629 HFSPLUS_J_ASSERT(transaction->t_buffers == NULL);
630 HFSPLUS_J_ASSERT(transaction->t_sync_datalist == NULL);
631 HFSPLUS_J_ASSERT(transaction->t_forget == NULL);
632 HFSPLUS_J_ASSERT(transaction->t_iobuf_list == NULL);
633 HFSPLUS_J_ASSERT(transaction->t_shadow_list == NULL);
634 HFSPLUS_J_ASSERT(transaction->t_log_list == NULL);
635 HFSPLUS_J_ASSERT(transaction->t_checkpoint_list == NULL);
636 HFSPLUS_J_ASSERT(transaction->t_updates == 0);
637 HFSPLUS_J_ASSERT(journal->j_committing_transaction != transaction);
638 HFSPLUS_J_ASSERT(journal->j_running_transaction != transaction);
640 dprint(DBG_JCHKPT, "Dropping transaction %d, all done\n", transaction->t_tid);
641 kfree(transaction);