Re: [Qemu-block] [Qemu-devel] [PATCH v4 29/38] blockdev: Add blockdev-insert-medium

2015-09-08 Thread Wen Congyang
On 07/21/2015 01:45 AM, Max Reitz wrote: > And a helper function for that, which directly takes a pointer to the > BDS to be inserted instead of its node-name (which will be used for > implementing 'change' using blockdev-insert-medium). > > Signed-off-by: Max Reitz > --- >

Re: [Qemu-block] [Qemu-devel] [PATCH 4/5] disk_deadlines: add control of requests time expiration

2015-09-08 Thread Fam Zheng
On Tue, 09/08 11:00, Denis V. Lunev wrote: > typedef struct DiskDeadlines { > bool enabled; > +bool expired_tree; > +pthread_mutex_t mtx_tree; This won't compile on win32, probably use QemuMutex instead? In file included from /tmp/qemu-build/include/block/accounting.h:30:0,

Re: [Qemu-block] [Qemu-devel] [PATCH 4/5] disk_deadlines: add control of requests time expiration

2015-09-08 Thread Denis V. Lunev
On 09/08/2015 12:35 PM, Fam Zheng wrote: On Tue, 09/08 11:00, Denis V. Lunev wrote: typedef struct DiskDeadlines { bool enabled; +bool expired_tree; +pthread_mutex_t mtx_tree; This won't compile on win32, probably use QemuMutex instead? In file included from

Re: [Qemu-block] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child

2015-09-08 Thread Wen Congyang
On 09/01/2015 11:30 PM, Eric Blake wrote: > On 08/31/2015 06:44 PM, Wen Congyang wrote: > >>> + * Hot add/remove a BDS's child. So the user can take a child offline when + * it is broken and take a new child online + */ +void bdrv_add_child(BlockDriverState *bs, QDict

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] iotests: Add test for checking large image files

2015-09-08 Thread Eric Blake
On 09/08/2015 02:09 PM, Max Reitz wrote: > Add a test for checking a qcow2 file with a multiple of 2^32 clusters. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/138 | 73 > ++ > tests/qemu-iotests/138.out | 9 ++ >

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] qcow2: Make size_to_clusters() return int64_t

2015-09-08 Thread Max Reitz
On 08.09.2015 22:22, Eric Blake wrote: > On 09/08/2015 02:09 PM, Max Reitz wrote: >> Sadly, some images may have more clusters than what can be represented >> using a plain int. We should be prepared for that case (in >> qcow2_check_refcounts() we actually were trying to catch that case, but >>

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] qcow2: Make size_to_clusters() return int64_t

