On Mon 02 Oct 2017 04:33:29 PM CEST, Pradeep Jagadeesh wrote:
- if (arg->has_iops_rd_max_length) {
- cfg.buckets[THROTTLE_OPS_READ].burst_length = arg->iops_rd_max_length;
- }
- if (arg->has_iops_wr_max_length) {
- cfg.buckets[THROTTLE_OPS_WRITE].burst_length = arg->iops_wr_max_length;
- }
-
- if (arg->has_iops_size) {
- cfg.op_size = arg->iops_size;
- }
The old code takes an empty ThrottleConfig, and initializes it using the
values from a BlockIOThrottle structure...
+ tlimit = qapi_BlockIOThrottle_base(arg);
+ throttle_config_to_limits(&cfg, tlimit);
...but the new code does the exact opposite (?).