bdev: move spdk_bdev_set_qos_limit_iops declaration

This function was logically out of place a bit - it split
up all of the functions that can submit an spdk_bdev_io.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ied601034d7cc73092b62537f1178337dafdb62c2

Reviewed-on: https://review.gerrithub.io/415030
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Jim Harris 2018-06-12 09:27:25 -07:00
parent 7409664cae
commit 58528ca799

View File

@ -338,6 +338,17 @@ uint64_t spdk_bdev_get_num_blocks(const struct spdk_bdev *bdev);
*/ */
uint64_t spdk_bdev_get_qos_ios_per_sec(struct spdk_bdev *bdev); uint64_t spdk_bdev_get_qos_ios_per_sec(struct spdk_bdev *bdev);
/**
* Set an IOPS-based quality of service rate limit on a bdev.
*
* \param bdev Block device.
* \param ios_per_sec I/O per second limit.
* \param cb_fn Callback function to be called when the QoS limit has been updated.
* \param cb_arg Argument to pass to cb_fn.
*/
void spdk_bdev_set_qos_limit_iops(struct spdk_bdev *bdev, uint64_t ios_per_sec,
void (*cb_fn)(void *cb_arg, int status), void *cb_arg);
/** /**
* Get minimum I/O buffer address alignment for a bdev. * Get minimum I/O buffer address alignment for a bdev.
* *
@ -737,17 +748,6 @@ int spdk_bdev_flush_blocks(struct spdk_bdev_desc *desc, struct spdk_io_channel *
int spdk_bdev_reset(struct spdk_bdev_desc *desc, struct spdk_io_channel *ch, int spdk_bdev_reset(struct spdk_bdev_desc *desc, struct spdk_io_channel *ch,
spdk_bdev_io_completion_cb cb, void *cb_arg); spdk_bdev_io_completion_cb cb, void *cb_arg);
/**
* Set an IOPS-based quality of service rate limit on a bdev.
*
* \param bdev Block device.
* \param ios_per_sec I/O per second limit.
* \param cb_fn Callback function to be called when the QoS limit has been updated.
* \param cb_arg Argument to pass to cb_fn.
*/
void spdk_bdev_set_qos_limit_iops(struct spdk_bdev *bdev, uint64_t ios_per_sec,
void (*cb_fn)(void *cb_arg, int status), void *cb_arg);
/** /**
* Submit an NVMe Admin command to the bdev. This passes directly through * Submit an NVMe Admin command to the bdev. This passes directly through
* the block layer to the device. Support for NVMe passthru is optional, * the block layer to the device. Support for NVMe passthru is optional,