|
Motr
M0
|
Data Structures | |
| struct | m0_ios_start_sm |
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) |
State machine for start IO service
State machines execute general steps async:
| enum 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.
| M0_INTERNAL void m0_ios_start_lock | ( | struct m0_ios_start_sm * | ios_sm | ) |
Definition at line 111 of file ios_start_sm.c.


| 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.


| 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.


| 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
| 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.


| M0_INTERNAL void m0_ios_start_unlock | ( | struct m0_ios_start_sm * | ios_sm | ) |
Definition at line 116 of file ios_start_sm.c.

