libstoragemgmt_blockrange.h File Reference
#include "libstoragemgmt_common.h"
Go to the source code of this file.
Function Documentation
uint64_t LSM_DLL_EXPORT lsm_block_range_block_count_get |
( |
lsm_block_range * |
br |
) |
|
Retrieves the number of blocks to replicate.
- Parameters:
-
| br | Valid block range pointer |
- Returns:
- value of number of blocks
uint64_t LSM_DLL_EXPORT lsm_block_range_dest_start_get |
( |
lsm_block_range * |
br |
) |
|
Retrieves the dest block address.
- Parameters:
-
| br | Valid block range pointer |
- Returns:
- value of dest start.
lsm_block_range LSM_DLL_EXPORT* lsm_block_range_record_alloc |
( |
uint64_t |
source_start, |
|
|
uint64_t |
dest_start, |
|
|
uint64_t |
block_count | |
|
) |
| | |
Creates memory for opaque data type to store a block range
- Parameters:
-
| source_start | Source block number to replicate from |
| dest_start | Dest block number to replicate to |
| block_count | Number of blocks to replicate |
- Returns:
- Valid block range ptr, otherwise NULL
lsm_block_range LSM_DLL_EXPORT** lsm_block_range_record_array_alloc |
( |
uint32_t |
size |
) |
|
Allocates storage for an array of block ranges.
- Parameters:
-
| size | Number of elements to store. |
- Returns:
- Pointer to memory for array of block ranges.
int LSM_DLL_EXPORT lsm_block_range_record_array_free |
( |
lsm_block_range * |
br[], |
|
|
uint32_t |
size | |
|
) |
| | |
Frees the memory for the array and all records contained in it.
- Parameters:
-
| br | Array of block ranges to free |
| size | Number of elements in array. |
- Returns:
- LSM_ERR_OK on success, else error reason.
Copies a block range.
- Parameters:
-
| source | Source of the copy |
- Returns:
- copy of source
Frees a block range record.
- Parameters:
-
- Returns:
- LSM_ERR_OK on success, else error reason.
uint64_t LSM_DLL_EXPORT lsm_block_range_source_start_get |
( |
lsm_block_range * |
br |
) |
|
Retrieves the source block address.
- Parameters:
-
| br | Valid block range pointer |
- Returns:
- value of source start.