sma: report device level QoS capabilities for virtio-blk.
Virtio-blk supports one to one mapping between devices and volumes. Based on that, we can report underlying bdev capabilities as device level QoS capabilities. Signed-off-by: Artsiom Koltun <artsiom.koltun@intel.com> Change-Id: If7c28c75d087fecec0105002994581fd7ac57f51 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15260 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
51ab849bdf
commit
29416c0a54
@ -219,4 +219,6 @@ class VhostBlkDeviceManager(DeviceManager):
|
|||||||
'Failed to set QoS')
|
'Failed to set QoS')
|
||||||
|
|
||||||
def get_qos_capabilities(self, request):
|
def get_qos_capabilities(self, request):
|
||||||
return qos.get_bdev_qos_capabilities()
|
bdev_caps = qos.get_bdev_qos_capabilities().max_volume_caps
|
||||||
|
return sma_pb2.GetQosCapabilitiesResponse(max_volume_caps=bdev_caps,
|
||||||
|
max_device_caps=bdev_caps)
|
||||||
|
@ -203,6 +203,12 @@ device=$(create_device 0 $uuid | jq -r '.handle')
|
|||||||
diff <(get_qos_caps $device_vhost | jq --sort-keys) <(
|
diff <(get_qos_caps $device_vhost | jq --sort-keys) <(
|
||||||
jq --sort-keys <<- CAPS
|
jq --sort-keys <<- CAPS
|
||||||
{
|
{
|
||||||
|
"max_device_caps": {
|
||||||
|
"rw_iops": true,
|
||||||
|
"rd_bandwidth": true,
|
||||||
|
"wr_bandwidth": true,
|
||||||
|
"rw_bandwidth": true
|
||||||
|
},
|
||||||
"max_volume_caps": {
|
"max_volume_caps": {
|
||||||
"rw_iops": true,
|
"rw_iops": true,
|
||||||
"rd_bandwidth": true,
|
"rd_bandwidth": true,
|
||||||
|
Loading…
Reference in New Issue
Block a user