Commit 6dc095c4 authored by paul luse's avatar paul luse Committed by Jim Harris
Browse files

lib/reduce: add new API to retrieve volume parameters



Change-Id: Ic10812e7ababbec2964ee26ce7ffad28bd0daad5
Signed-off-by: default avatarpaul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452905


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 59467b3a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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_ */
+6 −0
Original line number Diff line number Diff line
@@ -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)