Re: [Qemu-block] [RFC v4 08/13] ide: enumerate_slots implementation

2017-08-18 Thread Eduardo Habkost
On Wed, Aug 16, 2017 at 05:46:18PM -0400, John Snow wrote: > > > On 08/14/2017 05:57 PM, Eduardo Habkost wrote: > > Example output when using "-machine q35": > > > > { > > "available": true, > > "count": 1, > > "device-types": [ > > "ide-device" > > ], > >

Re: [Qemu-block] [PATCH v5 08/13] tests: Rely more on global_qtest

2017-08-18 Thread John Snow
On 08/18/2017 05:15 PM, Eric Blake wrote: > libqtest provides two layers of functions: qtest_*() that operate > on an explicit object, and a plain version that operates on the > 'global_qtest' object. However, very few tests care about the > distinction, and even the tests that manipulate

[Qemu-block] [PATCH v5 08/13] tests: Rely more on global_qtest

2017-08-18 Thread Eric Blake
libqtest provides two layers of functions: qtest_*() that operate on an explicit object, and a plain version that operates on the 'global_qtest' object. However, very few tests care about the distinction, and even the tests that manipulate multiple qtest connections at once are just fine

Re: [Qemu-block] [PATCH v5 5/6] block: add throttle block filter driver

2017-08-18 Thread Alberto Garcia
On Fri 18 Aug 2017 05:10:18 AM CEST, Manos Pitsidianakis wrote: > 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

Re: [Qemu-block] [PATCH v5 5/6] block: add throttle block filter driver

2017-08-18 Thread Manos Pitsidianakis
On Fri, Aug 18, 2017 at 10:23:09AM +0200, Alberto Garcia wrote: On Fri 18 Aug 2017 05:10:18 AM CEST, Manos Pitsidianakis wrote: 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

Re: [Qemu-block] [PATCH v5 5/6] block: add throttle block filter driver

2017-08-18 Thread Alberto Garcia
On Fri 18 Aug 2017 11:07:22 AM CEST, Manos Pitsidianakis wrote: >>> The driver can be used with the syntax >>> -drive driver=throttle,file.filename=foo.qcow2, \ >>> limits.iops-total=...,throttle-group=bar >> >>I had understood that we would get rid of the limits.* options in this

Re: [Qemu-block] [Qemu-devel] [PATCH 5/6] block: Fix write/resize permissions for inactive images

2017-08-18 Thread Xie Changlong
在 5/5/2017 12:52 AM, Kevin Wolf 写道: +/* Returns whether the image file can be written to right now */ +bool bdrv_is_writable(BlockDriverState *bs) +{ +return !bdrv_is_read_only(bs) && !(bs->open_flags & BDRV_O_INACTIVE); +} + This commit use BDRV_O_INACTIVE to judge whether the image

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.10 v2 0/4] block: Fix non-shared storage migration

2017-08-18 Thread Christian Ehrhardt
On Tue, Aug 15, 2017 at 3:07 PM, Fam Zheng wrote: > v2: Don't leak blk->vmsh when BB is deleted before the callback is called. > [Stefan] > From stub functions, don't return g_malloc0(1) which is risky, return > NULL. > [Eric] Thanks Fam Zheng and Kevin Wolf,

[Qemu-block] [PATCH] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-18 Thread Stefan Hajnoczi
Most qcow2 files are uncompressed so it is wasteful to allocate (32 + 1) * cluster_size + 512 bytes upfront. Allocate s->cluster_cache and s->cluster_data when the first read operation is performance on a compressed cluster. The buffers are freed in .bdrv_close(). .bdrv_open() no longer has any

Re: [Qemu-block] [PATCH for-2.10] qemu-iotests: step clock after each test iteration

2017-08-18 Thread Alberto Garcia
On Tue 15 Aug 2017 03:05:02 PM CEST, Stefan Hajnoczi wrote: > The 093 throttling test submits twice as many requests as the throttle > limit in order to ensure that we reach the limit. The remaining > requests are left in-flight at the end of each test iteration. > > Commit

Re: [Qemu-block] [PATCH v5 4/6] block: convert ThrottleGroup to object with QOM

2017-08-18 Thread Alberto Garcia
On Fri 18 Aug 2017 05:10:17 AM CEST, Manos Pitsidianakis wrote: > * If no ThrottleGroup is found with the given name a new one is > * created. > * > - * @name: the name of the ThrottleGroup > + * This function edits throttle_groups and must be called under the global > + * mutex. > + * > +

Re: [Qemu-block] [Qemu-devel] [PATCH 5/6] block: Fix write/resize permissions for inactive images

2017-08-18 Thread Fam Zheng
On Fri, 08/18 18:06, Xie Changlong wrote: > The root casue is when we run replication in secondary, vmstate changes to > RUN_STATE_INMIGRATE, then blockdev_init() sets bdrv_flags |= > BDRV_O_INACTIVE. So the whole chain become readonly. I've tried on my side, > but it seems not easy to fix it. I

Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-18 Thread Eric Blake
On 08/18/2017 08:31 AM, Stefan Hajnoczi wrote: > Most qcow2 files are uncompressed so it is wasteful to allocate (32 + 1) > * cluster_size + 512 bytes upfront. Allocate s->cluster_cache and > s->cluster_data when the first read operation is performance on a > compressed cluster. > > The buffers