Motr  M0
m0_fom Struct Reference

#include <fom.h>

Collaboration diagram for m0_fom:
Collaboration graph

Data Fields

struct m0_fom_localityfo_loc
 
size_t fo_loc_idx
 
const struct m0_fom_typefo_type
 
const struct m0_fom_opsfo_ops
 
struct m0_fom_callback fo_cb
 
struct m0_fopfo_fop
 
struct m0_fopfo_rep_fop
 
struct m0_dtx fo_tx
 
bool fo_local
 
struct m0_reqh_servicefo_service
 
struct m0_tlink fo_linkage
 
unsigned fo_transitions
 
unsigned fo_transitions_saved
 
struct m0_sm fo_sm_phase
 
struct m0_sm fo_sm_state
 
struct m0_loc_threadfo_thread
 
struct m0_fom_callbackfo_pending
 
int fo_log [32]
 
uint64_t fo_magic
 

Detailed Description

Fop state machine.

Once the fom is initialised, fom invariant, should hold true as fom execution enters various phases, including before fom is finalised.

m0_fom is usually embedded into an ambient fom-type-specific object allocated by m0_fom_type_ops::fto_create() or other means.

m0_fom is geared towards supporting foms executing file operation requests (fops), but can be used for any kind of server activity.

See also
m0_fom_invariant()

Definition at line 481 of file fom.h.

Field Documentation

◆ fo_cb

struct m0_fom_callback fo_cb

AST call-back to wake up the FOM

Definition at line 488 of file fom.h.

◆ fo_fop

struct m0_fop* fo_fop

Request fop object, this fom belongs to

Definition at line 490 of file fom.h.

◆ fo_linkage

struct m0_tlink fo_linkage

FOM linkage in the locality runq list or wait list Every access to the FOM via this linkage is protected by the m0_fom_locality::fl_group.s_lock mutex.

Definition at line 511 of file fom.h.

◆ fo_loc

struct m0_fom_locality* fo_loc

Locality this fom belongs to

Definition at line 483 of file fom.h.

◆ fo_loc_idx

size_t fo_loc_idx

Definition at line 484 of file fom.h.

◆ fo_local

bool fo_local

Set when the fom is used to execute local operation, e.g., undo or redo during recovery.

Definition at line 503 of file fom.h.

◆ fo_log

int fo_log[32]

Definition at line 532 of file fom.h.

◆ fo_magic

uint64_t fo_magic

Definition at line 534 of file fom.h.

◆ fo_ops

const struct m0_fom_ops* fo_ops

Definition at line 486 of file fom.h.

◆ fo_pending

struct m0_fom_callback* fo_pending

Stack of pending call-backs.

Definition at line 530 of file fom.h.

◆ fo_rep_fop

struct m0_fop* fo_rep_fop

Reply fop object

Definition at line 492 of file fom.h.

◆ fo_service

struct m0_reqh_service* fo_service

Pointer to service instance.

Definition at line 505 of file fom.h.

◆ fo_sm_phase

struct m0_sm fo_sm_phase

State machine for generic and specfic FOM phases. sm_rc contains result of fom execution, -errno on failure.

Definition at line 522 of file fom.h.

◆ fo_sm_state

struct m0_sm fo_sm_state

State machine for FOM states.

Definition at line 524 of file fom.h.

◆ fo_thread

struct m0_loc_thread* fo_thread

Thread executing current phase transition.

Definition at line 526 of file fom.h.

◆ fo_transitions

unsigned fo_transitions

Transitions counter, coresponds to the number of m0_fom_ops::fo_state() calls

Definition at line 514 of file fom.h.

◆ fo_transitions_saved

unsigned fo_transitions_saved

Counter of transitions, used to ensure FOM was inactive, while waiting for a longlock.

Definition at line 517 of file fom.h.

◆ fo_tx

struct m0_dtx fo_tx

Transaction object to be used by this fom.

See also
m0_fom_tx(), m0_fom_tx_credit()

Definition at line 498 of file fom.h.

◆ fo_type

const struct m0_fom_type* fo_type

Definition at line 485 of file fom.h.


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