Lines Matching refs:transaction
175 transaction_t *transaction;
192 * transaction commit and any fs involvement might get stuck waiting for
241 transaction = journal->j_running_transaction;
242 if (transaction && time_after_eq(jiffies,
243 transaction->t_expires))
260 transaction = journal->j_running_transaction;
261 if (transaction && time_after_eq(jiffies, transaction->t_expires)) {
262 journal->j_commit_request = transaction->t_tid;
320 * If the source buffer has already been modified by a new transaction
338 int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
351 journal_t *journal = transaction->t_journal;
355 * transaction is allowed to write it, so nobody else is allowed
372 * If a new transaction has already done a buffer copy-out, then
463 * copying is moved to the transaction's shadow queue.
467 __jbd2_journal_file_buffer(jh_in, transaction, BJ_Shadow);
482 * Returns true if a transaction commit was started.
491 * The only transaction we can possibly wait upon is the
492 * currently running transaction (if it exists). Otherwise,
533 * transaction if we don't have an active handle, otherwise, we will deadlock.
536 * 1 if transaction was successfully committed.
540 transaction_t *transaction = NULL;
546 transaction = journal->j_running_transaction;
547 if (!tid_geq(journal->j_commit_request, transaction->t_tid))
550 transaction = journal->j_committing_transaction;
552 if (!transaction) {
557 tid = transaction->t_tid;
570 * calling process is not within transaction.
590 * Caller want unconditional commit. We can only force the running transaction
605 * Start a commit of the current running transaction (if any). Returns true
606 * if a transaction is going to be committed (or is currently already
618 /* There's a running transaction and we've just made sure
626 * completion of that transaction.
637 * Return 1 if a given transaction has not yet sent barrier request
638 * connected with a transaction commit. If 0 is returned, transaction
688 * Some callers make sure transaction is already committing and in that
804 /* Return 1 when transaction with given tid has already committed. */
822 * When this function returns the transaction corresponding to tid
823 * will be completed. If the transaction has currently running, start
824 * committing that transaction before waiting for it to complete. If
825 * the transaction id is stale, it is by definition already completed,
836 /* transaction not yet started, so request it */
1017 jbd2_journal_get_descriptor_buffer(transaction_t *transaction, int type)
1019 journal_t *journal = transaction->t_journal;
1033 atomic_dec(&transaction->t_outstanding_credits);
1039 header->h_sequence = cpu_to_be32(transaction->t_tid);
1062 * Return tid of the oldest transaction in the journal and block in the journal
1063 * where the transaction starts.
1065 * If the journal is now empty, return which will be the next transaction ID
1066 * we will write and where will that transaction start.
1074 transaction_t *transaction;
1079 transaction = journal->j_checkpoint_transactions;
1080 if (transaction) {
1081 *tid = transaction->t_tid;
1082 *block = transaction->t_log_start;
1083 } else if ((transaction = journal->j_committing_transaction) != NULL) {
1084 *tid = transaction->t_tid;
1085 *block = transaction->t_log_start;
1086 } else if ((transaction = journal->j_running_transaction) != NULL) {
1087 *tid = transaction->t_tid;
1119 * soon as we update j_tail, next transaction can start reusing journal
1121 * old transaction with possibly newly overwritten data.
1191 seq_printf(seq, "average: \n %ums waiting for transaction\n",
1197 seq_printf(seq, " %ums running transaction\n",
1199 seq_printf(seq, " %ums transaction was being locked\n",
1203 seq_printf(seq, " %ums logging transaction\n",
1205 seq_printf(seq, " %lluus average transaction commit time\n",
1207 seq_printf(seq, " %lu handles per transaction\n",
1209 seq_printf(seq, " %lu blocks per transaction\n",
1211 seq_printf(seq, " %lu logged blocks per transaction\n",
1598 * transaction will start reusing journal space and so we
1672 * @tail_tid: TID of the new transaction at the tail of the log
1673 * @tail_block: The first block of the transaction at the tail of the log
2000 printk(KERN_ERR "JBD2: journal transaction %u on %s "
2346 transaction_t *transaction = NULL;
2352 transaction = journal->j_running_transaction;
2353 __jbd2_log_start_commit(journal, transaction->t_tid);
2355 transaction = journal->j_committing_transaction;
2358 if (transaction) {
2359 tid_t tid = transaction->t_tid;
2457 * journal (not of a single transaction). This operation cannot be
2467 * immediately and no further transaction commits will be honoured.
2474 * Any attempt to get a new transaction handle on a journal which is in
2485 * transaction without having to complete the transaction to record the
2493 transaction_t *transaction;
2521 * Mark the abort as occurred and start current running transaction
2528 transaction = journal->j_running_transaction;
2529 if (transaction)
2530 __jbd2_log_start_commit(journal, transaction->t_tid);
2803 * b_jcount reaches zero. Running transaction (b_transaction) and checkpoint
2804 * transaction (b_cp_transaction) hold their references to b_jcount.
2807 * _before_ attaching the journal_head to a transaction. To protect the
2817 * (Get another reference for transaction)
2954 * transaction's lists.