Motr  M0
IO Service State Machines

Data Structures

struct  m0_ios_start_sm
 

Enumerations

enum  m0_ios_start_state {
  M0_IOS_START_INIT, M0_IOS_START_CDOM_CREATE, M0_IOS_START_CDOM_CREATE_RES, M0_IOS_START_MKFS,
  M0_IOS_START_MKFS_RESULT, M0_IOS_START_BUFFER_POOL_CREATE, M0_IOS_START_FAILURE, M0_IOS_START_COMPLETE
}
 

Functions

M0_INTERNAL void m0_ios_start_lock (struct m0_ios_start_sm *ios_sm)
 
M0_INTERNAL void m0_ios_start_unlock (struct m0_ios_start_sm *ios_sm)
 
M0_INTERNAL int m0_ios_start_sm_init (struct m0_ios_start_sm *ios_sm, struct m0_reqh_service *service, struct m0_sm_group *grp)
 
M0_INTERNAL void m0_ios_start_sm_exec (struct m0_ios_start_sm *ios_sm)
 
M0_INTERNAL void m0_ios_start_sm_fini (struct m0_ios_start_sm *ios_sm)
 

Detailed Description

State machine for start IO service

See also
I/O Service Operations

State machines execute general steps async:

Enumeration Type Documentation

◆ m0_ios_start_state

IO service start SM states.

Note! BE TX create/open/close/destroy up to three times: create COB domain, create MKFS, init poolmachine

Enumerator
M0_IOS_START_INIT 

SM initial state. Next state is determined on whether COB domain is created or not. Get m0_get()->i_ios_cdom_key, if COB domain doesn't exist then open BE TX to create it, otherwise initialise COB domain.

M0_IOS_START_CDOM_CREATE 

Create COB domain, close BE TX

M0_IOS_START_CDOM_CREATE_RES 

If COM domain is created then open BE TX for create MKFS else create poolmachine and start BE TX for fill poolmachine

M0_IOS_START_MKFS 

Create MKFS, close BE TX

M0_IOS_START_MKFS_RESULT 

Create poolmachine

M0_IOS_START_BUFFER_POOL_CREATE 

Create buffer pool and get filesystem conf object

M0_IOS_START_FAILURE 

Handle errors from other states

M0_IOS_START_COMPLETE 

Finish state

Definition at line 91 of file ios_start_sm.h.

Function Documentation

◆ m0_ios_start_lock()

M0_INTERNAL void m0_ios_start_lock ( struct m0_ios_start_sm ios_sm)

Definition at line 111 of file ios_start_sm.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ios_start_sm_exec()

M0_INTERNAL void m0_ios_start_sm_exec ( struct m0_ios_start_sm ios_sm)

Execute IO service start SM. User is expected to wait until ios_sm->ism_sm.sm_state is in (M0_IOS_START_COMPLETE, M0_IOS_START_FAILURE).

Definition at line 211 of file ios_start_sm.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ios_start_sm_fini()

M0_INTERNAL void m0_ios_start_sm_fini ( struct m0_ios_start_sm ios_sm)

Finalize IO service start SM.

Definition at line 463 of file ios_start_sm.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ios_start_sm_init()

M0_INTERNAL int m0_ios_start_sm_init ( struct m0_ios_start_sm ios_sm,
struct m0_reqh_service service,
struct m0_sm_group grp 
)

Initialize IO service start State machine

Parameters
ios_sm- IO service start State machine instance
service- IO service
grp- m0_sm_group for initialize ios_sm->ism_sm

Definition at line 190 of file ios_start_sm.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ios_start_unlock()

M0_INTERNAL void m0_ios_start_unlock ( struct m0_ios_start_sm ios_sm)

Definition at line 116 of file ios_start_sm.c.

Here is the call graph for this function:
Here is the caller graph for this function: