Re: [Qemu-block] [RFC] transactions: add transaction-wide property

2015-10-20 Thread Fam Zheng
On Thu, 09/24 17:40, John Snow wrote: > This replaces the per-action property as in Fam's series. > Instead, we have a transaction-wide property that is shared > with each action. > > At the action level, if a property supplied transaction-wide > is disagreeable, we return error and the

Re: [Qemu-block] [Qemu-devel] [PATCH 03/17] rbd: add support for getting password from QCryptoSecret object

2015-10-20 Thread Daniel P. Berrange
On Mon, Oct 19, 2015 at 03:57:29PM -0700, Josh Durgin wrote: > On 10/19/2015 08:09 AM, Daniel P. Berrange wrote: > >Currently RBD passwords must be provided on the command line > >via > > > > $QEMU -drive file=rbd:pool/image:id=myname:\ > >

Re: [Qemu-block] [PATCH v7 27/39] block: Add blk_remove_bs()

2015-10-20 Thread Kevin Wolf
Am 19.10.2015 um 17:53 hat Max Reitz geschrieben: > This function removes the BlockDriverState associated with the given > BlockBackend from that BB and sets the BDS pointer in the BB to NULL. > > Signed-off-by: Max Reitz > --- > block/block-backend.c | 12

Re: [Qemu-block] [PATCH v7 00/39] blockdev: BlockBackend and media

