},
{.name = "total-bytes-sec",
.type = VSH_OT_INT,
- .help = N_("total throughput limit in bytes per second")
+ .help = N_("total throughput limit, as scaled integer (default bytes)")
},
{.name = "read_bytes_sec",
.type = VSH_OT_ALIAS,
},
{.name = "read-bytes-sec",
.type = VSH_OT_INT,
- .help = N_("read throughput limit in bytes per second")
+ .help = N_("read throughput limit, as scaled integer (default bytes)")
},
{.name = "write_bytes_sec",
.type = VSH_OT_ALIAS,
},
{.name = "write-bytes-sec",
.type = VSH_OT_INT,
- .help = N_("write throughput limit in bytes per second")
+ .help = N_("write throughput limit, as scaled integer (default bytes)")
},
{.name = "total_iops_sec",
.type = VSH_OT_ALIAS,
},
{.name = "total-bytes-sec-max",
.type = VSH_OT_INT,
- .help = N_("total max in bytes")
+ .help = N_("total max, as scaled integer (default bytes)")
},
{.name = "read_bytes_sec_max",
.type = VSH_OT_ALIAS,
},
{.name = "read-bytes-sec-max",
.type = VSH_OT_INT,
- .help = N_("read max in bytes")
+ .help = N_("read max, as scaled integer (default bytes)")
},
{.name = "write_bytes_sec_max",
.type = VSH_OT_ALIAS,
},
{.name = "write-bytes-sec-max",
.type = VSH_OT_INT,
- .help = N_("write max in bytes")
+ .help = N_("write max, as scaled integer (default bytes)")
},
{.name = "total_iops_sec_max",
.type = VSH_OT_ALIAS,
if (vshCommandOptStringReq(ctl, cmd, "device", &disk) < 0)
goto cleanup;
- if ((rv = vshCommandOptULongLong(ctl, cmd, "total-bytes-sec", &value)) < 0) {
+ if ((rv = vshCommandOptScaledInt(ctl, cmd, "total-bytes-sec", &value, 1, ULLONG_MAX)) < 0) {
goto interror;
} else if (rv > 0) {
if (virTypedParamsAddULLong(¶ms, &nparams, &maxparams,
goto save_error;
}
- if ((rv = vshCommandOptULongLong(ctl, cmd, "read-bytes-sec", &value)) < 0) {
+ if ((rv = vshCommandOptScaledInt(ctl, cmd, "read-bytes-sec", &value, 1, ULLONG_MAX)) < 0) {
goto interror;
} else if (rv > 0) {
if (virTypedParamsAddULLong(¶ms, &nparams, &maxparams,
goto save_error;
}
- if ((rv = vshCommandOptULongLong(ctl, cmd, "write-bytes-sec", &value)) < 0) {
+ if ((rv = vshCommandOptScaledInt(ctl, cmd, "write-bytes-sec", &value, 1, ULLONG_MAX)) < 0) {
goto interror;
} else if (rv > 0) {
if (virTypedParamsAddULLong(¶ms, &nparams, &maxparams,
goto save_error;
}
- if ((rv = vshCommandOptULongLong(ctl, cmd, "total-bytes-sec-max", &value)) < 0) {
+ if ((rv = vshCommandOptScaledInt(ctl, cmd, "total-bytes-sec-max", &value, 1, ULLONG_MAX)) < 0) {
goto interror;
} else if (rv > 0) {
if (virTypedParamsAddULLong(¶ms, &nparams, &maxparams,
goto save_error;
}
- if ((rv = vshCommandOptULongLong(ctl, cmd, "read-bytes-sec-max", &value)) < 0) {
+ if ((rv = vshCommandOptScaledInt(ctl, cmd, "read-bytes-sec-max", &value, 1, ULLONG_MAX)) < 0) {
goto interror;
} else if (rv > 0) {
if (virTypedParamsAddULLong(¶ms, &nparams, &maxparams,
goto save_error;
}
- if ((rv = vshCommandOptULongLong(ctl, cmd, "write-bytes-sec-max", &value)) < 0) {
+ if ((rv = vshCommandOptScaledInt(ctl, cmd, "write-bytes-sec-max", &value, 1, ULLONG_MAX)) < 0) {
goto interror;
} else if (rv > 0) {
if (virTypedParamsAddULLong(¶ms, &nparams, &maxparams,
If no limit is specified, it will query current I/O limits setting.
Otherwise, alter the limits with these flags:
-I<--total-bytes-sec> specifies total throughput limit in bytes per second.
-I<--read-bytes-sec> specifies read throughput limit in bytes per second.
-I<--write-bytes-sec> specifies write throughput limit in bytes per second.
+I<--total-bytes-sec> specifies total throughput limit as a scaled integer, the
+default being bytes per second if no suffix is specified.
+I<--read-bytes-sec> specifies read throughput limit as a scaled integer, the
+default being bytes per second if no suffix is specified.
+I<--write-bytes-sec> specifies write throughput limit as a scaled integer, the
+default being bytes per second if no suffix is specified.
I<--total-iops-sec> specifies total I/O operations limit per second.
I<--read-iops-sec> specifies read I/O operations limit per second.
I<--write-iops-sec> specifies write I/O operations limit per second.
-I<--total-bytes-sec-max> specifies maximum total throughput limit in bytes per second.
-I<--read-bytes-sec-max> specifies maximum read throughput limit in bytes per second.
-I<--write-bytes-sec-max> specifies maximum write throughput limit in bytes per second.
+I<--total-bytes-sec-max> specifies maximum total throughput limit as a scaled
+integer, the default being bytes per second if no suffix is specified
+I<--read-bytes-sec-max> specifies maximum read throughput limit as a scaled
+integer, the default being bytes per second if no suffix is specified.
+I<--write-bytes-sec-max> specifies maximum write throughput limit as a scaled
+integer, the default being bytes per second if no suffix is specified.
I<--total-iops-sec-max> specifies maximum total I/O operations limit per second.
I<--read-iops-sec-max> specifies maximum read I/O operations limit per second.
I<--write-iops-sec-max> specifies maximum write I/O operations limit per second.