bdev: Fix data type mismatch for io_per_sec
Change-Id: I6bf491bd9661d247a70d7ee323c14397cd577636 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/407367 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
2931d638e7
commit
87211463a2
@ -2374,7 +2374,7 @@ _spdk_bdev_qos_config(struct spdk_bdev *bdev)
|
|||||||
{
|
{
|
||||||
struct spdk_conf_section *sp = NULL;
|
struct spdk_conf_section *sp = NULL;
|
||||||
const char *val = NULL;
|
const char *val = NULL;
|
||||||
int ios_per_sec = 0;
|
uint64_t ios_per_sec = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
sp = spdk_conf_find_section(NULL, "QoS");
|
sp = spdk_conf_find_section(NULL, "QoS");
|
||||||
@ -2398,14 +2398,14 @@ _spdk_bdev_qos_config(struct spdk_bdev *bdev)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ios_per_sec = (int)strtol(val, NULL, 10);
|
ios_per_sec = strtoull(val, NULL, 10);
|
||||||
if (ios_per_sec > 0) {
|
if (ios_per_sec > 0) {
|
||||||
if (ios_per_sec % SPDK_BDEV_QOS_MIN_IOS_PER_SEC) {
|
if (ios_per_sec % SPDK_BDEV_QOS_MIN_IOS_PER_SEC) {
|
||||||
SPDK_ERRLOG("Assigned IOPS %u on bdev %s is not multiple of %u\n",
|
SPDK_ERRLOG("Assigned IOPS %" PRIu64 " on bdev %s is not multiple of %u\n",
|
||||||
ios_per_sec, bdev->name, SPDK_BDEV_QOS_MIN_IOS_PER_SEC);
|
ios_per_sec, bdev->name, SPDK_BDEV_QOS_MIN_IOS_PER_SEC);
|
||||||
SPDK_ERRLOG("Failed to enable QoS on this bdev %s\n", bdev->name);
|
SPDK_ERRLOG("Failed to enable QoS on this bdev %s\n", bdev->name);
|
||||||
} else {
|
} else {
|
||||||
bdev->ios_per_sec = (uint64_t)ios_per_sec;
|
bdev->ios_per_sec = ios_per_sec;
|
||||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Bdev:%s QoS:%lu\n",
|
SPDK_DEBUGLOG(SPDK_LOG_BDEV, "Bdev:%s QoS:%lu\n",
|
||||||
bdev->name, bdev->ios_per_sec);
|
bdev->name, bdev->ios_per_sec);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user