Core Creation
Function
Creates ocf core resources corresponding to a new slot. Each ocf core corresponds to a unique slot. This interface processes requests asynchronously.
Implementation Method
int ocf_add_core(uint32_t slot_id);
Parameters
Parameter |
Data Type |
Input/Output |
Description |
|---|---|---|---|
slot_id |
uint32_t |
Input |
Slot ID, which is globally unique. |
Return Values
STATE_SUCCESS: The ocf core is successfully created.
STATE_OCF_UNAVAILABLE: ocf is unavailable. For example, ocf is not initialized or is being restored.
STATE_CORE_EXIST: The core corresponding to the slot has been created.
STATE_MEM_ALLOC_ERR: The memory is insufficient or memory allocation failed.
STATE_FAIL: The core fails to be created.