2015-10-20 Thread Kevin Wolf
Am 19.10.2015 um 17:53 hat Max Reitz geschrieben: > This series reworks a lot regarding BlockBackend and media. Basically, > it allows empty BlockBackends, that is BBs without a BDS tree. > > Before this series, empty drives are represented by a BlockBackend with > an empty BDS attached to it (a

Re: [Qemu-block] [Qemu-devel] Question about xen disk unplug support for ahci missed in qemu

2015-10-20 Thread Laszlo Ersek
On 10/20/15 13:59, Stefano Stabellini wrote: > On Mon, 19 Oct 2015, Laszlo Ersek wrote: >> On 10/16/15 21:09, Laszlo Ersek wrote: >>> On 10/16/15 13:34, Fabio Fantoni wrote: Il 16/10/2015 12:47, Stefano Stabellini ha scritto: > On Fri, 16 Oct 2015, Fabio Fantoni wrote: >> Il

Re: [Qemu-block] [Qemu-devel] Question about xen disk unplug support for ahci missed in qemu

2015-10-20 Thread Stefano Stabellini
On Mon, 19 Oct 2015, Laszlo Ersek wrote: > On 10/16/15 21:09, Laszlo Ersek wrote: > > On 10/16/15 13:34, Fabio Fantoni wrote: > >> Il 16/10/2015 12:47, Stefano Stabellini ha scritto: > >>> On Fri, 16 Oct 2015, Fabio Fantoni wrote: > Il 16/10/2015 12:13, Anthony PERARD ha scritto: > > On

Re: [Qemu-block] [PATCH v4 00/12] block: Protect nested event loop with bdrv_drained_begin and bdrv_drained_end

2015-10-20 Thread Kevin Wolf
Am 20.10.2015 um 07:16 hat Fam Zheng geschrieben: > v4: Rebase on to master so fix the "bdrv_move_feature_fields" issue. > > v3: Call bdrv_drain unconditionally in bdrv_drained_begin. > Document the internal I/O implications between bdrv_drain_begin and end. > > The nested aio_poll()'s in

Re: [Qemu-block] [PATCH 0/3] Add 'blockdev-del' command

2015-10-20 Thread Alberto Garcia
On Mon 19 Oct 2015 05:04:50 PM CEST, Kevin Wolf wrote: >> > So we seem to have two criteria to distinguish BDSes: >> > >> > 1. Does/Doesn't have a BlockBackend on top. >> >In the future, multiple BlockBackends are possible, too. >> >> One single BDS attached to multiple

Re: [Qemu-block] [Qemu-devel] [RFC] transactions: add transaction-wide property

2015-10-20 Thread John Snow
On 10/19/2015 03:27 AM, Markus Armbruster wrote: > John Snow writes: > >> On 10/16/2015 08:23 AM, Stefan Hajnoczi wrote: >>> On Mon, Oct 12, 2015 at 12:50:20PM -0400, John Snow wrote: Ping -- any consensus on how we should implement the "do-or-die" argument for

Re: [Qemu-block] [Qemu-devel] Question about xen disk unplug support for ahci missed in qemu

2015-10-20 Thread Stefano Stabellini
On Tue, 20 Oct 2015, Laszlo Ersek wrote: > On 10/20/15 13:59, Stefano Stabellini wrote: > > On Mon, 19 Oct 2015, Laszlo Ersek wrote: > >> Could that be related to the issue you are experiencing with OVMF? > >> Because, OVMF implies HVM (or PV-on-HVM), and your report ("empty > >> paravirt CD-ROM"

Re: [Qemu-block] [RFC] transactions: add transaction-wide property

2015-10-20 Thread Eric Blake
On 09/24/2015 03:40 PM, John Snow wrote: > This replaces the per-action property as in Fam's series. > Instead, we have a transaction-wide property that is shared > with each action. > > At the action level, if a property supplied transaction-wide > is disagreeable, we return error and the

Re: [Qemu-block] [Qemu-devel] [RFC] transactions: add transaction-wide property

2015-10-20 Thread John Snow
So here's the current status of this blob: - Markus supports the idea of a transaction-wide property, but hasn't reviewed this particular RFC. - Eric seemed supportive of a transaction-wide property, but hasn't chimed in to this thread yet. - Stefan was not sure what this patch was trying to

Re: [Qemu-block] [Qemu-devel] [RFC] transactions: add transaction-wide property

2015-10-20 Thread John Snow
A little bit of cross-talk with my "state of the union" reply and this review from Eric. Sorry, everyone! On 10/20/2015 04:12 PM, Eric Blake wrote: > On 09/24/2015 03:40 PM, John Snow wrote: >> This replaces the per-action property as in Fam's series. >> Instead, we have a transaction-wide

Re: [Qemu-block] [PATCH v4 00/12] block: Protect nested event loop with bdrv_drained_begin and bdrv_drained_end

2015-10-20 Thread Fam Zheng
On Tue, 10/20 16:17, Kevin Wolf wrote: > Am 20.10.2015 um 07:16 hat Fam Zheng geschrieben: > > v4: Rebase on to master so fix the "bdrv_move_feature_fields" issue. > > > > v3: Call bdrv_drain unconditionally in bdrv_drained_begin. > > Document the internal I/O implications between

[Qemu-block] [PATCH v5 09/12] block: Add "drained begin/end" for internal snapshot

2015-10-20 Thread Fam Zheng
This ensures the atomicity of the transaction by avoiding processing of external requests such as those from ioeventfd. state->bs is assigned right after bdrv_drained_begin. Because it was used as the flag for deletion or not in abort, now we need a separate flag - InternalSnapshotState.created.

[Qemu-block] [PATCH v5 05/12] block: Introduce "drained begin/end" API

2015-10-20 Thread Fam Zheng
The semantics is that after bdrv_drained_begin(bs), bs will not get new external requests until the matching bdrv_drained_end(bs). Signed-off-by: Fam Zheng --- block/io.c| 17 + include/block/block.h | 21 +

[Qemu-block] [PATCH v5 08/12] block: Add "drained begin/end" for transactional blockdev-backup

2015-10-20 Thread Fam Zheng
Similar to the previous patch, make sure that external events are not dispatched during transaction operations. Signed-off-by: Fam Zheng --- blockdev.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 0a7848b..52f44b2

[Qemu-block] [PATCH v5 07/12] block: Add "drained begin/end" for transactional backup

2015-10-20 Thread Fam Zheng
This ensures the atomicity of the transaction by avoiding processing of external requests such as those from ioeventfd. Move the assignment to state->bs up right after bdrv_drained_begin, so that we can use it in the clean callback. The abort callback will still check bs->job and state->job, so

[Qemu-block] [PATCH v5 12/12] tests: Add test case for aio_disable_external

2015-10-20 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/test-aio.c | 24 1 file changed, 24 insertions(+) diff --git a/tests/test-aio.c b/tests/test-aio.c index 03cd45d..1623803 100644 --- a/tests/test-aio.c +++ b/tests/test-aio.c @@ -374,6 +374,29 @@ static void

[Qemu-block] [PATCH v5 03/12] dataplane: Mark host notifiers' client type as "external"

2015-10-20 Thread Fam Zheng
They will be excluded by type in the nested event loops in block layer, so that unwanted events won't be processed there. Signed-off-by: Fam Zheng --- hw/block/dataplane/virtio-blk.c | 5 ++--- hw/scsi/virtio-scsi-dataplane.c | 18 -- 2 files changed, 10

[Qemu-block] [PATCH v5 01/12] aio: Add "is_external" flag for event handlers

2015-10-20 Thread Fam Zheng
All callers pass in false, and the real external ones will switch to true in coming patches. Signed-off-by: Fam Zheng --- aio-posix.c | 6 - aio-win32.c | 5 async.c | 3 ++- block/curl.c

[Qemu-block] [PATCH v5 02/12] nbd: Mark fd handlers client type as "external"

2015-10-20 Thread Fam Zheng
So we could distinguish it from internal used fds, thus avoid handling unwanted events in nested aio polls. Signed-off-by: Fam Zheng --- nbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nbd.c b/nbd.c index fbc66be..dab1ebb 100644 --- a/nbd.c +++

[Qemu-block] [PATCH v5 00/12] block: Protect nested event loop with bdrv_drained_begin and bdrv_drained_end

2015-10-20 Thread Fam Zheng
v5: Rebase onto Kevin's block tree. v4: Rebase on to master so fix the "bdrv_move_feature_fields" issue. v3: Call bdrv_drain unconditionally in bdrv_drained_begin. Document the internal I/O implications between bdrv_drain_begin and end. The nested aio_poll()'s in block layer has a bug that

[Qemu-block] [PATCH v5 10/12] block: Introduce BlockDriver.bdrv_drain callback

2015-10-20 Thread Fam Zheng
Drivers can have internal request sources that generate IO, like the need_check_timer in QED. Since we want quiesced periods that contain nested event loops in block layer, we need to have a way to disable such event sources. Block drivers must implement the "bdrv_drain" callback if it has any

[Qemu-block] [PATCH v5 11/12] qed: Implement .bdrv_drain

2015-10-20 Thread Fam Zheng
The "need_check_timer" is used to clear the "NEED_CHECK" flag in the image header after a grace period once metadata update has finished. In compliance to the bdrv_drain semantics we should make sure it remains deleted once .bdrv_drain is called. Call the qed_need_check_timer_cb manually to

[Qemu-block] [PATCH v5 04/12] aio: introduce aio_{disable, enable}_external

2015-10-20 Thread Fam Zheng
Signed-off-by: Fam Zheng --- aio-posix.c | 3 ++- aio-win32.c | 3 ++- include/block/aio.h | 37 + 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index f0f9122..0467f23 100644 ---

[Qemu-block] [PATCH v5 06/12] block: Add "drained begin/end" for transactional external snapshot

2015-10-20 Thread Fam Zheng
This ensures the atomicity of the transaction by avoiding processing of external requests such as those from ioeventfd. Signed-off-by: Fam Zheng --- blockdev.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index