Loading...
Searching...
No Matches
spdk_lvs_opts Struct Reference

Parameters for lvolstore initialization. More...

#include <lvol.h>

Collaboration diagram for spdk_lvs_opts:

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.
 

Detailed Description

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.

Parameters
esnap_idThe identifier that will be passed to the spdk_bs_esnap_dev_create callback.
id_lenThe length of esnap_id, in bytes.
size_bytesThe size of the external snapshot device, in bytes. This must be an integer multiple of the lvolstore's cluster size. See cluster_sz in
lvsHandle to lvolstore.
clone_nameName of created clone.
cb_fnCompletion callback.
cb_argCompletion callback custom arguments.
Returns
0 if parameters pass verification checks and the esnap creation is started, in which case the 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.

Field Documentation

◆ cluster_sz

uint32_t spdk_lvs_opts::cluster_sz

Size of cluster in bytes.

Must be multiple of 4KiB page size.

◆ esnap_bs_dev_create

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.

◆ opts_size

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.


The documentation for this struct was generated from the following file: