Motr  M0
m0_be_tx Struct Reference

#include <tx.h>

Collaboration diagram for m0_be_tx:
Collaboration graph

Data Fields

struct m0_sm t_sm
 
uint64_t t_id
 
struct m0_be_enginet_engine
 
struct m0_be_domaint_dom
 
struct m0_tlink t_engine_linkage
 
struct m0_tlink t_group_linkage
 
uint64_t t_magic
 
struct m0_be_tx_credit t_prepared
 
struct m0_be_reg_area t_reg_area
 
m0_be_tx_cb_t t_persistent
 
m0_be_tx_cb_t t_discarded
 
void(* t_filler )(struct m0_be_tx *tx, void *payload)
 
void * t_datum
 
uint64_t t_lsn
 
m0_bindex_t t_lsn_discarded
 
struct m0_buf t_payload
 
m0_bcount_t t_payload_prepared
 
struct m0_sm_ast t_ast_grouping
 
struct m0_sm_ast t_ast_active
 
struct m0_sm_ast t_ast_failed
 
struct m0_sm_ast t_ast_logged
 
struct m0_sm_ast t_ast_placed
 
struct m0_sm_ast t_ast_done
 
struct m0_be_tx_groupt_group
 
uint32_t t_ref
 
bool t_log_reserved
 
m0_bcount_t t_log_reserved_size
 
bool t_fast
 
bool t_exclusive
 
bool t_gc_enabled
 
void(* t_gc_free )(struct m0_be_tx *tx, void *param)
 
void * t_gc_param
 
struct m0_tlink t_first_capture_linkage
 
bool t_recovering
 
bool t_grouped
 
struct m0_atomic64 t_fdmi_ref
 
struct m0_tlink t_fdmi_linkage
 
struct m0_sm_ast t_fdmi_put_ast
 

Detailed Description

Transaction.

Definition at line 280 of file tx.h.

Field Documentation

◆ t_ast_active

struct m0_sm_ast t_ast_active

Definition at line 367 of file tx.h.

◆ t_ast_done

struct m0_sm_ast t_ast_done

Definition at line 371 of file tx.h.

◆ t_ast_failed

struct m0_sm_ast t_ast_failed

Definition at line 368 of file tx.h.

◆ t_ast_grouping

struct m0_sm_ast t_ast_grouping

Definition at line 366 of file tx.h.

◆ t_ast_logged

struct m0_sm_ast t_ast_logged

Definition at line 369 of file tx.h.

◆ t_ast_placed

struct m0_sm_ast t_ast_placed

Definition at line 370 of file tx.h.

◆ t_datum

void* t_datum

User-specified value, associated with the transaction. Transaction engine doesn't interpret this value. It can be used to pass additional information to the call-backs.

Definition at line 339 of file tx.h.

◆ t_discarded

m0_be_tx_cb_t t_discarded

This optional call-back is called when a stable transaction is about to be discarded from the history.

A typical user of this call-back is ioservice that uses ->t_discarded to initiate a new transaction to free storage space used by the COW-ed file extents.

Definition at line 318 of file tx.h.

◆ t_dom

struct m0_be_domain* t_dom

The BE domain can't be changed during the entire lifetime of the transaction, so it's safe to read this field at any moment between m0_be_tx_init() is called and the transaction is finalised.

Definition at line 291 of file tx.h.

◆ t_engine

struct m0_be_engine* t_engine

Definition at line 285 of file tx.h.

◆ t_engine_linkage

struct m0_tlink t_engine_linkage

Linkage in one of m0_be_tx_engine::eng_txs[] lists.

Definition at line 294 of file tx.h.

◆ t_exclusive

bool t_exclusive

Flag indicates that this transaction was opened with m0_be_tx_exclusive_open().

Definition at line 388 of file tx.h.

◆ t_fast

bool t_fast

Flag indicates that tx_group should be closed immediately

Todo:
Remove when m0_be_tx_close_sync() is removed

Definition at line 383 of file tx.h.

◆ t_fdmi_linkage

struct m0_tlink t_fdmi_linkage

Locked txn list. Used in FOL FDMI source implementation.

_ini and _fini is done in fdmi fol source code.

Definition at line 418 of file tx.h.

◆ t_fdmi_put_ast

