Parameters for lvolstore initialization. More...
#include <lvol.h>
Data Fields | |
uint32_t | cluster_sz |
Size of cluster in bytes. | |
enum lvs_clear_method | clear_method |
Clear method. | |
char | name [SPDK_LVS_NAME_MAX] |
Name of the lvolstore. | |
uint32_t | num_md_pages_per_cluster_ratio |
num_md_pages_per_cluster_ratio = 100 means 1 page per cluster | |
uint32_t | opts_size |
The size of spdk_lvol_opts according to the caller of this library is used for ABI compatibility. | |
spdk_bs_esnap_dev_create | esnap_bs_dev_create |
A function to be called to load external snapshots. | |
Parameters for lvolstore initialization.
Create clone of given non-lvol device.
The bdev that is being cloned is commonly called an external snapshot or esnap. The clone is commonly called an esnap clone.
esnap_id | The identifier that will be passed to the spdk_bs_esnap_dev_create callback. |
id_len | The length of esnap_id, in bytes. |
size_bytes | The size of the external snapshot device, in bytes. This must be an integer multiple of the lvolstore's cluster size. See cluster_sz in |
lvs | Handle to lvolstore. |
clone_name | Name of created clone. |
cb_fn | Completion callback. |
cb_arg | Completion callback custom arguments. |
cb_fn
will be used to report the completion status. If an error is encountered, a negative errno will be returned and cb_fn
will not be called. uint32_t spdk_lvs_opts::cluster_sz |
Size of cluster in bytes.
Must be multiple of 4KiB page size.
spdk_bs_esnap_dev_create spdk_lvs_opts::esnap_bs_dev_create |
A function to be called to load external snapshots.
If this is NULL while the lvolstore is being loaded, the lvolstore will not support external snapshots.
uint32_t spdk_lvs_opts::opts_size |
The size of spdk_lvol_opts according to the caller of this library is used for ABI compatibility.
The library uses this field to know how many fields in this structure are valid. And the library will populate any remaining fields with default values. After that, new added fields should be put in the end of the struct.