SPDK block compression.
More...
|
#define | REDUCE_MAX_IOVECS 33 |
|
|
typedef void(* | spdk_reduce_vol_op_complete) (void *ctx, int reduce_errno) |
|
typedef void(* | spdk_reduce_vol_op_with_handle_complete) (void *ctx, struct spdk_reduce_vol *vol, int reduce_errno) |
|
typedef void(* | spdk_reduce_dev_cpl) (void *cb_arg, int reduce_errno) |
| Defines function type for callback functions called when backing_dev operations are complete. More...
|
|
|
const struct spdk_uuid * | spdk_reduce_vol_get_uuid (struct spdk_reduce_vol *vol) |
| Get the UUID for a libreduce compressed volume. More...
|
|
void | spdk_reduce_vol_init (struct spdk_reduce_vol_params *params, struct spdk_reduce_backing_dev *backing_dev, const char *pm_file_dir, spdk_reduce_vol_op_with_handle_complete cb_fn, void *cb_arg) |
| Initialize a new libreduce compressed volume. More...
|
|
void | spdk_reduce_vol_load (struct spdk_reduce_backing_dev *backing_dev, spdk_reduce_vol_op_with_handle_complete cb_fn, void *cb_arg) |
| Load an existing libreduce compressed volume. More...
|
|
void | spdk_reduce_vol_unload (struct spdk_reduce_vol *vol, spdk_reduce_vol_op_complete cb_fn, void *cb_arg) |
| Unload a previously initialized or loaded libreduce compressed volume. More...
|
|
void | spdk_reduce_vol_destroy (struct spdk_reduce_backing_dev *backing_dev, spdk_reduce_vol_op_complete cb_fn, void *cb_arg) |
| Destroy an existing libreduce compressed volume. More...
|
|
void | spdk_reduce_vol_readv (struct spdk_reduce_vol *vol, struct iovec *iov, int iovcnt, uint64_t offset, uint64_t length, spdk_reduce_vol_op_complete cb_fn, void *cb_arg) |
| Read data from a libreduce compressed volume. More...
|
|
void | spdk_reduce_vol_writev (struct spdk_reduce_vol *vol, struct iovec *iov, int iovcnt, uint64_t offset, uint64_t length, spdk_reduce_vol_op_complete cb_fn, void *cb_arg) |
| Write data to a libreduce compressed volume. More...
|
|
const struct spdk_reduce_vol_params * | spdk_reduce_vol_get_params (struct spdk_reduce_vol *vol) |
| Get the params structure for a libreduce compressed volume. More...
|
|
void | spdk_reduce_vol_print_info (struct spdk_reduce_vol *vol) |
| Dump out key information for a libreduce compressed volume and its PMEM. More...
|
|
◆ spdk_reduce_dev_cpl
typedef void(* spdk_reduce_dev_cpl) (void *cb_arg, int reduce_errno) |
Defines function type for callback functions called when backing_dev operations are complete.
- Parameters
-
cb_arg | Callback argument |
reduce_errno | Completion status of backing_dev operation Negative values indicate negated errno value 0 indicates successful readv/writev/unmap operation Positive value indicates successful compress/decompress operations; number indicates number of bytes written to destination iovs |
◆ spdk_reduce_vol_destroy()
void spdk_reduce_vol_destroy |
( |
struct spdk_reduce_backing_dev * |
backing_dev, |
|
|
spdk_reduce_vol_op_complete |
cb_fn, |
|
|
void * |
cb_arg |
|
) |
| |
Destroy an existing libreduce compressed volume.
This will zero the metadata region on the backing device and delete the associated pm metadata file. If the backing device does not contain a compressed volume, the cb_fn will be called with error status without modifying the backing device nor deleting a pm file.
- Parameters
-
backing_dev | Structure describing the backing device containing the compressed volume. |
cb_fn | Callback function to signal completion of the destruction process. |
cb_arg | Argument to pass to the callback function. |
◆ spdk_reduce_vol_get_params()
Get the params structure for a libreduce compressed volume.
This function will populate the given params structure for a given volume.
- Parameters
-
vol | Previously loaded or initialized compressed volume. |
- Returns
- params structure for the compressed volume.
◆ spdk_reduce_vol_get_uuid()
const struct spdk_uuid* spdk_reduce_vol_get_uuid |
( |
struct spdk_reduce_vol * |
vol | ) |
|
Get the UUID for a libreduce compressed volume.
- Parameters
-
vol | Previously loaded or initialized compressed volume. |
- Returns
- UUID for the compressed volume.
◆ spdk_reduce_vol_init()
Initialize a new libreduce compressed volume.
- Parameters
-
params | Parameters for the new volume. |
backing_dev | Structure describing the backing device to use for the new volume. |
pm_file_dir | Directory to use for creation of the persistent memory file to use for the new volume. This function will append the UUID as the filename to create in this directory. |
cb_fn | Callback function to signal completion of the initialization process. |
cb_arg | Argument to pass to the callback function. |
◆ spdk_reduce_vol_load()
void spdk_reduce_vol_load |
( |
struct spdk_reduce_backing_dev * |
backing_dev, |
|
|
spdk_reduce_vol_op_with_handle_complete |
cb_fn, |
|
|
void * |
cb_arg |
|
) |
| |
Load an existing libreduce compressed volume.
- Parameters
-
backing_dev | Structure describing the backing device containing the compressed volume. |
cb_fn | Callback function to signal completion of the loading process. |
cb_arg | Argument to pass to the callback function. |
◆ spdk_reduce_vol_print_info()
void spdk_reduce_vol_print_info |
( |
struct spdk_reduce_vol * |
vol | ) |
|
Dump out key information for a libreduce compressed volume and its PMEM.
This function will print key information for a given volume its PMEM.
- Parameters
-
vol | Previously loaded or initialized compressed volume. |
◆ spdk_reduce_vol_readv()
void spdk_reduce_vol_readv |
( |
struct spdk_reduce_vol * |
vol, |
|
|
struct iovec * |
iov, |
|
|
int |
iovcnt, |
|
|
uint64_t |
offset, |
|
|
uint64_t |
length, |
|
|
spdk_reduce_vol_op_complete |
cb_fn, |
|
|
void * |
cb_arg |
|
) |
| |
Read data from a libreduce compressed volume.
This function will only read from logical blocks on the comparessed volume that fall within the same chunk.
- Parameters
-
vol | Volume to read data. |
iov | iovec array describing the data to be read |
iovcnt | Number of elements in the iovec array |
offset | Offset (in logical blocks) to read the data on the compressed volume |
length | Length (in logical blocks) of the data to read |
cb_fn | Callback function to signal completion of the readv operation. |
cb_arg | Argument to pass to the callback function. |
◆ spdk_reduce_vol_unload()
void spdk_reduce_vol_unload |
( |
struct spdk_reduce_vol * |
vol, |
|
|
spdk_reduce_vol_op_complete |
cb_fn, |
|
|
void * |
cb_arg |
|
) |
| |
Unload a previously initialized or loaded libreduce compressed volume.
- Parameters
-
vol | Volume to unload. |
cb_fn | Callback function to signal completion of the unload process. |
cb_arg | Argument to pass to the callback function. |
◆ spdk_reduce_vol_writev()
void spdk_reduce_vol_writev |
( |
struct spdk_reduce_vol * |
vol, |
|
|
struct iovec * |
iov, |
|
|
int |
iovcnt, |
|
|
uint64_t |
offset, |
|
|
uint64_t |
length, |
|
|
spdk_reduce_vol_op_complete |
cb_fn, |
|
|
void * |
cb_arg |
|
) |
| |
Write data to a libreduce compressed volume.
This function will only write to logical blocks on the comparessed volume that fall within the same chunk.
- Parameters
-
vol | Volume to write data. |
iov | iovec array describing the data to be written |
iovcnt | Number of elements in the iovec array |
offset | Offset (in logical blocks) to write the data on the compressed volume |
length | Length (in logical blocks) of the data to write |
cb_fn | Callback function to signal completion of the writev operation. |
cb_arg | Argument to pass to the callback function. |