Lines Matching refs:transaction

128 // We'll opt to flush a transaction if it contains at least
158 static void finish_end_thread(transaction *tr);
160 static int finish_end_transaction(transaction *tr, errno_t (*callback)(void*), void *callback_arg);
161 static int end_transaction(transaction *tr, int force_it, errno_t (*callback)(void*), void *callback_arg, boolean_t drop_lock, boolean_t must_wait);
162 static void abort_transaction(journal *jnl, transaction *tr);
222 panic("%s:%d: null transaction ptr?\n", __FILE__, __LINE__); \
249 // headers that are at the start of each transaction.
490 // a future transaction doesn't sneak out to disk before
516 transaction *tr, *next;
537 FREE_ZONE(tr, sizeof(transaction), M_JNL_TR);
552 transaction *tr;
554 transaction *ctr, *prev=NULL, *next;
564 tr = (transaction *)arg;
592 // if this transaction isn't done yet, just return as
604 // this will single thread checking the transaction
614 // cleanup for this transaction
636 // to reflect that this transaction is complete
685 // transaction list.
1501 // size up the transaction buffer... can't be larger than the number
1751 // as it's not a valid transaction header. since we have
2213 transaction *tr = jnl->cur_tr;
2256 transaction *tr;
2288 transaction *ctr;
2345 // make sure there's space in the journal to hold this transaction
2362 // entries until there is enough space for the next transaction.
2415 // transaction in the old_start array. if we didn't do
2446 * Allocate a new active transaction.
2451 transaction *tr;
2453 MALLOC_ZONE(tr, transaction *, sizeof(transaction), M_JNL_TR, M_WAITOK);
2454 memset(tr, 0, sizeof(transaction));
2459 FREE_ZONE(tr, sizeof(transaction), M_JNL_TR);
2524 printf("jnl: %s: start transaction failed: no space\n", jnl->jdev_name);
2532 // if there's a buffered transaction, use it.
2561 transaction *tr;
2582 panic("jnl: modify_block_start: called w/out a transaction! jnl %p, owner %p, curact %p\n",
2638 // make sure that this transaction isn't bigger than the whole journal
2640 panic("jnl: transaction too big (%d >= %lld bytes, bufsize %d, tr %p bp %p)\n",
2647 // (presumably) to another transaction.
2669 transaction *tr;
2680 // if there's no active transaction then we just want to
2698 panic("jnl: modify_block_abort: called w/out a transaction! jnl %p, owner %p, curact %p\n",
2704 // first check if it's already part of this transaction
2719 // called on it as part of the current transaction. that means that
2739 transaction *tr;
2755 panic("jnl: modify_block_end: called w/out a transaction! jnl %p, owner %p, curact %p\n",
2766 // first check if it's already part of this transaction
2875 transaction *tr;
2889 panic("jnl: modify_block_end: called w/out a transaction! jnl %p, owner %p, curact %p\n",
2900 * first check if it's already part of this transaction
2916 // transaction then journal_modify_block_start() should
2950 ; is, the transaction has been flushed to the device, and the
2951 ; blocks freed by the transaction are now safe for reuse.
3083 ; transaction. If the underlying device supports TRIM (UNMAP),
3085 ; transaction has been written to the journal. (For example,
3092 ; only after the transaction that freed them is committed to
3094 ; a way that causes data loss if a transaction never gets
3107 transaction *tr;
3126 panic("jnl: trim_add_extent: called w/out a transaction! jnl %p, owner %p, curact %p\n",
3227 ; these extents will not be trimmed/unmapped when the transaction
3358 ; this transaction, or a pending trim of a transaction being
3371 transaction *tr;
3387 panic("jnl: trim_remove_extent: called w/out a transaction! jnl %p, owner %p, curact %p\n",
3435 journal_trim_flush(journal *jnl, transaction *tr)
3478 * If the transaction we're flushing was the async transaction, then
3479 * tell the current transaction that there is no pending trim
3534 * End a transaction. If the transaction is small enough, and we're not forcing
3535 * a write to disk, the "active" transaction becomes the "current" transaction,
3536 * and will be reused for the next transaction that is started (group commit).
3538 * If the transaction gets written to disk (because force_it is true, or no
3539 * group commit, or the transaction is sufficiently full), the blocks get
3541 * those async writes complete, the transaction can be freed and removed from
3549 * Note that the callback is only called if the transaction gets written to
3555 * force_it If true, force this transaction to the on-disk journal immediately.
3564 end_transaction(transaction *tr, int force_it, errno_t (*callback)(void*), void *callback_arg, boolean_t drop_lock, boolean_t must_wait)
3579 // if there weren't any modified blocks in the transaction
3580 // just save off the transaction pointer and return.
3586 // if our transaction buffer isn't very full, just hang
3589 // transaction buffer if it's full or if we have more than
3618 * need to notice and abort the current transaction
3630 * Store a pointer to this transaction's trim list so that
3646 * snapshot the transaction sequence number while we are still behind
3648 * next transaction group which may overlap the current journal flush...
3657 * if we're here we're going to flush the transaction buffer to disk.
3659 * space for this transaction in the journal and jnl->old_start[0]
3688 // this transaction starts where the current journal ends
3767 * copy the data into the transaction buffer...
3824 * fire up a thread to complete processing this transaction
3841 finish_end_thread(transaction *tr)
3866 finish_end_transaction(transaction *tr, errno_t (*callback)(void*), void *callback_arg)
3917 printf("jnl: %s: end_tr: bad news! bp @ %p w/null vp and l/blkno = %qd/%qd. aborting the transaction (tr %p jnl %p).\n",
4008 tr->journal_end = end; // the transaction ends here too
4030 // Send a DKIOCUNMAP for the extents trimmed by this transaction, and
4094 * transaction to be freed... so, move it to the garbage
4189 abort_transaction(journal *jnl, transaction *tr)
4273 * If the transaction we're aborting was the async transaction, then
4274 * tell the current transaction that there is no pending trim
4292 FREE_ZONE(tr, sizeof(transaction), M_JNL_TR);
4302 transaction *tr;
4404 transaction *tr = jnl->cur_tr;
4474 * You must have already started a transaction. The transaction may contain
4478 * transaction will be flushed to the old journal. The new journal will be
4479 * initialized, and the blocks from the active transaction will be written to
4484 * callback routine. These updates must NOT go into a transaction. You should
4487 * or the new journal will be found with the contents of the active transaction.
4489 * Upon return from the callback, the blocks from the active transaction are
4496 * Upon return, there is still an active transaction: newly allocated, and
4505 * tbuffer_size The new desired transaction buffer size. Pass zero to keep
4509 * and the active transaction written to the new journal, but
4526 transaction *tr;
4530 * Sanity check inputs, and adjust the size of the transaction buffer.
4545 /* Guarantee we own the active transaction. */
4560 * active transaction to make journal_flush flush out non-active but
4578 * out the old_start array. If we do not, then if the last written transaction
4597 * Force the active transaction to be written to the new journal. Call the
4609 * Create a new, empty transaction to be the active transaction. This way
4614 printf("jnl: %s: relocate: could not allocate new transaction (%d)\n", jnl->jdev_name, ret);