Motr  M0
m0_be_log Struct Reference

#include <log.h>

Collaboration diagram for m0_be_log:
Collaboration graph

Data Fields

struct m0_be_log_cfg lg_cfg
 
bool lg_create_mode
 
bool lg_destroy_mode
 
struct m0_module lg_module
 
struct m0_be_log_store lg_store
 
struct m0_be_log_sched lg_sched
 
struct m0_be_recovery lg_recovery
 
struct m0_be_fmt_log_header lg_header
 
struct m0_tl lg_records
 
struct m0_mutex lg_record_state_lock
 
m0_bindex_t lg_current
 
m0_bindex_t lg_discarded
 
m0_bcount_t lg_free
 
m0_bcount_t lg_reserved
 
m0_bindex_t lg_prev_record
 
m0_bcount_t lg_prev_record_size
 
bool lg_unplaced_exists
 
m0_bindex_t lg_unplaced_pos
 
m0_bcount_t lg_unplaced_size
 
m0_be_log_got_space_cb_t lg_got_space_cb
 
struct m0_mutexlg_external_lock
 
struct m0_be_op lg_header_read_op
 
struct m0_be_op lg_header_write_op
 

Detailed Description

This structure encapsulates internals of transactional log.

Definition at line 261 of file log.h.

Field Documentation

◆ lg_cfg

struct m0_be_log_cfg lg_cfg

Definition at line 262 of file log.h.

◆ lg_create_mode

bool lg_create_mode

Definition at line 263 of file log.h.

◆ lg_current

m0_bindex_t lg_current

Logical offset of the reserved space within log

Definition at line 284 of file log.h.

◆ lg_destroy_mode

bool lg_destroy_mode

Definition at line 264 of file log.h.

◆ lg_discarded

m0_bindex_t lg_discarded

Logical offset of the first non-discarded log record

Definition at line 286 of file log.h.

◆ lg_external_lock

struct m0_mutex* lg_external_lock

Pointer to an external lock that synchronizes access to log's fields. Used only for the invariant.

Definition at line 310 of file log.h.

◆ lg_free

m0_bcount_t lg_free

Free space in the log

Definition at line 288 of file log.h.

◆ lg_got_space_cb

m0_be_log_got_space_cb_t lg_got_space_cb

Callback for notification about free space availability, so user can retry failed reservation.

Definition at line 305 of file log.h.

◆ lg_header

struct m0_be_fmt_log_header lg_header

Definition at line 278 of file log.h.

◆ lg_header_read_op

struct m0_be_op lg_header_read_op

Definition at line 312 of file log.h.

◆ lg_header_write_op

struct m0_be_op lg_header_write_op

Definition at line 314 of file log.h.

◆ lg_module

struct m0_module lg_module

Definition at line 265 of file log.h.

◆ lg_prev_record

m0_bindex_t lg_prev_record

Position of the last allocated record

Definition at line 292 of file log.h.

◆ lg_prev_record_size

m0_bcount_t lg_prev_record_size

Definition at line 293 of file log.h.

◆ lg_record_state_lock

struct m0_mutex lg_record_state_lock

Protects m0_be_log_record.lgr_state after the record is scheduled

Definition at line 282 of file log.h.

◆ lg_records

struct m0_tl lg_records

List of all non-discarded log_records. TODO remove it as unneeded

Definition at line 280 of file log.h.

◆ lg_recovery

struct m0_be_recovery lg_recovery

Definition at line 277 of file log.h.

◆ lg_reserved

m0_bcount_t lg_reserved

Reserved space in the log

Definition at line 290 of file log.h.

◆ lg_sched

struct m0_be_log_sched lg_sched

Scheduler

Definition at line 276 of file log.h.

◆ lg_store

struct m0_be_log_store lg_store

Underlying storage.

Todo:
this might be changed to something more complicated to support flexible deployment and grow-able logs. E.g., a log can be stored in a sequence of regions in segments, linked to each other through header blocks.

Definition at line 274 of file log.h.

◆ lg_unplaced_exists

bool lg_unplaced_exists

Indicates that there is a finalised/reset but not discarded log record. Log keeps pointer to such record with the least lsn.

Definition at line 298 of file log.h.

◆ lg_unplaced_pos

m0_bindex_t lg_unplaced_pos

Definition at line 299 of file log.h.

◆ lg_unplaced_size

m0_bcount_t lg_unplaced_size

Definition at line 300 of file log.h.


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