block: Add iops_size to do the iops accounting for a given io size.

This feature can be used in case where users are avoiding the iops limit by
doing jumbo I/Os hammering the storage backend.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Benoît Canet 2013-09-02 14:14:41 +02:00 committed by Stefan Hajnoczi
parent 3e9fab690d
commit 2024c1df43
6 changed files with 38 additions and 9 deletions

View file

@ -258,6 +258,9 @@ void bdrv_query_info(BlockDriverState *bs,
cfg.buckets[THROTTLE_OPS_WRITE].max;
info->inserted->iops_wr_max =
cfg.buckets[THROTTLE_OPS_WRITE].max;
info->inserted->has_iops_size = cfg.op_size;
info->inserted->iops_size = cfg.op_size;
}
bs0 = bs;