Lines Matching full:transaction
3 * linux/fs/jbd2/transaction.c
9 * Generic filesystem transaction handling code; part of the ext2fs
46 pr_emerg("JBD2: failed to create transaction cache\n"); in jbd2_journal_init_transaction_cache()
58 void jbd2_journal_free_transaction(transaction_t *transaction) in jbd2_journal_free_transaction() argument
60 if (unlikely(ZERO_OR_NULL_PTR(transaction))) in jbd2_journal_free_transaction()
62 kmem_cache_free(transaction_cache, transaction); in jbd2_journal_free_transaction()
66 * Base amount of descriptor blocks we reserve for each transaction.
81 * space for commit block and normal transaction descriptor blocks. in jbd2_descriptor_blocks_per_trans()
90 * Simply initialise a new transaction. Initialize it in
92 * have an existing running transaction: we only make a new transaction
97 * new transaction and we can't block without protecting against other
103 transaction_t *transaction) in jbd2_get_transaction() argument
105 transaction->t_journal = journal; in jbd2_get_transaction()
106 transaction->t_state = T_RUNNING; in jbd2_get_transaction()
107 transaction->t_start_time = ktime_get(); in jbd2_get_transaction()
108 transaction->t_tid = journal->j_transaction_sequence++; in jbd2_get_transaction()
109 transaction->t_expires = jiffies + journal->j_commit_interval; in jbd2_get_transaction()
110 spin_lock_init(&transaction->t_handle_lock); in jbd2_get_transaction()
111 atomic_set(&transaction->t_updates, 0); in jbd2_get_transaction()
112 atomic_set(&transaction->t_outstanding_credits, in jbd2_get_transaction()
115 atomic_set(&transaction->t_outstanding_revokes, 0); in jbd2_get_transaction()
116 atomic_set(&transaction->t_handle_count, 0); in jbd2_get_transaction()
117 INIT_LIST_HEAD(&transaction->t_inode_list); in jbd2_get_transaction()
118 INIT_LIST_HEAD(&transaction->t_private_list); in jbd2_get_transaction()
120 /* Set up the commit timer for the new transaction. */ in jbd2_get_transaction()
121 journal->j_commit_timer.expires = round_jiffies_up(transaction->t_expires); in jbd2_get_transaction()
125 journal->j_running_transaction = transaction; in jbd2_get_transaction()
126 transaction->t_max_wait = 0; in jbd2_get_transaction()
127 transaction->t_start = jiffies; in jbd2_get_transaction()
128 transaction->t_requested = 0; in jbd2_get_transaction()
140 * Update transaction's maximum wait time, if debugging is enabled.
149 static inline void update_t_max_wait(transaction_t *transaction, in update_t_max_wait() argument
154 time_after(transaction->t_start, ts)) { in update_t_max_wait()
155 ts = jbd2_time_diff(ts, transaction->t_start); in update_t_max_wait()
156 spin_lock(&transaction->t_handle_lock); in update_t_max_wait()
157 if (ts > transaction->t_max_wait) in update_t_max_wait()
158 transaction->t_max_wait = ts; in update_t_max_wait()
159 spin_unlock(&transaction->t_handle_lock); in update_t_max_wait()
165 * Wait until running transaction passes to T_FLUSH state and new transaction
167 * running transaction to exist and releases j_state_lock.
188 * Wait until running transaction transitions from T_SWITCH to T_FLUSH
189 * state and new transaction can thus be started. The function releases
222 * Wait until we can add credits for handle to the running transaction. Called
224 * transaction. Returns 1 if we had to wait, j_state_lock is dropped, and
235 * If the current transaction is locked down for commit, wait in add_transaction_credits()
252 * If the current transaction is already too large, in add_transaction_credits()
254 * attach this handle to a new transaction. in add_transaction_credits()
259 * Is the number of reserved credits in the current transaction too in add_transaction_credits()
280 * associated with a committing transaction creates a deadlock, in add_transaction_credits()
285 * in the new transaction. in add_transaction_credits()
304 /* We allow at most half of a transaction to be reserved */ in add_transaction_credits()
321 * to begin. Attach the handle to a transaction and set up the
322 * transaction's buffer credits.
328 transaction_t *transaction, *new_transaction = NULL; in start_this_handle() local
337 * Limit the number of reserved credits to 1/2 of maximum transaction in start_this_handle()
339 * transaction size per operation. in start_this_handle()
382 * Wait on the journal's transaction barrier if necessary. Specifically in start_this_handle()
407 transaction = journal->j_running_transaction; in start_this_handle()
416 * transaction and we don't have to check for transaction size in start_this_handle()
418 * transaction is being switched to a committing one as it in start_this_handle()
421 if (transaction->t_state == T_SWITCH) { in start_this_handle()
430 * use and add the handle to the running transaction. in start_this_handle()
432 update_t_max_wait(transaction, ts); in start_this_handle()
433 handle->h_transaction = transaction; in start_this_handle()
437 atomic_inc(&transaction->t_updates); in start_this_handle()
438 atomic_inc(&transaction->t_handle_count); in start_this_handle()
441 atomic_read(&transaction->t_outstanding_credits), in start_this_handle()
449 * Ensure that no allocations done while the transaction is open are in start_this_handle()
523 * @journal: Journal to start transaction on.
526 * We make sure that the transaction can guarantee at least nblocks of
530 * stored in h_rsv_handle. It is not attached to any particular transaction
531 * and thus doesn't block transaction commit. If the caller uses this reserved
560 /* Get j_state_lock to pin running transaction if it exists */ in jbd2_journal_free_reserved()
575 * This attaches @handle to the running transaction (or creates one if there's
576 * not transaction running). Unlike jbd2_journal_start() this function cannot
641 * return code > 0 implies normal transaction-full status.
645 transaction_t *transaction = handle->h_transaction; in jbd2_journal_extend() local
652 journal = transaction->t_journal; in jbd2_journal_extend()
658 /* Don't extend a locked-down transaction! */ in jbd2_journal_extend()
659 if (transaction->t_state != T_RUNNING) { in jbd2_journal_extend()
661 "transaction not running\n", handle, nblocks); in jbd2_journal_extend()
671 spin_lock(&transaction->t_handle_lock); in jbd2_journal_extend()
673 &transaction->t_outstanding_credits); in jbd2_journal_extend()
677 "transaction too large\n", handle, nblocks); in jbd2_journal_extend()
678 atomic_sub(nblocks, &transaction->t_outstanding_credits); in jbd2_journal_extend()
683 transaction->t_tid, in jbd2_journal_extend()
696 spin_unlock(&transaction->t_handle_lock); in jbd2_journal_extend()
704 transaction_t *transaction = handle->h_transaction; in stop_this_handle() local
705 journal_t *journal = transaction->t_journal; in stop_this_handle()
709 J_ASSERT(atomic_read(&transaction->t_updates) > 0); in stop_this_handle()
714 * transaction will really need as large sequences of transactions with in stop_this_handle()
725 &transaction->t_outstanding_revokes); in stop_this_handle()
732 &transaction->t_outstanding_credits); in stop_this_handle()
735 transaction); in stop_this_handle()
736 if (atomic_dec_and_test(&transaction->t_updates)) in stop_this_handle()
754 * Restart a handle for a multi-transaction filesystem
759 * handle's transaction so far and reattach the handle to a new
760 * transaction capable of guaranteeing the requested number of
767 transaction_t *transaction = handle->h_transaction; in jbd2__journal_restart() local
777 journal = transaction->t_journal; in jbd2__journal_restart()
778 tid = transaction->t_tid; in jbd2__journal_restart()
781 * First unlink the handle from its current transaction, and start the in jbd2__journal_restart()
818 * jbd2_journal_lock_updates () - establish a transaction barrier.
846 transaction_t *transaction = journal->j_running_transaction; in jbd2_journal_lock_updates() local
848 if (!transaction) in jbd2_journal_lock_updates()
851 spin_lock(&transaction->t_handle_lock); in jbd2_journal_lock_updates()
854 if (!atomic_read(&transaction->t_updates)) { in jbd2_journal_lock_updates()
855 spin_unlock(&transaction->t_handle_lock); in jbd2_journal_lock_updates()
859 spin_unlock(&transaction->t_handle_lock); in jbd2_journal_lock_updates()
880 * Release a transaction barrier obtained with jbd2_journal_lock_updates().
929 * If the buffer is already part of the current transaction, then there
931 * transaction which we are still committing to disk, then we need to
935 * part of the transaction, that is).
943 transaction_t *transaction = handle->h_transaction; in do_get_write_access() local
949 journal = transaction->t_journal; in do_get_write_access()
985 * transaction or the existing committing transaction? in do_get_write_access()
989 jh->b_transaction == transaction || in do_get_write_access()
994 transaction); in do_get_write_access()
1017 * The buffer is already part of this transaction if b_transaction or in do_get_write_access()
1020 if (jh->b_transaction == transaction || in do_get_write_access()
1021 jh->b_next_transaction == transaction) in do_get_write_access()
1025 * this is the first time this transaction is touching this buffer, in do_get_write_access()
1036 JBUFFER_TRACE(jh, "no transaction"); in do_get_write_access()
1041 * visible before attaching it to the running transaction. in do_get_write_access()
1046 __jbd2_journal_file_buffer(jh, transaction, BJ_Reserved); in do_get_write_access()
1060 JBUFFER_TRACE(jh, "owned by older transaction"); in do_get_write_access()
1066 * committing transaction is currently writing this buffer out to disk in do_get_write_access()
1081 * Only do the copy if the currently-owning transaction still needs it. in do_get_write_access()
1082 * If buffer isn't on BJ_Metadata list, the committing transaction is in do_get_write_access()
1089 * committed_data record after the transaction, so we HAVE to force the in do_get_write_access()
1108 * before attaching it to the running transaction. Paired with barrier in do_get_write_access()
1112 jh->b_next_transaction = transaction; in do_get_write_access()
1131 /* Fast check whether buffer is already attached to the required transaction */
1146 * we see jh attached to the running transaction, we know it must stay in jbd2_write_access_granted()
1147 * so until the transaction is committed. Thus jh won't be freed and in jbd2_write_access_granted()
1149 * happen jh gets freed, reallocated, and attached to the transaction in jbd2_write_access_granted()
1169 * detect when jh went through free, realloc, attach to transaction in jbd2_write_access_granted()
1187 * @handle: transaction to add buffer modifications to
1223 * the bh is not already part of an existing transaction.
1231 * @handle: transaction to new buffer to
1238 transaction_t *transaction = handle->h_transaction; in jbd2_journal_get_create_access() local
1247 journal = transaction->t_journal; in jbd2_journal_get_create_access()
1252 * The buffer may already belong to this transaction due to pre-zeroing in jbd2_journal_get_create_access()
1254 * committing transaction's lists, but it HAS to be in Forget state in in jbd2_journal_get_create_access()
1255 * that case: the transaction must have deleted the buffer for it to be in jbd2_journal_get_create_access()
1259 J_ASSERT_JH(jh, (jh->b_transaction == transaction || in jbd2_journal_get_create_access()
1273 * the buffer so the transaction freeing it must have in jbd2_journal_get_create_access()
1277 /* first access by this transaction */ in jbd2_journal_get_create_access()
1282 __jbd2_journal_file_buffer(jh, transaction, BJ_Reserved); in jbd2_journal_get_create_access()
1285 /* first access by this transaction */ in jbd2_journal_get_create_access()
1288 JBUFFER_TRACE(jh, "set next transaction"); in jbd2_journal_get_create_access()
1290 jh->b_next_transaction = transaction; in jbd2_journal_get_create_access()
1312 * @handle: transaction
1328 * We never need to know which transaction the committed data is part
1330 * will be committed to a new transaction in due course, at which point
1393 * a running transaction will match the buffer in that transaction.
1430 * @handle: transaction to add buffer to.
1434 * transaction.
1440 * The buffer is placed on the transaction's metadata list and is marked
1441 * as belonging to the transaction.
1446 * current committing transaction (in which case we should have frozen
1448 * buffer: that only gets done when the old transaction finally
1453 transaction_t *transaction = handle->h_transaction; in jbd2_journal_dirty_metadata() local
1465 * of the running transaction. in jbd2_journal_dirty_metadata()
1477 if (jh->b_transaction != transaction && in jbd2_journal_dirty_metadata()
1478 jh->b_next_transaction != transaction) { in jbd2_journal_dirty_metadata()
1480 J_ASSERT_JH(jh, jh->b_transaction == transaction || in jbd2_journal_dirty_metadata()
1481 jh->b_next_transaction == transaction); in jbd2_journal_dirty_metadata()
1485 /* If it's in our transaction it must be in BJ_Metadata list. */ in jbd2_journal_dirty_metadata()
1486 if (jh->b_transaction == transaction && in jbd2_journal_dirty_metadata()
1489 if (jh->b_transaction == transaction && in jbd2_journal_dirty_metadata()
1496 J_ASSERT_JH(jh, jh->b_transaction != transaction || in jbd2_journal_dirty_metadata()
1503 journal = transaction->t_journal; in jbd2_journal_dirty_metadata()
1509 * of the transaction. This needs to be done in jbd2_journal_dirty_metadata()
1510 * once a transaction -bzzz in jbd2_journal_dirty_metadata()
1522 * on the running transaction's metadata list there is nothing to do. in jbd2_journal_dirty_metadata()
1527 if (jh->b_transaction == transaction && jh->b_jlist == BJ_Metadata) { in jbd2_journal_dirty_metadata()
1549 * Metadata already on the current transaction list doesn't in jbd2_journal_dirty_metadata()
1550 * need to be filed. Metadata on another transaction's list must in jbd2_journal_dirty_metadata()
1554 if (jh->b_transaction != transaction) { in jbd2_journal_dirty_metadata()
1555 JBUFFER_TRACE(jh, "already on other transaction"); in jbd2_journal_dirty_metadata()
1558 (jh->b_next_transaction != transaction))) { in jbd2_journal_dirty_metadata()
1561 "transaction (%p, %u), " in jbd2_journal_dirty_metadata()
1566 transaction, transaction->t_tid, in jbd2_journal_dirty_metadata()
1578 * transaction's data buffer, ever. */ in jbd2_journal_dirty_metadata()
1587 __jbd2_journal_file_buffer(jh, transaction, BJ_Metadata); in jbd2_journal_dirty_metadata()
1598 * @handle: transaction handle
1602 * buffer. If the buffer is dirty in the current running transaction we
1615 transaction_t *transaction = handle->h_transaction; in jbd2_journal_forget() local
1624 journal = transaction->t_journal; in jbd2_journal_forget()
1644 /* keep track of whether or not this transaction modified us */ in jbd2_journal_forget()
1648 * The buffer's going from the transaction, we must drop in jbd2_journal_forget()
1653 if (jh->b_transaction == transaction) { in jbd2_journal_forget()
1657 * of this transaction, then we can just drop it from in jbd2_journal_forget()
1658 * the transaction immediately. */ in jbd2_journal_forget()
1662 JBUFFER_TRACE(jh, "belongs to current transaction: unfile"); in jbd2_journal_forget()
1665 * we only want to drop a reference if this transaction in jbd2_journal_forget()
1673 * However, the commit of this transaction is still in jbd2_journal_forget()
1686 __jbd2_journal_file_buffer(jh, transaction, BJ_Forget); in jbd2_journal_forget()
1696 * (committing) transaction, we can't drop it yet... */ in jbd2_journal_forget()
1697 JBUFFER_TRACE(jh, "belongs to older transaction"); in jbd2_journal_forget()
1698 /* ... but we CAN drop it from the new transaction through in jbd2_journal_forget()
1700 * the new transaction, so that not only the commit code in jbd2_journal_forget()
1703 * after the new transaction commits. */ in jbd2_journal_forget()
1709 jh->b_next_transaction = transaction; in jbd2_journal_forget()
1712 J_ASSERT(jh->b_next_transaction == transaction); in jbd2_journal_forget()
1715 * only drop a reference if this transaction modified in jbd2_journal_forget()
1724 * transaction, we can just drop it now if it has no in jbd2_journal_forget()
1729 JBUFFER_TRACE(jh, "belongs to none transaction"); in jbd2_journal_forget()
1746 * attach this buffer to current transaction so that the in jbd2_journal_forget()
1748 * transaction commits. in jbd2_journal_forget()
1751 __jbd2_journal_file_buffer(jh, transaction, BJ_Forget); in jbd2_journal_forget()
1766 * jbd2_journal_stop() - complete a transaction
1767 * @handle: transaction to complete.
1772 * buffer credits to the transaction and remove the handle. The only
1779 * transaction began.
1783 transaction_t *transaction = handle->h_transaction; in jbd2_journal_stop() local
1796 if (!transaction) { in jbd2_journal_stop()
1798 * Handle is already detached from the transaction so there is in jbd2_journal_stop()
1804 journal = transaction->t_journal; in jbd2_journal_stop()
1805 tid = transaction->t_tid; in jbd2_journal_stop()
1819 * Implement synchronous transaction batching. If the handle in jbd2_journal_stop()
1822 * transaction. Keep doing that while new threads continue to in jbd2_journal_stop()
1831 * and wait for the transaction to be committed than it is to in jbd2_journal_stop()
1833 * join the transaction. We achieve this by measuring how in jbd2_journal_stop()
1834 * long it takes to commit a transaction, and compare it with in jbd2_journal_stop()
1835 * how long this transaction has been running, and if run time in jbd2_journal_stop()
1859 transaction->t_start_time)); in jbd2_journal_stop()
1875 transaction->t_synchronous_commit = 1; in jbd2_journal_stop()
1879 * going! We also want to force a commit if the transaction is too in jbd2_journal_stop()
1883 time_after_eq(jiffies, transaction->t_expires)) { in jbd2_journal_stop()
1888 jbd_debug(2, "transaction too old, requesting commit for " in jbd2_journal_stop()
1902 * Once stop_this_handle() drops t_updates, the transaction could start in jbd2_journal_stop()
1904 * dereference transaction pointer again after calling in jbd2_journal_stop()
1922 * transaction buffer lists.
1927 * Append a buffer to a transaction list, given the transaction's list head
1951 * Remove a buffer from a transaction list, given the transaction's list
1972 * Remove a buffer from the appropriate transaction list.
1985 transaction_t *transaction; in __jbd2_journal_temp_unlink_buffer() local
1989 transaction = jh->b_transaction; in __jbd2_journal_temp_unlink_buffer()
1990 if (transaction) in __jbd2_journal_temp_unlink_buffer()
1991 assert_spin_locked(&transaction->t_journal->j_list_lock); in __jbd2_journal_temp_unlink_buffer()
1995 J_ASSERT_JH(jh, transaction != NULL); in __jbd2_journal_temp_unlink_buffer()
2001 transaction->t_nr_buffers--; in __jbd2_journal_temp_unlink_buffer()
2002 J_ASSERT_JH(jh, transaction->t_nr_buffers >= 0); in __jbd2_journal_temp_unlink_buffer()
2003 list = &transaction->t_buffers; in __jbd2_journal_temp_unlink_buffer()
2006 list = &transaction->t_forget; in __jbd2_journal_temp_unlink_buffer()
2009 list = &transaction->t_shadow_list; in __jbd2_journal_temp_unlink_buffer()
2012 list = &transaction->t_reserved_list; in __jbd2_journal_temp_unlink_buffer()
2018 if (transaction && is_journal_aborted(transaction->t_journal)) in __jbd2_journal_temp_unlink_buffer()
2026 * the jh reference that belonged to the transaction.
2099 * running transaction's ->t_datalist via __jbd2_journal_unfile_buffer.
2113 * while the data is part of a transaction. Yes?
2170 * This buffer is no longer needed. If it is on an older transaction's
2171 * checkpoint list we need to record it on this transaction's forget list
2172 * to pin this buffer (and hence its checkpointing transaction) down until
2173 * this transaction commits. If the buffer isn't on a checkpoint list, we
2181 static int __dispose_buffer(struct journal_head *jh, transaction_t *transaction) in __dispose_buffer() argument
2187 JBUFFER_TRACE(jh, "on running+cp transaction"); in __dispose_buffer()
2195 __jbd2_journal_file_buffer(jh, transaction, BJ_Forget); in __dispose_buffer()
2198 JBUFFER_TRACE(jh, "on running transaction"); in __dispose_buffer()
2218 * attached to the current transaction: once the transaction commits,
2222 * previous, committing transaction!
2225 * transaction (and which therefore cannot be discarded immediately) are
2226 * not going to be reused in the new running transaction
2229 * allocated in one transaction and removed in the next will be marked
2231 * the next transaction to delete the block commits. This means that
2240 * transaction commit --- so it is always safe just to discard data
2247 * transaction.
2249 * We're outside-transaction here. Either or both of j_running_transaction
2255 transaction_t *transaction; in journal_unmap_buffer() local
2278 * transaction adding inode to orphan list (let's call it T) in journal_unmap_buffer()
2279 * is committed. Otherwise if the transaction changing the in journal_unmap_buffer()
2284 * transaction marking the buffer as freed in the filesystem in journal_unmap_buffer()
2289 * the buffer to BJ_Forget list of the newest transaction. in journal_unmap_buffer()
2297 * the transaction this buffer was modified in. in journal_unmap_buffer()
2299 transaction = jh->b_transaction; in journal_unmap_buffer()
2300 if (transaction == NULL) { in journal_unmap_buffer()
2301 /* First case: not on any transaction. If it in journal_unmap_buffer()
2306 JBUFFER_TRACE(jh, "not on any transaction: zap"); in journal_unmap_buffer()
2321 /* ... and once the current transaction has in journal_unmap_buffer()
2329 /* There is no currently-running transaction. So the in journal_unmap_buffer()
2332 * the committing transaction, if it exists. */ in journal_unmap_buffer()
2339 /* The orphan record's transaction has in journal_unmap_buffer()
2346 } else if (transaction == journal->j_committing_transaction) { in journal_unmap_buffer()
2347 JBUFFER_TRACE(jh, "on committing transaction"); in journal_unmap_buffer()
2362 * b_modified to not confuse transaction credit accounting, and in journal_unmap_buffer()
2363 * set j_next_transaction to the running transaction (if there in journal_unmap_buffer()
2377 /* Good, the buffer belongs to the running transaction. in journal_unmap_buffer()
2378 * We are writing our own transaction's data, not any in journal_unmap_buffer()
2383 J_ASSERT_JH(jh, transaction == journal->j_running_transaction); in journal_unmap_buffer()
2384 JBUFFER_TRACE(jh, "on running transaction"); in journal_unmap_buffer()
2385 may_free = __dispose_buffer(jh, transaction); in journal_unmap_buffer()
2393 * running transaction, journal_get_write_access() won't clear in journal_unmap_buffer()
2422 * Can return -EBUSY if buffers are part of the committing transaction and
2479 * File a buffer on the given transaction list.
2482 transaction_t *transaction, int jlist) in __jbd2_journal_file_buffer() argument
2489 assert_spin_locked(&transaction->t_journal->j_list_lock); in __jbd2_journal_file_buffer()
2492 J_ASSERT_JH(jh, jh->b_transaction == transaction || in __jbd2_journal_file_buffer()
2518 jh->b_transaction = transaction; in __jbd2_journal_file_buffer()
2526 transaction->t_nr_buffers++; in __jbd2_journal_file_buffer()
2527 list = &transaction->t_buffers; in __jbd2_journal_file_buffer()
2530 list = &transaction->t_forget; in __jbd2_journal_file_buffer()
2533 list = &transaction->t_shadow_list; in __jbd2_journal_file_buffer()
2536 list = &transaction->t_reserved_list; in __jbd2_journal_file_buffer()
2548 transaction_t *transaction, int jlist) in jbd2_journal_file_buffer() argument
2551 spin_lock(&transaction->t_journal->j_list_lock); in jbd2_journal_file_buffer()
2552 __jbd2_journal_file_buffer(jh, transaction, jlist); in jbd2_journal_file_buffer()
2553 spin_unlock(&transaction->t_journal->j_list_lock); in jbd2_journal_file_buffer()
2559 * dropping it from its current transaction entirely. If the buffer has
2560 * already started to be used by a subsequent transaction, refile the
2561 * buffer on that transaction's metadata list.
2566 * When this function returns true, there's no next transaction to refile to
2586 * It has been modified by a later transaction: add it to the new in __jbd2_journal_refile_buffer()
2587 * transaction's metadata list. in __jbd2_journal_refile_buffer()
2640 * File inode in the inode list of the handle's transaction
2645 transaction_t *transaction = handle->h_transaction; in jbd2_journal_file_inode() local
2650 journal = transaction->t_journal; in jbd2_journal_file_inode()
2653 transaction->t_tid); in jbd2_journal_file_inode()
2667 if (jinode->i_transaction == transaction || in jbd2_journal_file_inode()
2668 jinode->i_next_transaction == transaction) in jbd2_journal_file_inode()
2676 if (!transaction->t_need_data_flush) in jbd2_journal_file_inode()
2677 transaction->t_need_data_flush = 1; in jbd2_journal_file_inode()
2678 /* On some different transaction's list - should be in jbd2_journal_file_inode()
2684 jinode->i_next_transaction = transaction; in jbd2_journal_file_inode()
2687 /* Not on any transaction list... */ in jbd2_journal_file_inode()
2689 jinode->i_transaction = transaction; in jbd2_journal_file_inode()
2690 list_add(&jinode->i_list, &transaction->t_inode_list); in jbd2_journal_file_inode()
2713 * File truncate and transaction commit interact with each other in a
2714 * non-trivial way. If a transaction writing data block A is
2716 * written them. Otherwise if we crashed after the transaction with
2717 * write has committed but before the transaction with truncate has
2720 * part in case it is in the committing transaction.
2726 * committing the transaction after this function has been called but
2727 * before a transaction for truncate is started (and furthermore it
2729 * happens in the same transaction as write --- we don't have to write
2743 * enough that the transaction was not committing before we started in jbd2_journal_begin_ordered_truncate()
2744 * a transaction adding the inode to orphan list */ in jbd2_journal_begin_ordered_truncate()