struct m0_sm_ast t_fdmi_put_ast

Used by FOL source to put tx when FDMI finishes with it.

Todo:
Will be fixed when proper refcounting is implemented in second phase of FDMI work.

Definition at line 424 of file tx.h.

◆ t_fdmi_ref

struct m0_atomic64 t_fdmi_ref

FDMI reference counter. Used in FOL FDMI source implementation.

Todo:
Fix this when proper refcounting is implemented.

Definition at line 412 of file tx.h.

◆ t_filler

void(* t_filler) (struct m0_be_tx *tx, void *payload)

XXX update. An optional call-back called when the transaction is being closed.

"payload" parameter is the pointer to a m0_be_tx::t_payload_size-d buffer, that will be written to the log.

->t_filler() can capture regions in the transaction.

A typical use of this call-back is to form a "fol record" used by DTM for distributed transaction management.

Definition at line 332 of file tx.h.

◆ t_first_capture_linkage

struct m0_tlink t_first_capture_linkage
See also
m0_be_engine::eng_tx_first_capture

Definition at line 396 of file tx.h.

◆ t_gc_enabled

bool t_gc_enabled
See also
m0_be_tx_gc_enable().

Definition at line 392 of file tx.h.

◆ t_gc_free

void(* t_gc_free) (struct m0_be_tx *tx, void *param)

Definition at line 393 of file tx.h.

◆ t_gc_param

void* t_gc_param

Definition at line 394 of file tx.h.

◆ t_group

struct m0_be_tx_group* t_group

Definition at line 372 of file tx.h.

◆ t_group_linkage

struct m0_tlink t_group_linkage

Linkage in m0_be_tx_group::tg_txs.

Definition at line 296 of file tx.h.

◆ t_grouped

bool t_grouped

Set by engine when tx is grouped. Prevents the tx from grouping twice.

Definition at line 407 of file tx.h.

◆ t_id

uint64_t t_id

Transaction identifier, assigned by the engine.

Definition at line 284 of file tx.h.

◆ t_log_reserved

bool t_log_reserved

Set when space in log is reserved by engine.

Definition at line 376 of file tx.h.

◆ t_log_reserved_size

m0_bcount_t t_log_reserved_size

Definition at line 378 of file tx.h.

◆ t_lsn

uint64_t t_lsn

lsn of transaction representation in the log. Assigned when the transaction reaches GROUPED state.

Definition at line 344 of file tx.h.

◆ t_lsn_discarded

m0_bindex_t t_lsn_discarded

No BE transaction with lsn less than this is going to be recovered by BE recovery.

See also
m0_be_log_record::lgr_log_header_discarded.

Definition at line 350 of file tx.h.

◆ t_magic

uint64_t t_magic

Definition at line 297 of file tx.h.

◆ t_payload

struct m0_buf t_payload

Payload area.

  • memory for the payload area is managed by the transaction. It is allocated when transaction opens and it is deallocated inside m0_be_tx_fini();
  • user should call m0_be_tx_payload_prep() at M0_BTS_PREPARE state to accumulate payload area size.
Todo:

Don't allocate m0_be_tx::t_payload separately. Use m0_be_tx_group preallocated payload area.

Use m0_be_tx::t_filler callback to fill m0_be_tx::t_payload.

Definition at line 364 of file tx.h.

◆ t_payload_prepared

m0_bcount_t t_payload_prepared

Definition at line 365 of file tx.h.

◆ t_persistent

m0_be_tx_cb_t t_persistent

Optional call-back called when the transaction is guaranteed to survive all further failures. This is invoked upon log IO completion.

Definition at line 308 of file tx.h.

◆ t_prepared

struct m0_be_tx_credit t_prepared

Updates prepared for at PREPARE state.

Definition at line 300 of file tx.h.

◆ t_recovering

bool t_recovering

Minimal generation index for all captured regions.

This field is set and managed by engine.

Definition at line 402 of file tx.h.

◆ t_ref

uint32_t t_ref

Reference counter.

Definition at line 374 of file tx.h.

◆ t_reg_area

struct m0_be_reg_area t_reg_area

Definition at line 301 of file tx.h.

◆ t_sm

struct m0_sm t_sm

Definition at line 281 of file tx.h.


The documentation for this struct was generated from the following file: