Re: [Qemu-devel] [PATCH v4 5/7] block: add throttle block filter driver

2017-08-11 Thread Manos Pitsidianakis
On Wed, Aug 09, 2017 at 01:07:32PM +0300, Manos Pitsidianakis wrote: +static int coroutine_fn throttle_co_preadv(BlockDriverState *bs, + uint64_t offset, uint64_t bytes, + QEMUIOVector *qiov, int flags) +{ + +

Re: [Qemu-devel] [PATCH v4 5/7] block: add throttle block filter driver

2017-08-10 Thread Manos Pitsidianakis
On Thu, Aug 10, 2017 at 03:54:02PM +0200, Alberto Garcia wrote: On Wed 09 Aug 2017 12:07:32 PM CEST, Manos Pitsidianakis wrote: +/* Extract ThrottleConfig options. Assumes cfg is initialized and will be + * checked for validity. + * + * Returns -1 and sets errp if a burst_length value is over UI

Re: [Qemu-devel] [PATCH v4 5/7] block: add throttle block filter driver

2017-08-10 Thread Alberto Garcia
On Wed 09 Aug 2017 12:07:32 PM CEST, Manos Pitsidianakis wrote: > +/* Extract ThrottleConfig options. Assumes cfg is initialized and will be > + * checked for validity. > + * > + * Returns -1 and sets errp if a burst_length value is over UINT_MAX. > + */ > +static int throttle_extract_options(QemuO

[Qemu-devel] [PATCH v4 5/7] block: add throttle block filter driver

2017-08-09 Thread Manos Pitsidianakis
block/throttle.c uses existing I/O throttle infrastructure inside a block filter driver. I/O operations are intercepted in the filter's read/write coroutines, and referred to block/throttle-groups.c The driver can be used with the syntax -drive driver=throttle,file.filename=foo.qcow2, \ li