diff --git a/include/spdk/reduce.h b/include/spdk/reduce.h index a35c5b998..220f2485c 100644 --- a/include/spdk/reduce.h +++ b/include/spdk/reduce.h @@ -230,4 +230,13 @@ 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); +/** + * Get the params structure for a libreduce compressed volume. + * + * This function will populate the given params structure for a given volume. + * + * \param vol Previously loaded or initialized compressed volume. + * \return params structure for the compressed volume. + */ +const struct spdk_reduce_vol_params *spdk_reduce_vol_get_params(struct spdk_reduce_vol *vol); #endif /* SPDK_REDUCE_H_ */ diff --git a/lib/reduce/reduce.c b/lib/reduce/reduce.c index e0331b5eb..a68b13560 100644 --- a/lib/reduce/reduce.c +++ b/lib/reduce/reduce.c @@ -1389,4 +1389,10 @@ spdk_reduce_vol_writev(struct spdk_reduce_vol *vol, } } +const struct spdk_reduce_vol_params * +spdk_reduce_vol_get_params(struct spdk_reduce_vol *vol) +{ + return &vol->params; +} + SPDK_LOG_REGISTER_COMPONENT("reduce", SPDK_LOG_REDUCE)