2015-09-08 Thread Eric Blake
On 09/08/2015 02:09 PM, Max Reitz wrote: > Sadly, some images may have more clusters than what can be represented > using a plain int. We should be prepared for that case (in > qcow2_check_refcounts() we actually were trying to catch that case, but > since size_to_clusters() truncated the returned

[Qemu-block] [PATCH 2/2] iotests: Add test for checking large image files

2015-09-08 Thread Max Reitz
Add a test for checking a qcow2 file with a multiple of 2^32 clusters. Signed-off-by: Max Reitz --- tests/qemu-iotests/138 | 73 ++ tests/qemu-iotests/138.out | 9 ++ tests/qemu-iotests/group | 1 + 3 files changed, 83

[Qemu-block] [PATCH 0/2] qcow2: Make size_to_clusters() return int64_t

2015-09-08 Thread Max Reitz
Some callers actually expected that function to return int64_t. As it turns out, it doesn't. Fix that. Max Reitz (2): qcow2: Make size_to_clusters() return int64_t iotests: Add test for checking large image files block/qcow2-cluster.c | 20 +++-- block/qcow2.h |

[Qemu-block] [PATCH 1/2] qcow2: Make size_to_clusters() return int64_t

2015-09-08 Thread Max Reitz
Sadly, some images may have more clusters than what can be represented using a plain int. We should be prepared for that case (in qcow2_check_refcounts() we actually were trying to catch that case, but since size_to_clusters() truncated the returned value, that check never did anything useful).

Re: [Qemu-block] [PATCH 1/2] qcow2: Make size_to_clusters() return int64_t

2015-09-08 Thread Max Reitz
On 08.09.2015 22:09, Max Reitz wrote: > Sadly, some images may have more clusters than what can be represented > using a plain int. We should be prepared for that case (in > qcow2_check_refcounts() we actually were trying to catch that case, but > since size_to_clusters() truncated the returned

Re: [Qemu-block] [PATCH 2/2] iotests: Warn if python subprocess is killed

2015-09-08 Thread Max Reitz
On 08.09.2015 23:25, John Snow wrote: > > > On 08/31/2015 03:05 PM, Max Reitz wrote: >> Currently, if a subprocess of a python test (i.e. qemu-io, qemu-img, or >> qemu) receives a signal and is subsequently aborted, this is not logged. >> >> This patch makes python tests always check the exit

Re: [Qemu-block] [PATCH 2/2] iotests: Warn if python subprocess is killed

2015-09-08 Thread John Snow
On 09/08/2015 05:29 PM, Max Reitz wrote: > On 08.09.2015 23:25, John Snow wrote: >> >> >> On 08/31/2015 03:05 PM, Max Reitz wrote: >>> Currently, if a subprocess of a python test (i.e. qemu-io, >>> qemu-img, or qemu) receives a signal and is subsequently >>> aborted, this is not logged. >>>

Re: [Qemu-block] [Qemu-devel] [PATCH v4 29/38] blockdev: Add blockdev-insert-medium

2015-09-08 Thread Max Reitz
On 08.09.2015 11:13, Wen Congyang wrote: > On 07/21/2015 01:45 AM, Max Reitz wrote: >> And a helper function for that, which directly takes a pointer to the >> BDS to be inserted instead of its node-name (which will be used for >> implementing 'change' using blockdev-insert-medium). >> >>

Re: [Qemu-block] [PATCH 2/2] iotests: Warn if python subprocess is killed

2015-09-08 Thread John Snow
On 08/31/2015 03:05 PM, Max Reitz wrote: > Currently, if a subprocess of a python test (i.e. qemu-io, qemu-img, or > qemu) receives a signal and is subsequently aborted, this is not logged. > > This patch makes python tests always check the exit code of these > subprocesses, and emit a message

Re: [Qemu-block] [PATCH 2/2] iotests: Warn if python subprocess is killed

2015-09-08 Thread John Snow
On 09/08/2015 05:38 PM, Max Reitz wrote: > On 08.09.2015 23:37, John Snow wrote: >> >> >> On 09/08/2015 05:29 PM, Max Reitz wrote: >>> On 08.09.2015 23:25, John Snow wrote: On 08/31/2015 03:05 PM, Max Reitz wrote: > Currently, if a subprocess of a python test (i.e.

Re: [Qemu-block] [PATCH 2/2] iotests: Warn if python subprocess is killed

2015-09-08 Thread Max Reitz
On 08.09.2015 23:37, John Snow wrote: > > > On 09/08/2015 05:29 PM, Max Reitz wrote: >> On 08.09.2015 23:25, John Snow wrote: >>> >>> >>> On 08/31/2015 03:05 PM, Max Reitz wrote: Currently, if a subprocess of a python test (i.e. qemu-io, qemu-img, or qemu) receives a signal and is

Re: [Qemu-block] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child

2015-09-08 Thread Eric Blake
On 09/08/2015 03:10 AM, Wen Congyang wrote: >> Design-wise, I think we really want to have the add-child operation be >> handed a pre-opened BDS, rather than the options dictionary to open the >> BDS itself. That is, we should use the existing blockdev-add (and >> enhance it to support

Re: [Qemu-block] [Patch for-2.5 v2 5/6] qmp: add monitor command to add/remove a child

2015-09-08 Thread Eric Blake
On 09/06/2015 09:55 PM, Wen Congyang wrote: >> I haven't looked at them yet, but really like Max's approach for >> separating BDS from BB by treating BB without BDS as an empty media >> case, and BDS without a BB as something that can then be manipulated to >> be associated with another BDS or BB.

Re: [Qemu-block] [Qemu-devel] [PATCH v4 29/38] blockdev: Add blockdev-insert-medium

2015-09-08 Thread Eric Blake
On 09/07/2015 11:53 PM, Wen Congyang wrote: > On 07/21/2015 01:45 AM, Max Reitz wrote: >> And a helper function for that, which directly takes a pointer to the >> BDS to be inserted instead of its node-name (which will be used for >> implementing 'change' using blockdev-insert-medium). > > Is it

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] ide: unify io_buffer_offset increments

2015-09-08 Thread John Snow
On 09/07/2015 12:37 PM, Paolo Bonzini wrote: > > > On 26/08/2015 01:45, John Snow wrote: >> IDEState's io_buffer_offset was originally added to keep track of offsets >> in AHCI rather exclusively, but it was added to IDEState instead of an >> AHCI-specific structure. > > Interesting to see

Re: [Qemu-block] [Qemu-devel] [PATCH v2 11/11] block: Only poll block layer fds in bdrv_aio_poll

2015-09-08 Thread Fam Zheng
On Wed, 07/29 14:03, Paolo Bonzini wrote: > > > On 29/07/2015 13:53, Fam Zheng wrote: > >> > Yes, though I think you'd end up reverting patches 10 and 11 in the end. > > We will add outer disable/enable pairs to prevent another threads's aio_poll > > from sneaking in between bdrv_aio_poll calls,