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()
68 * Simply allocate and initialise a new transaction. Create it in
70 * have an existing running transaction: we only make a new transaction
75 * new transaction and we can't block without protecting against other
81 jbd2_get_transaction(journal_t *journal, transaction_t *transaction) in jbd2_get_transaction() argument
83 transaction->t_journal = journal; in jbd2_get_transaction()
84 transaction->t_state = T_RUNNING; in jbd2_get_transaction()
85 transaction->t_start_time = ktime_get(); in jbd2_get_transaction()
86 transaction->t_tid = journal->j_transaction_sequence++; in jbd2_get_transaction()
87 transaction->t_expires = jiffies + journal->j_commit_interval; in jbd2_get_transaction()
88 spin_lock_init(&transaction->t_handle_lock); in jbd2_get_transaction()
89 atomic_set(&transaction->t_updates, 0); in jbd2_get_transaction()
90 atomic_set(&transaction->t_outstanding_credits, in jbd2_get_transaction()
92 atomic_set(&transaction->t_handle_count, 0); in jbd2_get_transaction()
93 INIT_LIST_HEAD(&transaction->t_inode_list); in jbd2_get_transaction()
94 INIT_LIST_HEAD(&transaction->t_private_list); in jbd2_get_transaction()
96 /* Set up the commit timer for the new transaction. */ in jbd2_get_transaction()
97 journal->j_commit_timer.expires = round_jiffies_up(transaction->t_expires); in jbd2_get_transaction()
101 journal->j_running_transaction = transaction; in jbd2_get_transaction()
102 transaction->t_max_wait = 0; in jbd2_get_transaction()
103 transaction->t_start = jiffies; in jbd2_get_transaction()
104 transaction->t_requested = 0; in jbd2_get_transaction()
106 return transaction; in jbd2_get_transaction()
118 * Update transaction's maximum wait time, if debugging is enabled.
127 static inline void update_t_max_wait(transaction_t *transaction, in update_t_max_wait() argument
132 time_after(transaction->t_start, ts)) { in update_t_max_wait()
133 ts = jbd2_time_diff(ts, transaction->t_start); in update_t_max_wait()
134 spin_lock(&transaction->t_handle_lock); in update_t_max_wait()
135 if (ts > transaction->t_max_wait) in update_t_max_wait()
136 transaction->t_max_wait = ts; in update_t_max_wait()
137 spin_unlock(&transaction->t_handle_lock); in update_t_max_wait()
143 * Wait until running transaction passes T_LOCKED state. Also starts the commit
144 * if needed. The function expects running transaction to exist and releases
172 * Wait until we can add credits for handle to the running transaction. Called
174 * transaction. Returns 1 if we had to wait, j_state_lock is dropped, and
185 * If the current transaction is locked down for commit, wait in add_transaction_credits()
201 * If the current transaction is already too large, in add_transaction_credits()
203 * attach this handle to a new transaction. in add_transaction_credits()
208 * Is the number of reserved credits in the current transaction too in add_transaction_credits()
229 * associated with a committing transaction creates a deadlock, in add_transaction_credits()
234 * in the new transaction. in add_transaction_credits()
252 /* We allow at most half of a transaction to be reserved */ in add_transaction_credits()
269 * to begin. Attach the handle to a transaction and set up the
270 * transaction's buffer credits.
276 transaction_t *transaction, *new_transaction = NULL; in start_this_handle() local
285 * Limit the number of reserved credits to 1/2 of maximum transaction in start_this_handle()
287 * transaction size per operation. in start_this_handle()
330 * Wait on the journal's transaction barrier if necessary. Specifically in start_this_handle()
355 transaction = journal->j_running_transaction; in start_this_handle()
364 * transaction and we don't have to check for transaction size in start_this_handle()
372 * use and add the handle to the running transaction. in start_this_handle()
374 update_t_max_wait(transaction, ts); in start_this_handle()
375 handle->h_transaction = transaction; in start_this_handle()
378 atomic_inc(&transaction->t_updates); in start_this_handle()
379 atomic_inc(&transaction->t_handle_count); in start_this_handle()
382 atomic_read(&transaction->t_outstanding_credits), in start_this_handle()
390 * Ensure that no allocations done while the transaction is open are in start_this_handle()
461 * @journal: Journal to start transaction on.
464 * We make sure that the transaction can guarantee at least nblocks of
468 * is stored in h_rsv_handle. It is not attached to any particular transaction
469 * and thus doesn't block transaction commit. If the caller uses this reserved
501 * This attaches @handle to the running transaction (or creates one if there's
502 * not transaction running). Unlike jbd2_journal_start() this function cannot
563 * return code > 0 implies normal transaction-full status.
567 transaction_t *transaction = handle->h_transaction; in jbd2_journal_extend() local
574 journal = transaction->t_journal; in jbd2_journal_extend()
580 /* Don't extend a locked-down transaction! */ in jbd2_journal_extend()
581 if (transaction->t_state != T_RUNNING) { in jbd2_journal_extend()
583 "transaction not running\n", handle, nblocks); in jbd2_journal_extend()
587 spin_lock(&transaction->t_handle_lock); in jbd2_journal_extend()
589 &transaction->t_outstanding_credits); in jbd2_journal_extend()
593 "transaction too large\n", handle, nblocks); in jbd2_journal_extend()
594 atomic_sub(nblocks, &transaction->t_outstanding_credits); in jbd2_journal_extend()
602 atomic_sub(nblocks, &transaction->t_outstanding_credits); in jbd2_journal_extend()
607 transaction->t_tid, in jbd2_journal_extend()
618 spin_unlock(&transaction->t_handle_lock); in jbd2_journal_extend()
631 * Restart a handle for a multi-transaction filesystem
636 * handle's transaction so far and reattach the handle to a new
637 * transaction capable of guaranteeing the requested number of
643 transaction_t *transaction = handle->h_transaction; in jbd2__journal_restart() local
652 journal = transaction->t_journal; in jbd2__journal_restart()
655 * First unlink the handle from its current transaction, and start the in jbd2__journal_restart()
658 J_ASSERT(atomic_read(&transaction->t_updates) > 0); in jbd2__journal_restart()
662 spin_lock(&transaction->t_handle_lock); in jbd2__journal_restart()
664 &transaction->t_outstanding_credits); in jbd2__journal_restart()
669 if (atomic_dec_and_test(&transaction->t_updates)) in jbd2__journal_restart()
671 tid = transaction->t_tid; in jbd2__journal_restart()
672 spin_unlock(&transaction->t_handle_lock); in jbd2__journal_restart()
703 * void jbd2_journal_lock_updates () - establish a transaction barrier.
731 transaction_t *transaction = journal->j_running_transaction; in jbd2_journal_lock_updates() local
733 if (!transaction) in jbd2_journal_lock_updates()
736 spin_lock(&transaction->t_handle_lock); in jbd2_journal_lock_updates()
739 if (!atomic_read(&transaction->t_updates)) { in jbd2_journal_lock_updates()
740 spin_unlock(&transaction->t_handle_lock); in jbd2_journal_lock_updates()
744 spin_unlock(&transaction->t_handle_lock); in jbd2_journal_lock_updates()
765 * Release a transaction barrier obtained with jbd2_journal_lock_updates().
814 * If the buffer is already part of the current transaction, then there
816 * transaction which we are still committing to disk, then we need to
820 * part of the transaction, that is).
828 transaction_t *transaction = handle->h_transaction; in do_get_write_access() local
834 journal = transaction->t_journal; in do_get_write_access()
870 * transaction or the existing committing transaction? in do_get_write_access()
874 jh->b_transaction == transaction || in do_get_write_access()
879 transaction); in do_get_write_access()
902 * The buffer is already part of this transaction if b_transaction or in do_get_write_access()
905 if (jh->b_transaction == transaction || in do_get_write_access()
906 jh->b_next_transaction == transaction) in do_get_write_access()
910 * this is the first time this transaction is touching this buffer, in do_get_write_access()
921 JBUFFER_TRACE(jh, "no transaction"); in do_get_write_access()
926 * visible before attaching it to the running transaction. in do_get_write_access()
931 __jbd2_journal_file_buffer(jh, transaction, BJ_Reserved); in do_get_write_access()
945 JBUFFER_TRACE(jh, "owned by older transaction"); in do_get_write_access()
951 * committing transaction is currently writing this buffer out to disk in do_get_write_access()
966 * Only do the copy if the currently-owning transaction still needs it. in do_get_write_access()
967 * If buffer isn't on BJ_Metadata list, the committing transaction is in do_get_write_access()
974 * committed_data record after the transaction, so we HAVE to force the in do_get_write_access()
993 * before attaching it to the running transaction. Paired with barrier in do_get_write_access()
997 jh->b_next_transaction = transaction; in do_get_write_access()
1016 /* Fast check whether buffer is already attached to the required transaction */
1031 * we see jh attached to the running transaction, we know it must stay in jbd2_write_access_granted()
1032 * so until the transaction is committed. Thus jh won't be freed and in jbd2_write_access_granted()
1034 * happen jh gets freed, reallocated, and attached to the transaction in jbd2_write_access_granted()
1054 * detect when jh went through free, realloc, attach to transaction in jbd2_write_access_granted()
1071 * @handle: transaction to add buffer modifications to
1107 * the bh is not already part of an existing transaction.
1115 * @handle: transaction to new buffer to
1122 transaction_t *transaction = handle->h_transaction; in jbd2_journal_get_create_access() local
1131 journal = transaction->t_journal; in jbd2_journal_get_create_access()
1136 * The buffer may already belong to this transaction due to pre-zeroing in jbd2_journal_get_create_access()
1138 * committing transaction's lists, but it HAS to be in Forget state in in jbd2_journal_get_create_access()
1139 * that case: the transaction must have deleted the buffer for it to be in jbd2_journal_get_create_access()
1143 J_ASSERT_JH(jh, (jh->b_transaction == transaction || in jbd2_journal_get_create_access()
1157 * the buffer so the transaction freeing it must have in jbd2_journal_get_create_access()
1161 /* first access by this transaction */ in jbd2_journal_get_create_access()
1166 __jbd2_journal_file_buffer(jh, transaction, BJ_Reserved); in jbd2_journal_get_create_access()
1169 /* first access by this transaction */ in jbd2_journal_get_create_access()
1172 JBUFFER_TRACE(jh, "set next transaction"); in jbd2_journal_get_create_access()
1174 jh->b_next_transaction = transaction; in jbd2_journal_get_create_access()
1196 * @handle: transaction
1212 * We never need to know which transaction the committed data is part
1214 * will be committed to a new transaction in due course, at which point
1277 * a running transaction will match the buffer in that transaction.
1314 * @handle: transaction to add buffer to.
1318 * transaction.
1324 * The buffer is placed on the transaction's metadata list and is marked
1325 * as belonging to the transaction.
1330 * current committing transaction (in which case we should have frozen
1332 * buffer: that only gets done when the old transaction finally
1337 transaction_t *transaction = handle->h_transaction; in jbd2_journal_dirty_metadata() local
1349 * of the running transaction. in jbd2_journal_dirty_metadata()
1361 if (jh->b_transaction != transaction && in jbd2_journal_dirty_metadata()
1362 jh->b_next_transaction != transaction) { in jbd2_journal_dirty_metadata()
1364 J_ASSERT_JH(jh, jh->b_transaction == transaction || in jbd2_journal_dirty_metadata()
1365 jh->b_next_transaction == transaction); in jbd2_journal_dirty_metadata()
1369 /* If it's in our transaction it must be in BJ_Metadata list. */ in jbd2_journal_dirty_metadata()
1370 if (jh->b_transaction == transaction && in jbd2_journal_dirty_metadata()
1373 if (jh->b_transaction == transaction && in jbd2_journal_dirty_metadata()
1380 J_ASSERT_JH(jh, jh->b_transaction != transaction || in jbd2_journal_dirty_metadata()
1387 journal = transaction->t_journal; in jbd2_journal_dirty_metadata()
1393 * of the transaction. This needs to be done in jbd2_journal_dirty_metadata()
1394 * once a transaction -bzzz in jbd2_journal_dirty_metadata()
1406 * on the running transaction's metadata list there is nothing to do. in jbd2_journal_dirty_metadata()
1411 if (jh->b_transaction == transaction && jh->b_jlist == BJ_Metadata) { in jbd2_journal_dirty_metadata()
1433 * Metadata already on the current transaction list doesn't in jbd2_journal_dirty_metadata()
1434 * need to be filed. Metadata on another transaction's list must in jbd2_journal_dirty_metadata()
1438 if (jh->b_transaction != transaction) { in jbd2_journal_dirty_metadata()
1439 JBUFFER_TRACE(jh, "already on other transaction"); in jbd2_journal_dirty_metadata()
1442 (jh->b_next_transaction != transaction))) { in jbd2_journal_dirty_metadata()
1445 "transaction (%p, %u), " in jbd2_journal_dirty_metadata()
1450 transaction, transaction->t_tid, in jbd2_journal_dirty_metadata()
1462 * transaction's data buffer, ever. */ in jbd2_journal_dirty_metadata()
1471 __jbd2_journal_file_buffer(jh, transaction, BJ_Metadata); in jbd2_journal_dirty_metadata()
1482 * @handle: transaction handle
1486 * buffer. If the buffer is dirty in the current running transaction we
1499 transaction_t *transaction = handle->h_transaction; in jbd2_journal_forget() local
1508 journal = transaction->t_journal; in jbd2_journal_forget()
1526 /* keep track of whether or not this transaction modified us */ in jbd2_journal_forget()
1530 * The buffer's going from the transaction, we must drop in jbd2_journal_forget()
1535 if (jh->b_transaction == transaction) { in jbd2_journal_forget()
1539 * of this transaction, then we can just drop it from in jbd2_journal_forget()
1540 * the transaction immediately. */ in jbd2_journal_forget()
1544 JBUFFER_TRACE(jh, "belongs to current transaction: unfile"); in jbd2_journal_forget()
1547 * we only want to drop a reference if this transaction in jbd2_journal_forget()
1555 * However, the commit of this transaction is still in jbd2_journal_forget()
1568 __jbd2_journal_file_buffer(jh, transaction, BJ_Forget); in jbd2_journal_forget()
1583 * (committing) transaction, we can't drop it yet... */ in jbd2_journal_forget()
1584 JBUFFER_TRACE(jh, "belongs to older transaction"); in jbd2_journal_forget()
1585 /* ... but we CAN drop it from the new transaction through in jbd2_journal_forget()
1587 * the new transaction, so that not only the commit code in jbd2_journal_forget()
1590 * after the new transaction commits. */ in jbd2_journal_forget()
1596 jh->b_next_transaction = transaction; in jbd2_journal_forget()
1599 J_ASSERT(jh->b_next_transaction == transaction); in jbd2_journal_forget()
1602 * only drop a reference if this transaction modified in jbd2_journal_forget()
1622 * int jbd2_journal_stop() - complete a transaction
1623 * @handle: transaction to complete.
1628 * buffer credits to the transaction and remove the handle. The only
1635 * transaction began.
1639 transaction_t *transaction = handle->h_transaction; in jbd2_journal_stop() local
1645 if (!transaction) { in jbd2_journal_stop()
1647 * Handle is already detached from the transaction so in jbd2_journal_stop()
1661 journal = transaction->t_journal; in jbd2_journal_stop()
1668 J_ASSERT(atomic_read(&transaction->t_updates) > 0); in jbd2_journal_stop()
1678 transaction->t_tid, in jbd2_journal_stop()
1686 * Implement synchronous transaction batching. If the handle in jbd2_journal_stop()
1689 * transaction. Keep doing that while new threads continue to in jbd2_journal_stop()
1698 * and wait for the transaction to be committed than it is to in jbd2_journal_stop()
1700 * join the transaction. We achieve this by measuring how in jbd2_journal_stop()
1701 * long it takes to commit a transaction, and compare it with in jbd2_journal_stop()
1702 * how long this transaction has been running, and if run time in jbd2_journal_stop()
1726 transaction->t_start_time)); in jbd2_journal_stop()
1742 transaction->t_synchronous_commit = 1; in jbd2_journal_stop()
1745 &transaction->t_outstanding_credits); in jbd2_journal_stop()
1750 * transaction is occupying too much of the log, or if the in jbd2_journal_stop()
1751 * transaction is too old now. in jbd2_journal_stop()
1754 (atomic_read(&transaction->t_outstanding_credits) > in jbd2_journal_stop()
1756 time_after_eq(jiffies, transaction->t_expires)) { in jbd2_journal_stop()
1761 jbd_debug(2, "transaction too old, requesting commit for " in jbd2_journal_stop()
1764 jbd2_log_start_commit(journal, transaction->t_tid); in jbd2_journal_stop()
1775 * Once we drop t_updates, if it goes to zero the transaction in jbd2_journal_stop()
1777 * once we do this, we must not dereference transaction in jbd2_journal_stop()
1780 tid = transaction->t_tid; in jbd2_journal_stop()
1781 if (atomic_dec_and_test(&transaction->t_updates)) { in jbd2_journal_stop()
1807 * transaction buffer lists.
1812 * Append a buffer to a transaction list, given the transaction's list head
1836 * Remove a buffer from a transaction list, given the transaction's list
1857 * Remove a buffer from the appropriate transaction list.
1870 transaction_t *transaction; in __jbd2_journal_temp_unlink_buffer() local
1874 transaction = jh->b_transaction; in __jbd2_journal_temp_unlink_buffer()
1875 if (transaction) in __jbd2_journal_temp_unlink_buffer()
1876 assert_spin_locked(&transaction->t_journal->j_list_lock); in __jbd2_journal_temp_unlink_buffer()
1880 J_ASSERT_JH(jh, transaction != NULL); in __jbd2_journal_temp_unlink_buffer()
1886 transaction->t_nr_buffers--; in __jbd2_journal_temp_unlink_buffer()
1887 J_ASSERT_JH(jh, transaction->t_nr_buffers >= 0); in __jbd2_journal_temp_unlink_buffer()
1888 list = &transaction->t_buffers; in __jbd2_journal_temp_unlink_buffer()
1891 list = &transaction->t_forget; in __jbd2_journal_temp_unlink_buffer()
1894 list = &transaction->t_shadow_list; in __jbd2_journal_temp_unlink_buffer()
1897 list = &transaction->t_reserved_list; in __jbd2_journal_temp_unlink_buffer()
1903 if (transaction && is_journal_aborted(transaction->t_journal)) in __jbd2_journal_temp_unlink_buffer()
1989 * running transaction's ->t_datalist via __jbd2_journal_unfile_buffer.
2003 * while the data is part of a transaction. Yes?
2061 * This buffer is no longer needed. If it is on an older transaction's
2062 * checkpoint list we need to record it on this transaction's forget list
2063 * to pin this buffer (and hence its checkpointing transaction) down until
2064 * this transaction commits. If the buffer isn't on a checkpoint list, we
2072 static int __dispose_buffer(struct journal_head *jh, transaction_t *transaction) in __dispose_buffer() argument
2078 JBUFFER_TRACE(jh, "on running+cp transaction"); in __dispose_buffer()
2086 __jbd2_journal_file_buffer(jh, transaction, BJ_Forget); in __dispose_buffer()
2089 JBUFFER_TRACE(jh, "on running transaction"); in __dispose_buffer()
2108 * attached to the current transaction: once the transaction commits,
2112 * previous, committing transaction!
2115 * transaction (and which therefore cannot be discarded immediately) are
2116 * not going to be reused in the new running transaction
2119 * allocated in one transaction and removed in the next will be marked
2121 * the next transaction to delete the block commits. This means that
2130 * transaction commit --- so it is always safe just to discard data
2137 * transaction.
2139 * We're outside-transaction here. Either or both of j_running_transaction
2145 transaction_t *transaction; in journal_unmap_buffer() local
2171 * transaction adding inode to orphan list (let's call it T) in journal_unmap_buffer()
2172 * is committed. Otherwise if the transaction changing the in journal_unmap_buffer()
2177 * transaction marking the buffer as freed in the filesystem in journal_unmap_buffer()
2182 * the buffer to BJ_Forget list of the newest transaction. in journal_unmap_buffer()
2190 * the transaction this buffer was modified in. in journal_unmap_buffer()
2192 transaction = jh->b_transaction; in journal_unmap_buffer()
2193 if (transaction == NULL) { in journal_unmap_buffer()
2194 /* First case: not on any transaction. If it in journal_unmap_buffer()
2199 JBUFFER_TRACE(jh, "not on any transaction: zap"); in journal_unmap_buffer()
2214 /* ... and once the current transaction has in journal_unmap_buffer()
2222 /* There is no currently-running transaction. So the in journal_unmap_buffer()
2225 * the committing transaction, if it exists. */ in journal_unmap_buffer()
2232 /* The orphan record's transaction has in journal_unmap_buffer()
2239 } else if (transaction == journal->j_committing_transaction) { in journal_unmap_buffer()
2240 JBUFFER_TRACE(jh, "on committing transaction"); in journal_unmap_buffer()
2255 * b_modified to not confuse transaction credit accounting, and in journal_unmap_buffer()
2256 * set j_next_transaction to the running transaction (if there in journal_unmap_buffer()
2270 /* Good, the buffer belongs to the running transaction. in journal_unmap_buffer()
2271 * We are writing our own transaction's data, not any in journal_unmap_buffer()
2276 J_ASSERT_JH(jh, transaction == journal->j_running_transaction); in journal_unmap_buffer()
2277 JBUFFER_TRACE(jh, "on running transaction"); in journal_unmap_buffer()
2278 may_free = __dispose_buffer(jh, transaction); in journal_unmap_buffer()
2286 * running transaction, journal_get_write_access() won't clear in journal_unmap_buffer()
2316 * Can return -EBUSY if buffers are part of the committing transaction and
2373 * File a buffer on the given transaction list.
2376 transaction_t *transaction, int jlist) in __jbd2_journal_file_buffer() argument
2383 assert_spin_locked(&transaction->t_journal->j_list_lock); in __jbd2_journal_file_buffer()
2386 J_ASSERT_JH(jh, jh->b_transaction == transaction || in __jbd2_journal_file_buffer()
2412 jh->b_transaction = transaction; in __jbd2_journal_file_buffer()
2420 transaction->t_nr_buffers++; in __jbd2_journal_file_buffer()
2421 list = &transaction->t_buffers; in __jbd2_journal_file_buffer()
2424 list = &transaction->t_forget; in __jbd2_journal_file_buffer()
2427 list = &transaction->t_shadow_list; in __jbd2_journal_file_buffer()
2430 list = &transaction->t_reserved_list; in __jbd2_journal_file_buffer()
2442 transaction_t *transaction, int jlist) in jbd2_journal_file_buffer() argument
2445 spin_lock(&transaction->t_journal->j_list_lock); in jbd2_journal_file_buffer()
2446 __jbd2_journal_file_buffer(jh, transaction, jlist); in jbd2_journal_file_buffer()
2447 spin_unlock(&transaction->t_journal->j_list_lock); in jbd2_journal_file_buffer()
2453 * dropping it from its current transaction entirely. If the buffer has
2454 * already started to be used by a subsequent transaction, refile the
2455 * buffer on that transaction's metadata list.
2478 * It has been modified by a later transaction: add it to the new in __jbd2_journal_refile_buffer()
2479 * transaction's metadata list. in __jbd2_journal_refile_buffer()
2532 * File inode in the inode list of the handle's transaction
2537 transaction_t *transaction = handle->h_transaction; in jbd2_journal_file_inode() local
2542 journal = transaction->t_journal; in jbd2_journal_file_inode()
2545 transaction->t_tid); in jbd2_journal_file_inode()
2559 if (jinode->i_transaction == transaction || in jbd2_journal_file_inode()
2560 jinode->i_next_transaction == transaction) in jbd2_journal_file_inode()
2568 if (!transaction->t_need_data_flush) in jbd2_journal_file_inode()
2569 transaction->t_need_data_flush = 1; in jbd2_journal_file_inode()
2570 /* On some different transaction's list - should be in jbd2_journal_file_inode()
2576 jinode->i_next_transaction = transaction; in jbd2_journal_file_inode()
2579 /* Not on any transaction list... */ in jbd2_journal_file_inode()
2581 jinode->i_transaction = transaction; in jbd2_journal_file_inode()
2582 list_add(&jinode->i_list, &transaction->t_inode_list); in jbd2_journal_file_inode()
2617 * File truncate and transaction commit interact with each other in a
2618 * non-trivial way. If a transaction writing data block A is
2620 * written them. Otherwise if we crashed after the transaction with
2621 * write has committed but before the transaction with truncate has
2624 * part in case it is in the committing transaction.
2630 * committing the transaction after this function has been called but
2631 * before a transaction for truncate is started (and furthermore it
2633 * happens in the same transaction as write --- we don't have to write
2647 * enough that the transaction was not committing before we started in jbd2_journal_begin_ordered_truncate()
2648 * a transaction adding the inode to orphan list */ in jbd2_journal_begin_ordered_truncate()