Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/2] block: test 'blockdev-snapshot' using a file BDS as the overlay

2015-11-03 Thread Alberto Garcia
On Mon 02 Nov 2015 06:29:14 PM CET, Eric Blake wrote: >>> @@ -103,7 +103,8 @@ function add_snapshot_image() >>> { 'options': >>> { 'driver': 'qcow2', 'node-name': 'snap_"${1}"', >>> "${extra_params}" >>> 'file': >>> - {

Re: [Qemu-block] [Qemu-devel] [PATCH v3 2/3] block: Remove inner quotation marks in iotest 085

2015-11-03 Thread Eric Blake
On 11/03/2015 03:32 AM, Alberto Garcia wrote: > This patch removes the inner quotation marks in all cases like this: > >cmd=" ... "${variable}" ... " > > Signed-off-by: Alberto Garcia > --- > tests/qemu-iotests/085 | 16 > 1 file changed, 8 insertions(+),

Re: [Qemu-block] [Qemu-devel] [PATCH v3 3/3] block: test 'blockdev-snapshot' using a file BDS as the overlay

2015-11-03 Thread Eric Blake
On 11/03/2015 03:32 AM, Alberto Garcia wrote: > This test checks that it is not possible to create a snapshot if the > requested overlay node is a BDS which does not support backing images. > > Signed-off-by: Alberto Garcia > --- > tests/qemu-iotests/085 | 12 +++-

Re: [Qemu-block] [Qemu-devel] [PATCH v3 1/3] block: Disallow snapshots if the overlay doesn't support backing files

2015-11-03 Thread Eric Blake
On 11/03/2015 03:32 AM, Alberto Garcia wrote: > This addresses scenarios like this one: > > { 'execute': 'blockdev-add', 'arguments': > { 'options': { 'driver': 'qcow2', >'node-name': 'new0', >'file': { 'driver': 'file', >

Re: [Qemu-block] [PATCH v10 12/14] block: add transactional properties

2015-11-03 Thread Stefan Hajnoczi
On Fri, Oct 23, 2015 at 07:56:50PM -0400, John Snow wrote: > @@ -1732,6 +1757,10 @@ static void > block_dirty_bitmap_add_prepare(BlkActionState *common, > BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState, > common, common); > > +

[Qemu-block] [PATCH v11 11/12] support replication driver in blockdev-add

2015-11-03 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Eric Blake --- qapi/block-core.json | 21 ++--- 1 file changed, 18 insertions(+), 3

[Qemu-block] [PATCH v11 05/12] Allow creating backup jobs when opening BDS

2015-11-03 Thread Wen Congyang
When opening BDS, we need to create backup jobs for image-fleecing. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Stefan Hajnoczi Reviewed-by:

[Qemu-block] [PATCH v3 2/3] block: Remove inner quotation marks in iotest 085

2015-11-03 Thread Alberto Garcia
This patch removes the inner quotation marks in all cases like this: cmd=" ... "${variable}" ... " Signed-off-by: Alberto Garcia --- tests/qemu-iotests/085 | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/085

[Qemu-block] [PATCH v11 10/12] Implement new driver for block replication

2015-11-03 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block/Makefile.objs | 1 + block/replication.c | 550 2 files changed, 551

[Qemu-block] [PATCH v11 04/12] Backup: clear all bitmap when doing block checkpoint

2015-11-03 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Jeff Cody --- block/backup.c | 14 ++ blockjob.c | 11 +++

[Qemu-block] [PATCH v11 06/12] block: make bdrv_put_ref_bh_schedule() as a public API

2015-11-03 Thread Wen Congyang
Signed-off-by: Wen Congyang --- block.c | 25 + blockdev.c| 37 ++--- include/block/block.h | 1 + 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/block.c b/block.c index

[Qemu-block] [PATCH v11 03/12] allow writing to the backing file

2015-11-03 Thread Wen Congyang
For block replication, we have such backing chain: secondary disk <-- hidden disk <-- active disk secondary disk is top BDS (use bacing reference), so it can be opened in read-write mode. But hidden disk is read only, and we need to write to hidden disk (backup job will write data to it).

Re: [Qemu-block] [PATCH 0/2] Fix the reopening of images in 'block-commit'

2015-11-03 Thread Kevin Wolf
Am 28.10.2015 um 14:43 hat Alberto Garcia geschrieben: > This series fixes a bug in the 'block-commit' operation under the > following scenario: > >[A] <- [B] <- [C] <- [D] > > If we do block-commit top=B base=A, the contents of [B] will be > written into [A] resulting in this chain: > >

Re: [Qemu-block] [PATCH v2 0/9] block: Fixes for bdrv_drain

2015-11-03 Thread Kevin Wolf
Am 29.10.2015 um 03:14 hat Fam Zheng geschrieben: > v2: Add Kevin's reviewed-by in patches 1, 2, 5-7, 9. > Address Kevin's reviewing comments which are: > - Explicit "ret = 0" before out label in patch 3. > - Add missing qemu_aio_unref() in patch 4. > - Recurse into all children in

Re: [Qemu-block] [PATCH v4 0/3] aio: Use epoll in aio_poll()

2015-11-03 Thread Stefan Hajnoczi
On Fri, Oct 30, 2015 at 12:06:26PM +0800, Fam Zheng wrote: > v4: Rebase onto master (with aio_disable_external): > Don't use epoll if aio_external_disabled(ctx); > Change assert on epoll_ctl return code to disable epoll; > Rerun benchmark; > > v3: Remove the redundant check in

[Qemu-block] [PATCH v11 00/12] Block replication is a very important feature which is used for

2015-11-03 Thread Wen Congyang
You can the detailed information about block replication from here: http://wiki.qemu.org/Features/BlockReplication Usage: Please refer to docs/block-replication.txt This patch series is based on the following patch series: 1. http://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg03860.html

[Qemu-block] [PATCH v11 01/12] unblock backup operations in backing file

2015-11-03 Thread Wen Congyang
Signed-off-by: Wen Congyang --- block.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/block.c b/block.c index 9a2ab68..1d6c115 100644 --- a/block.c +++ b/block.c @@ -1161,6 +1161,24 @@ void bdrv_set_backing_hd(BlockDriverState *bs,

[Qemu-block] [PATCH v11 12/12] Add a new API to start/stop replication, do checkpoint to all BDSes

2015-11-03 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 83 +++ include/block/block.h | 4 +++ 2 files changed, 87

[Qemu-block] [PATCH v3 0/3] Disallow snapshots if the overlay doesn't support backing files

2015-11-03 Thread Alberto Garcia
We are currently allowing snapshots in cases like this one: { 'execute': 'blockdev-add', 'arguments': { 'options': { 'driver': 'qcow2', 'node-name': 'new0', 'file': { 'driver': 'file', 'filename':

[Qemu-block] [PATCH v3 1/3] block: Disallow snapshots if the overlay doesn't support backing files

2015-11-03 Thread Alberto Garcia
This addresses scenarios like this one: { 'execute': 'blockdev-add', 'arguments': { 'options': { 'driver': 'qcow2', 'node-name': 'new0', 'file': { 'driver': 'file', 'filename': 'new.qcow2',

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] dataplane: simplify indirect descriptor read

2015-11-03 Thread Igor Mammedov
On Mon, 2 Nov 2015 17:43:16 + Stefan Hajnoczi wrote: > On Wed, Oct 28, 2015 at 05:48:02PM +0200, Michael S. Tsirkin wrote: > > Use address_space_read to make sure we handle the case of an indirect > > descriptor crossing DIMM boundary correctly. > > > > Signed-off-by:

Re: [Qemu-block] [Qemu-devel] [PATCH v3 2/3] block: Remove inner quotation marks in iotest 085

2015-11-03 Thread Alberto Garcia
On Tue 03 Nov 2015 04:12:44 PM CET, Eric Blake wrote: > On 11/03/2015 03:32 AM, Alberto Garcia wrote: >> This patch removes the inner quotation marks in all cases like this: >> >>cmd=" ... "${variable}" ... " >> >> Signed-off-by: Alberto Garcia >> --- >>

Re: [Qemu-block] [Qemu-devel] [PATCH v10 00/14] block: incremental backup transactions using BlockJobTxn

2015-11-03 Thread John Snow
On 11/03/2015 10:22 AM, Stefan Hajnoczi wrote: > On Fri, Oct 23, 2015 at 07:56:38PM -0400, John Snow wrote: >> Welcome to V10! >> >> Where'd 8 and 9 go? Private off-list missives from Fam. >> Now you, I, and everyone on qemu-devel are staring at V10. >> >> What's new in V10? >> >> I replaced the

Re: [Qemu-block] [Qemu-devel] [PATCH v10 12/14] block: add transactional properties

2015-11-03 Thread John Snow
On 11/03/2015 10:23 AM, Eric Blake wrote: > On 10/23/2015 05:56 PM, John Snow wrote: >> Add both transactional properties to the QMP transactional interface, >> and add the BlockJobTxn that we create as a result of the err-cancel >> property to the BlkActionState structure. >> >> [split up from

Re: [Qemu-block] [Qemu-devel] [PATCH v10 00/14] block: incremental backup transactions using BlockJobTxn

2015-11-03 Thread John Snow
On 11/03/2015 12:46 PM, John Snow wrote: > > > On 11/03/2015 10:22 AM, Stefan Hajnoczi wrote: >> On Fri, Oct 23, 2015 at 07:56:38PM -0400, John Snow wrote: >>> Welcome to V10! >>> >>> Where'd 8 and 9 go? Private off-list missives from Fam. >>> Now you, I, and everyone on qemu-devel are staring

[Qemu-block] [PATCH v3 2/3] qemu-io: Check for trailing chars

2015-11-03 Thread John Snow
Make sure there's not trailing garbage, e.g. "64k-whatever-i-want-here" Reported-by: Max Reitz Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- qemu-io-cmds.c | 9 - 1 file changed,

[Qemu-block] [PATCH v3 0/3] qemu-io: clean up cvtnum usage

2015-11-03 Thread John Snow
cvtnum returns an int64_t, not an int, so correct the lvalue types wherever it is used. While we're at it, make the error messages more meaningful and hopefully less confusing. v3: - pulled a lot of loose yarn, now missing my sweater (Updated patch 1 even further, reported-by Kevin) v2: -

[Qemu-block] [PATCH v3 3/3] qemu-io: Correct error messages

2015-11-03 Thread John Snow
Reported-by: Max Reitz Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- qemu-io-cmds.c | 53 ++--- 1 file changed, 34 insertions(+), 19

[Qemu-block] [PATCH v3 1/3] qemu-io: fix cvtnum lval types

2015-11-03 Thread John Snow
cvtnum() returns int64_t: we should not be storing this result inside of an int. In a few cases, we need an extra sprinkling of error handling where we expect to pass this number on towards a function that expects something smaller than int64_t. Reported-by: Max Reitz

[Qemu-block] [PATCH v2] iscsi: Translate scsi sense into error code

2015-11-03 Thread Fam Zheng
Previously we return -EIO blindly when anything goes wrong. Add a helper function to parse sense fields and try to make the return code more meaningful. This also fixes the default werror configuration (enospc) when we're using qcow2 on an iscsi lun. The old -EIO not being treated as out of space

Re: [Qemu-block] [PATCH v10 08/14] blockjob: Simplify block_job_finish_sync

2015-11-03 Thread Stefan Hajnoczi
On Fri, Oct 23, 2015 at 07:56:46PM -0400, John Snow wrote: > +block_job_ref(job); > finish(job, _err); > if (local_err) { > error_propagate(errp, local_err); > return -EBUSY; Refcount leak, missing block_job_unref(job). signature.asc Description: PGP signature

[Qemu-block] [PATCH v11 08/12] Add new block driver interfaces to control block replication

2015-11-03 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Cc: Luiz Capitulino Cc: Michael Roth Reviewed-by: Paolo Bonzini

Re: [Qemu-block] [PATCH v4 3/3] aio: Introduce aio-epoll.c

2015-11-03 Thread Stefan Hajnoczi
On Mon, Nov 02, 2015 at 09:33:19PM +0800, Fam Zheng wrote: > On Mon, 11/02 13:19, Stefan Hajnoczi wrote: > > On Mon, Nov 02, 2015 at 10:32:54AM +0800, Fam Zheng wrote: > > > On Fri, 10/30 10:07, Stefan Hajnoczi wrote: > > > > On Fri, Oct 30, 2015 at 12:06:29PM +0800, Fam Zheng wrote: > > > > > To

Re: [Qemu-block] [PATCH v10 03/14] block: rename BlkTransactionState and BdrvActionOps

2015-11-03 Thread Jeff Cody
On Fri, Oct 23, 2015 at 07:56:41PM -0400, John Snow wrote: > These structures are misnomers, somewhat. > > (1) BlockTransactionState is not state for a transaction, > but is rather state for a single transaction action. > Rename it "BlkActionState" to be more accurate. > > (2) The