Re: [Qemu-block] [Qemu-devel] [PATCH 04/16] block: Allow references for backing files

2015-09-09 Thread Wen Congyang
On 09/03/2015 02:50 AM, Eric Blake wrote: > On 09/02/2015 02:51 AM, Wen Congyang wrote: >> Usage: >> -drive file=xxx,id=Y, \ >> -drive file=,id=X,backing.backing_reference=Y >> >> It will create such backing chain: >>{virtio-blk dev 'Y'} {virtio-blk dev 'X'} >>

Re: [Qemu-block] [Qemu-devel] [PATCH 03/18] qemu-thread: introduce QemuLockCnt

2015-09-09 Thread Fam Zheng
On Thu, 08/06 15:36, Paolo Bonzini wrote: > +QemuLockCnt usage > +- > + > +The typical pattern for QemuLockCnt functions is as follows. > + > +qemu_lockcnt_inc(_lockcnt); > +if (xyz) { > +... access xyz ... > +} > + > +if

Re: [Qemu-block] [Qemu-devel] [PATCH 02/18] aio: rename bh_lock to list_lock

2015-09-09 Thread Fam Zheng
On Thu, 08/06 15:36, Paolo Bonzini wrote: > This will be used for AioHandlers too. There is going to be little > or no contention, so it is better to reuse the same lock. > > Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng > --- > async.c

Re: [Qemu-block] [Qemu-devel] [PATCH 15/16] support replication driver in blockdev-add

2015-09-09 Thread Wen Congyang
On 09/03/2015 12:36 AM, Eric Blake wrote: > On 09/02/2015 02:51 AM, Wen Congyang wrote: >> Signed-off-by: Wen Congyang >> --- >> qapi/block-core.json | 18 -- >> 1 file changed, 16 insertions(+), 2 deletions(-) >> >> diff --git a/qapi/block-core.json

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

2015-09-09 Thread Kevin Wolf
Am 08.09.2015 um 22:09 hat Max Reitz geschrieben: > 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

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

2015-09-09 Thread Wen Congyang
On 09/08/2015 11:52 PM, Eric Blake wrote: > 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

Re: [Qemu-block] [PATCH 01/18] iothread: release iothread around aio_poll

2015-09-09 Thread Fam Zheng
On Thu, 08/06 15:35, Paolo Bonzini wrote: > This is the first step towards having fine-grained critical sections in > dataplane threads, which resolves lock ordering problems between > address_space_* functions (which need the BQL when doing MMIO, even > after we complete RCU-based dispatch) and

Re: [Qemu-block] [PATCH 01/18] iothread: release iothread around aio_poll

2015-09-09 Thread Paolo Bonzini
On 09/09/2015 08:06, Fam Zheng wrote: > This patch will probably go in before aio_disable_clients, Actually I think it's blocked by aio_disable_clients. > if any, but I'm not > quite confident about the interface yet: listing a precise set of clients from > monitor is an ugly coupling between

Re: [Qemu-block] [Qemu-devel] [PATCH 10/16] docs: block replication's description

2015-09-09 Thread Wen Congyang
On 09/03/2015 04:41 AM, Eric Blake wrote: > On 09/02/2015 02:51 AM, Wen Congyang wrote: >> Signed-off-by: Wen Congyang >> Signed-off-by: Yang Hongyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei

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

2015-09-09 Thread Wen Congyang
On 09/09/2015 05:20 AM, Max Reitz wrote: > 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

Re: [Qemu-block] [Qemu-devel] [PATCH 11/16] Add new block driver interfaces to control block replication

2015-09-09 Thread Wen Congyang
On 09/03/2015 12:33 AM, Eric Blake wrote: > On 09/02/2015 02:51 AM, Wen Congyang wrote: >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei >> Cc: Luiz Capitulino

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

2015-09-09 Thread Max Reitz
On 09.09.2015 12:01, Wen Congyang wrote: > On 09/09/2015 05:20 AM, Max Reitz wrote: >> 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

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

2015-09-09 Thread Max Reitz
On 09.09.2015 10:45, Kevin Wolf wrote: > Am 08.09.2015 um 22:09 hat Max Reitz geschrieben: >> 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,

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

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

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

2015-09-09 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).

[Qemu-block] [PATCH] ide: fix ATAPI command permissions

2015-09-09 Thread John Snow
We're a little too lenient with what we'll let an ATAPI drive handle. Clamp down on the IDE command execution table to remove CD_OK permissions from commands that are not and have never been ATAPI commands. For ATAPI command validity, please see: - ATA4 Section 6.5 ("PACKET Command feature set")

[Qemu-block] [PATCH RFC v4 15/29] qapi: Avoid use of 'data' member of qapi unions

2015-09-09 Thread Eric Blake
qapi code generators currently create a 'void *data' member as part of the anonymous union embedded in the C struct corresponding to a qapi union. However, directly assigning to this member of the union feels a bit fishy, when we can directly use the rest of the struct instead. Signed-off-by: