Re: [Qemu-devel] [PATCH v17 03/14] block: Replace in_use with operation blocker

2014-04-06 Thread Jeff Cody
On Mon, Mar 10, 2014 at 03:25:59PM +0800, Fam Zheng wrote: > This drops BlockDriverState.in_use with op_blockers: > > - Call bdrv_op_block_all in place of bdrv_set_in_use(bs, 1). > - Call bdrv_op_unblock_all in place of bdrv_set_in_use(bs, 0). > - Check bdrv_op_is_blocked() in place of bdrv_

Re: [Qemu-devel] [PATCH v17 03/14] block: Replace in_use with operation blocker

2014-04-06 Thread Jeff Cody
On Sun, Apr 06, 2014 at 08:10:58PM -0400, Jeff Cody wrote: > On Mon, Mar 10, 2014 at 03:25:59PM +0800, Fam Zheng wrote: > > This drops BlockDriverState.in_use with op_blockers: > > > > - Call bdrv_op_block_all in place of bdrv_set_in_use(bs, 1). > > - Call bdrv

Re: [Qemu-devel] [PATCH v17 06/14] block: Add backing_blocker in BlockDriverState

2014-04-06 Thread Jeff Cody
On Mon, Mar 10, 2014 at 03:26:02PM +0800, Fam Zheng wrote: > This makes use of op_blocker and blocks all the operations except for > commit target, on each BlockDriverState->backing_hd. > > The asserts for op_blocker in bdrv_swap are removed because with this > change, the target of block commit h

Re: [Qemu-devel] [PATCH v17 08/14] block: Support dropping active in bdrv_drop_intermediate

2014-04-07 Thread Jeff Cody
On Mon, Mar 10, 2014 at 03:26:04PM +0800, Fam Zheng wrote: > Dropping intermediate could be useful both for commit and stream, and > BDS refcnt plus bdrv_swap could do most of the job nicely. It also needs > to work with op blockers. > > Signed-off-by: Fam Zheng > --- > block.c| 139 > +

Re: [Qemu-devel] [PATCH v17 08/14] block: Support dropping active in bdrv_drop_intermediate

2014-04-09 Thread Jeff Cody
On Tue, Apr 08, 2014 at 05:07:38PM +0800, Fam Zheng wrote: > On Tue, 04/08 10:15, Markus Armbruster wrote: > > Jeff Cody writes: > > > > > On Mon, Mar 10, 2014 at 03:26:04PM +0800, Fam Zheng wrote: > > >> Dropping intermediate could be useful both for comm

Re: [Qemu-devel] [PATCH v17 06/14] block: Add backing_blocker in BlockDriverState

2014-04-09 Thread Jeff Cody
On Mon, Mar 10, 2014 at 03:26:02PM +0800, Fam Zheng wrote: > This makes use of op_blocker and blocks all the operations except for > commit target, on each BlockDriverState->backing_hd. > > The asserts for op_blocker in bdrv_swap are removed because with this > change, the target of block commit h

[Qemu-devel] [PATCH v2 1/5] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests

2014-04-09 Thread Jeff Cody
() Kills the running QEMU processes, and removes the fifos. Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.qemu | 195 + 1 file changed, 195 insertions(+) create mode 100644 tests/qemu-iotests/common.qemu diff --git a/tests/qemu-iotests

[Qemu-devel] [PATCH v2 4/5] block: qemu-iotests - fix image cleanup when using spaced pathnames

2014-04-09 Thread Jeff Cody
The _rm_test_img() function in common.rc did not quote the image file, which left droppings in the scratch directory (and performed a potentially unsafe rm -f). This adds the necessary quotes. Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.rc | 4 ++-- 1 file changed, 2 insertions

[Qemu-devel] [PATCH v2 0/5] Add common QEMU control functionality to qemu-iotests

2014-04-09 Thread Jeff Cody
common.rc, test 019, and test 086. Jeff Cody (5): block: qemu-iotests - add common.qemu, for bash-controlled qemu tests block: qemu-iotests - update 085 to use common.qemu block: qemu-iotests - test for live migration block: qemu-iotests - fix image cleanup when using spaced pathnames b

[Qemu-devel] [PATCH v2 2/5] block: qemu-iotests - update 085 to use common.qemu

2014-04-09 Thread Jeff Cody
The new functionality of common.qemu implements the QEMU control and communication functionality that was originally in test 085. This removes that now-duplicate functionality, and uses the common.qemu functions. Signed-off-by: Jeff Cody --- tests/qemu-iotests/085 | 73

[Qemu-devel] [PATCH v2 3/5] block: qemu-iotests - test for live migration

2014-04-09 Thread Jeff Cody
This is an initial, simple live migration test from one running VM to another, using monitor commands. This is also an example on using the new common.qemu functions for controlling multiple running qemu instances, for tests that need a live qemu vm. Signed-off-by: Jeff Cody --- tests/qemu

[Qemu-devel] [PATCH v2 5/5] block: qemu-iotests: make test 019 and 086 work with spaced pathnames

2014-04-09 Thread Jeff Cody
Both tests 019 and 086 need proper quotations to work with pathnames that contain spaces. Signed-off-by: Jeff Cody --- tests/qemu-iotests/019 | 2 +- tests/qemu-iotests/086 | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/019 b/tests/qemu-iotests

Re: [Qemu-devel] [PATCH v2 3/5] block: qemu-iotests - test for live migration

2014-04-10 Thread Jeff Cody
On Thu, Apr 10, 2014 at 02:16:46PM +0800, Fam Zheng wrote: > On Wed, 04/09 22:41, Jeff Cody wrote: > > This is an initial, simple live migration test from one > > running VM to another, using monitor commands. > > > > This is also an example on using the new co

Re: [Qemu-devel] [PATCH v2 4/5] block: qemu-iotests - fix image cleanup when using spaced pathnames

2014-04-10 Thread Jeff Cody
On Thu, Apr 10, 2014 at 03:53:57PM +0800, Fam Zheng wrote: > On Wed, 04/09 22:41, Jeff Cody wrote: > > The _rm_test_img() function in common.rc did not quote the image > > file, which left droppings in the scratch directory (and performed > > a potentially unsafe rm -f). &

Re: [Qemu-devel] [PATCH v2 4/5] block: qemu-iotests - fix image cleanup when using spaced pathnames

2014-04-10 Thread Jeff Cody
On Thu, Apr 10, 2014 at 08:48:10AM -0600, Eric Blake wrote: > On 04/10/2014 08:43 AM, Eric Blake wrote: > > On 04/10/2014 06:53 AM, Jeff Cody wrote: > > > >>>> +++ b/tests/qemu-iotests/common.rc > >>>> @@ -178,10 +178,10 @@ _rm_test_img() > >>

Re: [Qemu-devel] [PATCH v2 1/5] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests

2014-04-10 Thread Jeff Cody
On Thu, Apr 10, 2014 at 01:27:37PM +0800, Fam Zheng wrote: > On Wed, 04/09 22:41, Jeff Cody wrote: > > This creates some common functions for bash language qemu-iotests > > to control, and communicate with, a running QEMU process. > > > > 4 functions are introduced: &

Re: [Qemu-devel] [PATCH v2 2/5] block: qemu-iotests - update 085 to use common.qemu

2014-04-10 Thread Jeff Cody
On Thu, Apr 10, 2014 at 02:10:48PM +0800, Fam Zheng wrote: > On Wed, 04/09 22:41, Jeff Cody wrote: > > The new functionality of common.qemu implements the QEMU control > > and communication functionality that was originally in test 085. > > > > This removes that now-d

[Qemu-devel] [PATCH v3 0/5] Add common QEMU control functionality to qemu-iotests

2014-04-10 Thread Jeff Cody
functionality. Some minor fixups along the way, to clear up spaced pathname issues, for common.rc, test 019, and test 086. Jeff Cody (5): block: qemu-iotests - add common.qemu, for bash-controlled qemu tests block: qemu-iotests - update 085 to use common.qemu block: qemu-iotests - test for liv

[Qemu-devel] [PATCH v3 1/5] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests

2014-04-10 Thread Jeff Cody
() Kills the running QEMU processes, and removes the fifos. Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.qemu | 195 + 1 file changed, 195 insertions(+) create mode 100644 tests/qemu-iotests/common.qemu diff --git a/tests/qemu-iotests

[Qemu-devel] [PATCH v3 2/5] block: qemu-iotests - update 085 to use common.qemu

2014-04-10 Thread Jeff Cody
The new functionality of common.qemu implements the QEMU control and communication functionality that was originally in test 085. This removes that now-duplicate functionality, and uses the common.qemu functions. Reviewed-by: Benoit Canet Signed-off-by: Jeff Cody --- tests/qemu-iotests/085

[Qemu-devel] [PATCH v3 3/5] block: qemu-iotests - test for live migration

2014-04-10 Thread Jeff Cody
This is an initial, simple live migration test from one running VM to another, using monitor commands. This is also an example on using the new common.qemu functions for controlling multiple running qemu instances, for tests that need a live qemu vm. Signed-off-by: Jeff Cody --- tests/qemu

[Qemu-devel] [PATCH v3 4/5] block: qemu-iotests - fix image cleanup when using spaced pathnames

2014-04-10 Thread Jeff Cody
The _rm_test_img() function in common.rc did not quote the image file, which left droppings in the scratch directory (and performed a potentially unsafe rm -f). This adds the necessary quotes. Reviewed-by: Benoit Canet Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.rc | 4 ++-- 1 file

[Qemu-devel] [PATCH v3 5/5] block: qemu-iotests: make test 019 and 086 work with spaced pathnames

2014-04-10 Thread Jeff Cody
Both tests 019 and 086 need proper quotations to work with pathnames that contain spaces. Reviewed-by: Benoit Canet Reviewed-by: Fam Zheng Signed-off-by: Jeff Cody --- tests/qemu-iotests/019 | 2 +- tests/qemu-iotests/086 | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff

[Qemu-devel] [PATCH] block: prefer protocol_name over format_name in bdrv_iterate_format

2014-04-15 Thread Jeff Cody
lp message: "Supported formats: ... gluster gluster+tcp gluster+unix gluster+rdma ... " Signed-off-by: Jeff Cody --- block.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 990a754..0587257 100644 --- a/block.c +++ b/block.c @@ -357

Re: [Qemu-devel] [PATCHv2 02/18] qemu-iotests: enable support for NFS protocol

2014-01-06 Thread Jeff Cody
On Sun, Jan 05, 2014 at 06:21:52PM +0100, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > tests/qemu-iotests/common| 22 +++--- > tests/qemu-iotests/common.rc |3 +++ > 2 files changed, 22 insertions(+), 3 deletions(-) > > diff --git a/tests/qemu-iotests/commo

Re: [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol

2014-01-06 Thread Jeff Cody
On Mon, Jan 06, 2014 at 07:48:25AM +0100, Peter Lieven wrote: > On 06.01.2014 06:31, Fam Zheng wrote: > >On 2014年01月06日 01:21, Peter Lieven wrote: > >>Signed-off-by: Peter Lieven > >>--- > >> tests/qemu-iotests/013 |9 - > >> tests/qemu-iotests/013.out |2 +- > >> 2 files chan

[Qemu-devel] [PATCH 2/2] block: resize backing image during active layer commit, if needed

2014-01-13 Thread Jeff Cody
ommit' will likely fail. This will automatically attempt to resize the base image, if the active layer image to be committed is larger. Signed-off-by: Jeff Cody --- block/mirror.c | 13 + 1 file changed, 13 insertions(+) diff --git a/block/mirror.c b/block/mirror.c index 2932ba

[Qemu-devel] [PATCH 0/2] block: commits of snapshots larger than backing files

2014-01-13 Thread Jeff Cody
both bdrv_commit() and commit_active_start(), this series will resize the underlying base image if needed. If the resize fails, an error will be returned. Jeff Cody (2): block: resize backing file image during offline commit, if necessary block: resize backing image during active layer commit

[Qemu-devel] [PATCH 1/2] block: resize backing file image during offline commit, if necessary

2014-01-13 Thread Jeff Cody
l likely fail. This will automatically attempt to resize the base image, if the snapshot image to be committed is larger. Signed-off-by: Jeff Cody --- block.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index 64e7d22..5e895fa 100644

[Qemu-devel] [PATCH] block: add .bdrv_reopen_prepare() stub for iscsi

2014-01-14 Thread Jeff Cody
To suppport reopen(), the .bdrv_reopen_prepare() stub must exist. iSCSI does not have anything that needs to be done to support reopen, so we can just implement the _prepare() stub. Signed-off-by: Jeff Cody --- block/iscsi.c | 9 + 1 file changed, 9 insertions(+) diff --git a/block

[Qemu-devel] [PATCH] block: do not allow read-only=on and snapshot=on to be used together

2014-01-14 Thread Jeff Cody
Having both read-only=on and snapshot=on together does not make sense; currently, the read-only argument is effectively ignored for the temporary snapshot. To prevent confusion, disallow the usage of both 'snapshot=on' and 'read-only=on'. Signed-off-by: Jeff Cody --- block

Re: [Qemu-devel] [PATCH] block: do not allow read-only=on and snapshot=on to be used together

2014-01-16 Thread Jeff Cody
On Thu, Jan 16, 2014 at 10:39:30AM +0100, Kevin Wolf wrote: > Am 14.01.2014 um 20:12 hat Jeff Cody geschrieben: > > Having both read-only=on and snapshot=on together does not make sense; > > currently, the read-only argument is effectively ignored for the > > temporary

Re: [Qemu-devel] [PATCH 0/2] block: commits of snapshots larger than backing files

2014-01-17 Thread Jeff Cody
On Fri, Jan 17, 2014 at 03:17:10PM +0800, Stefan Hajnoczi wrote: > On Mon, Jan 13, 2014 at 03:18:44PM -0500, Jeff Cody wrote: > > If a snapshot is larger than a backing file, then the offline bdrv_commit > > and > > the live active layer commit will fail with an i/o err

Re: [Qemu-devel] [PATCH 2/2] block: resize backing image during active layer commit, if needed

2014-01-17 Thread Jeff Cody
On Wed, Jan 15, 2014 at 01:58:29PM +0800, Fam Zheng wrote: > On Mon, 01/13 15:18, Jeff Cody wrote: > > If the top image to commit is the active layer, and also larger than > > the base image, then an I/O error will likely be returned during > > block-commit. > > >

[Qemu-devel] [PATCH] block: remove unnecessary code; image always r/w if snapshot=on

2014-01-21 Thread Jeff Cody
, and can be removed. This is because unless read-only=on is specified, the image will always be opened with BDRV_O_RDWR set. Signed-off-by: Jeff Cody --- block.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/block.c b/block.c index dea7591..1a16450 100644 --- a/block.c +++ b/block.c @

[Qemu-devel] [PATCH v2 1/3] block: resize backing file image during offline commit, if necessary

2014-01-21 Thread Jeff Cody
l likely fail. This will automatically attempt to resize the base image, if the snapshot image to be committed is larger. Signed-off-by: Jeff Cody --- block.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index 64e7d22..dea7591

[Qemu-devel] [PATCH v2 3/3] block: update block commit documentation regarding image truncation

2014-01-21 Thread Jeff Cody
. In the case of the base image being larger, it is not resized automatically, but once the commit has completed it is safe for the user to truncate the base image. Signed-off-by: Jeff Cody --- hmp-commands.hx | 5 + qapi-schema.json | 7 +++ qemu-img.texi| 7 ++- qmp-commands.hx

[Qemu-devel] [PATCH v2 0/3] block: commits of snapshots larger than backing files

2014-01-21 Thread Jeff Cody
uns bdrv_truncate() on the backing image to resize it to the larger size. For both bdrv_commit() and commit_active_start(), this series will resize the underlying base image if needed. If the resize fails, an error will be returned. Jeff Cody (3): block: resize backing file image during offl

[Qemu-devel] [PATCH v2 2/3] block: resize backing image during active layer commit, if needed

2014-01-21 Thread Jeff Cody
ommit' will likely fail. This will automatically attempt to resize the base image, if the active layer image to be committed is larger. Signed-off-by: Jeff Cody --- block/mirror.c | 36 1 file changed, 36 insertions(+) diff --git a/block/mirror.c b/bloc

Re: [Qemu-devel] [PATCH v2 5/5] block: add header update capability for VHDX images.

2013-04-29 Thread Jeff Cody
On Sun, Apr 28, 2013 at 06:05:53PM +0800, Fam Zheng wrote: > On Tue, 04/23 10:24, Jeff Cody wrote: > > if (flags & BDRV_O_RDWR) { > > -ret = -ENOTSUP; > > -goto fail; > > +vhdx_update_headers(bs, s, false); > > Do we really have t

Re: [Qemu-devel] [PATCH v2 3/5] block: initial VHDX driver support framework - supports open and probe

2013-04-29 Thread Jeff Cody
On Sun, Apr 28, 2013 at 05:58:55PM +0800, Fam Zheng wrote: > On Tue, 04/23 10:24, Jeff Cody wrote: > > +/* opens the specified header block from the VHDX file header section */ > > +static int vhdx_parse_header(BlockDriverState *bs, BDRVVHDXState *s) > > +{

Re: [Qemu-devel] [PATCH v2 3/5] block: initial VHDX driver support framework - supports open and probe

2013-04-29 Thread Jeff Cody
On Sun, Apr 28, 2013 at 03:29:14PM +0800, Fam Zheng wrote: > > +static void cpu_to_leguids(ms_guid *guid) > > +{ > > +cpu_to_le32s(&guid->data1); > > +cpu_to_le16s(&guid->data2); > > +cpu_to_le16s(&guid->data3); > > +} > > This one seems used in 5/5 only, so this patch fails compiling

[Qemu-devel] [PATCH v3 1/4] qemu: add castagnoli crc32c checksum algorithm

2013-04-29 Thread Jeff Cody
Check Codes with 24 and 32 Parity Bits", IEEE Transactions on Communication, Volume 41, Number 6, June 1993 Signed-off-by: Jeff Cody --- include/qemu/crc32c.h | 35 +++ util/Makefile.objs| 1 + util/crc32c.c

[Qemu-devel] [PATCH v3 0/4] Initial VHDX support

2013-04-29 Thread Jeff Cody
, the following is not yet supported: * Differencing files * Log replay (so we will refuse to open any images that are not 'clean') * .bdrv_create() * write operations other than to the header Jeff Cody (4): qemu: add castagnoli crc32c checksum algorithm block: vhdx

[Qemu-devel] [PATCH v3 3/4] block: initial VHDX driver support framework - supports open and probe

2013-04-29 Thread Jeff Cody
) - log replay / dirty logs (only clean images) This is based on Microsoft's VHDX specification: "VHDX Format Specification v0.95", published 4/12/2012 https://www.microsoft.com/en-us/download/details.aspx?id=29681 Signed-off-by: Jeff Cody --- block/Makefile.objs | 1

[Qemu-devel] [PATCH v3 2/4] block: vhdx header for the QEMU support of VHDX images

2013-04-29 Thread Jeff Cody
X specification. Signed-off-by: Jeff Cody --- block/vhdx.h | 311 +++ 1 file changed, 311 insertions(+) create mode 100644 block/vhdx.h diff --git a/block/vhdx.h b/block/vhdx.h new file mode 100644 index 000..fcddd37 --- /dev/null +++ b/block

[Qemu-devel] [PATCH v3 4/4] block: add read-only support to VHDX image format.

2013-04-29 Thread Jeff Cody
27; in the drive image options from the QEMU commandline. Signed-off-by: Jeff Cody --- block/vhdx.c | 123 ++- 1 file changed, 121 insertions(+), 2 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index 0ee10a7..e9704b1 100644 --- a/bl

Re: [Qemu-devel] [PATCH v3 0/4] Initial VHDX support

2013-05-01 Thread Jeff Cody
On Wed, May 01, 2013 at 02:43:04PM +0200, Stefan Hajnoczi wrote: > On Mon, Apr 29, 2013 at 02:48:15PM -0400, Jeff Cody wrote: > > > > Differences from v2: > > > > > > Patch 2/4: changed 2 uint8_t[16] to MSGUID (Kevin) > > re

Re: [Qemu-devel] [PATCH 2/3] qemu-iotests: exclude vmdk from 043

2013-05-07 Thread Jeff Cody
ing backing files > -_supported_fmt qcow qcow2 vmdk qed > +_supported_fmt qcow qcow2 qed > _supported_proto generic > _supported_os Linux > > -- > 1.8.1.4 > > Reviewed-by: Jeff Cody

Re: [Qemu-devel] [PATCH 1/3] qemu-iotests: exclude vmdk for test 042

2013-05-07 Thread Jeff Cody
@@ -38,7 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 > . ./common.rc > . ./common.filter > > -_supported_fmt qcow2 qcow qed vmdk > +_supported_fmt qcow2 qcow qed > _supported_proto file > _supported_os Linux > > -- > 1.8.1.4 > > Reviewed-by: Jeff Cody

Re: [Qemu-devel] [PATCH 3/3] qemu-iotests: fix 017 018 for vmdk

2013-05-07 Thread Jeff Cody
On Tue, May 07, 2013 at 07:13:05PM +0800, Fam Zheng wrote: > 017 and 018 use /bin/mv to move base img from t.IMGFMG to t.IMGFMT.base > after filling data, this is not enough for vmdk, when t.IMGFMT is only a > description text file who points to t-{flat,s001,f001,...}.IMGFMT as > data extent, so te

Re: [Qemu-devel] [PATCH V18 5/6] add-cow file format core code.

2013-05-13 Thread Jeff Cody
On Wed, Apr 10, 2013 at 04:11:52PM +0800, Dong Xu Wang wrote: > add-cow file format core code. It use block-cache.c as cache code. > It lacks of snapshot_blkdev support. > > Signed-off-by: Dong Xu Wang > --- > v17-v18: > 1) use error_report, not fprintf. > 2) remove version field from header. > 3

[Qemu-devel] [PATCH] block: Don't throw away errno via error_setg

2014-02-12 Thread Jeff Cody
errno is passed up the stack in the error message. Reported-By: Kevin Wolf Signed-off-by: Jeff Cody --- block/mirror.c | 13 + block/qcow2-snapshot.c | 8 +--- block/vmdk.c | 6 +++--- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/block

[Qemu-devel] [PATCH] block: mirror - insure that errp is not NULL

2014-02-12 Thread Jeff Cody
mirror_start_job failed or not. Reported-by: Markus Armbruster Signed-off-by: Jeff Cody --- block/mirror.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/mirror.c b/block/mirror.c index 2a43334..41bb83c 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -634,6 +634,8 @@ void

[Qemu-devel] [PATCH 0/2] qemu-iotest fixes and updates for 070

2014-02-12 Thread Jeff Cody
This fixes a bug with test 070 (incorrect output expectation), and adds additional test for log replay. Jeff Cody (2): block: qemu-iotests - fix test 070 (vhdx) block: qemu-iotests - add vhdx log replay tests for qemu-img tests/qemu-iotests/070 | 13 - tests/qemu-iotests

[Qemu-devel] [PATCH 1/2] block: qemu-iotests - fix test 070 (vhdx)

2014-02-12 Thread Jeff Cody
VHDX test 070 failed, due to different output from qemu-io / qemu when opening an image read-only that contains a log file. Filter the output, and update the expected results to match the correct output. Signed-off-by: Jeff Cody --- tests/qemu-iotests/070 | 3 ++- tests/qemu-iotests/070

[Qemu-devel] [PATCH 2/2] block: qemu-iotests - add vhdx log replay tests for qemu-img

2014-02-12 Thread Jeff Cody
VHDX logs can now be replayed via 'qemu-img check -r all'. Add tests to verify that the log replay is successful when using qemu-img. Signed-off-by: Jeff Cody --- tests/qemu-iotests/070 | 10 ++ tests/qemu-iotests/070.out | 11 +++ 2 files changed, 21 insertion

[Qemu-devel] [PATCH v2] block: mirror - use local_err to avoid NULL errp

2014-02-13 Thread Jeff Cody
mirror_start_job failed or not. To avoid this, use a local Error variable, and then propagate the error (if any) to errp. Reported-by: Markus Armbruster Signed-off-by: Jeff Cody --- block/mirror.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/block/mirror.c b/block

Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes

2014-02-14 Thread Jeff Cody
On Fri, Feb 14, 2014 at 03:21:28PM +0100, Stefan Hajnoczi wrote: > On Tue, Feb 04, 2014 at 02:26:58PM -0500, Jeff Cody wrote: > > @@ -291,23 +311,17 @@ static int qemu_gluster_open(BlockDriverState *bs, > > QDict *options, > > > > filename = q

Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes

2014-02-14 Thread Jeff Cody
On Fri, Feb 14, 2014 at 03:12:41PM +0100, Stefan Hajnoczi wrote: > On Tue, Feb 04, 2014 at 02:26:58PM -0500, Jeff Cody wrote: > > diff --git a/block/gluster.c b/block/gluster.c > > index a009b15..79af3fd 100644 > > --- a/block/gluster.c > > +++ b/block/gluster.c &g

Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes

2014-02-14 Thread Jeff Cody
On Fri, Feb 14, 2014 at 04:38:03PM +0100, Stefan Hajnoczi wrote: > On Fri, Feb 14, 2014 at 09:41:46AM -0500, Jeff Cody wrote: > > On Fri, Feb 14, 2014 at 03:21:28PM +0100, Stefan Hajnoczi wrote: > > > On Tue, Feb 04, 2014 at 02:26:58PM -0500, Jeff Cody wrote: > > > >

Re: [Qemu-devel] [PATCH v2 01/20] nbd: produce a better error if neither host nor port is passed

2014-02-14 Thread Jeff Cody
On Tue, Feb 11, 2014 at 06:03:34PM +0100, Paolo Bonzini wrote: > Before: > $ qemu-io-old > qemu-io-old> open -r -o file.driver=nbd > qemu-io-old: can't open device (null): Could not open image: Invalid > argument > $ ./qemu-io-old > qemu-io-old> open -r -o file.driver=nbd,file.

Re: [Qemu-devel] [PATCH v2 09/20] cow: correctly propagate errors

2014-02-14 Thread Jeff Cody
On Fri, Feb 14, 2014 at 05:45:40PM +0100, Kevin Wolf wrote: > Am 11.02.2014 um 18:03 hat Paolo Bonzini geschrieben: > > Signed-off-by: Paolo Bonzini > > --- > > block/cow.c | 12 +++- > > 1 file changed, 3 insertions(+), 9 deletions(-) > > > > diff --git a/block/cow.c b/block/cow.c > > i

Re: [Qemu-devel] [PATCH v2 01/20] nbd: produce a better error if neither host nor port is passed

2014-02-14 Thread Jeff Cody
On Fri, Feb 14, 2014 at 11:54:34AM -0500, Jeff Cody wrote: > On Tue, Feb 11, 2014 at 06:03:34PM +0100, Paolo Bonzini wrote: > > Before: > > $ qemu-io-old > > qemu-io-old> open -r -o file.driver=nbd > > qemu-io-old: can't open device (null): Could no

Re: [Qemu-devel] [PATCH v2 02/20] nbd: correctly propagate errors

2014-02-14 Thread Jeff Cody
On Tue, Feb 11, 2014 at 06:03:35PM +0100, Paolo Bonzini wrote: > Before: > $ ./qemu-io-old > qemu-io-old> open -r -o file.driver=nbd > one of path and host must be specified. > qemu-io-old: can't open device (null): Could not open image: Invalid > argument > $ ./qemu-io-old >

Re: [Qemu-devel] [PATCH v2 09/20] cow: correctly propagate errors

2014-02-17 Thread Jeff Cody
On Mon, Feb 17, 2014 at 02:20:10PM +0100, Paolo Bonzini wrote: > Il 17/02/2014 14:15, Fam Zheng ha scritto: > >Does this mean that error_is_set() is always used by programmer to check a > >non-NULL error pointer? Is there any case to call error_is_set(errp) without > >knowing if errp is NULL or not

Re: [Qemu-devel] [PATCH v3 13/20] vhdx: correctly propagate errors

2014-02-17 Thread Jeff Cody
ure; > - > +Error *local_err = NULL; > > s->bat = NULL; > s->first_visible_write = true; > @@ -901,8 +896,10 @@ static int vhdx_open(BlockDriverState *bs, QDict > *options, int flags, > * header update */ > vhdx_guid_generate(&s->session_guid); > > -ret = vhdx_parse_header(bs, s); > -if (ret < 0) { > +vhdx_parse_header(bs, s, &local_err); > +if (local_err != NULL) { > +error_propagate(errp, local_err); > +ret = -EINVAL; > goto fail; > } > > -- > 1.8.5.3 > > Reviewed-by: Jeff Cody

[Qemu-devel] [PATCH v2 0/2] block: add suppoort for gluster reopen

2014-02-17 Thread Jeff Cody
rotocol drivers, and thereby also enabling block-commit to gluster-based images. Jeff Cody (2): block: gluster - code movements, state storage changes block: gluster - add reopen support. block/gluster.c | 143 ++-- 1 file changed

[Qemu-devel] [PATCH v2 2/2] block: gluster - add reopen support.

2014-02-17 Thread Jeff Cody
modified at all. With reopen supported, block-commit (and offline commit) is now also supported for image files whose base image uses the native gluster protocol driver. Signed-off-by: Jeff Cody --- block/gluster.c | 102 1 file changed, 102

[Qemu-devel] [PATCH v2 1/2] block: gluster - code movements, state storage changes

2014-02-17 Thread Jeff Cody
In preparation for supporting reopen on gluster, move flag parsing out to a function. Also, store open_flags and filename in the gluster state storage struct, and add a NULL check in the gconf cleanup. Signed-off-by: Jeff Cody --- block/gluster.c | 41

Re: [Qemu-devel] [PATCH v14 06/14] block: Add backing_blocker in BlockDriverState

2014-02-19 Thread Jeff Cody
On Wed, Feb 19, 2014 at 09:42:23PM +0800, Fam Zheng wrote: > This makes use of op_blocker and blocks all the operations except for > commit target, on each BlockDriverState->backing_hd. > > The asserts for op_blocker in bdrv_swap are removed because with this > change, the target of block commit h

Re: [Qemu-devel] [PATCH v14 08/14] block: Support dropping active in bdrv_drop_intermediate

2014-02-19 Thread Jeff Cody
On Wed, Feb 19, 2014 at 09:42:25PM +0800, Fam Zheng wrote: > Dropping intermediate could be useful both for commit and stream, and > BDS refcnt plus bdrv_swap could do most of the job nicely. It also needs > to work with op blockers. > > Signed-off-by: Fam Zheng > --- > block.c| 146 > +

Re: [Qemu-devel] [PATCH v14 09/14] stream: Use bdrv_drop_intermediate and drop close_unused_images

2014-02-19 Thread Jeff Cody
On Wed, Feb 19, 2014 at 09:42:26PM +0800, Fam Zheng wrote: > This reuses the new bdrv_drop_intermediate. > > Signed-off-by: Fam Zheng > --- > block/stream.c | 30 +- > 1 file changed, 1 insertion(+), 29 deletions(-) > > diff --git a/block/stream.c b/block/stream.c >

Re: [Qemu-devel] [PATCH v14 08/14] block: Support dropping active in bdrv_drop_intermediate

2014-02-19 Thread Jeff Cody
On Wed, Feb 19, 2014 at 04:22:30PM -0500, Jeff Cody wrote: > On Wed, Feb 19, 2014 at 09:42:25PM +0800, Fam Zheng wrote: > > Dropping intermediate could be useful both for commit and stream, and > > BDS refcnt plus bdrv_swap could do most of the job nicely. It also needs >

Re: [Qemu-devel] [PATCH v14 06/14] block: Add backing_blocker in BlockDriverState

2014-02-19 Thread Jeff Cody
On Thu, Feb 20, 2014 at 01:01:38PM +0800, Fam Zheng wrote: > On Wed, 02/19 16:17, Jeff Cody wrote: > > On Wed, Feb 19, 2014 at 09:42:23PM +0800, Fam Zheng wrote: > > > This makes use of op_blocker and blocks all the operations except for > > > commit target, on each B

Re: [Qemu-devel] [PATCH v14 08/14] block: Support dropping active in bdrv_drop_intermediate

2014-02-19 Thread Jeff Cody
On Thu, Feb 20, 2014 at 12:37:17PM +0800, Fam Zheng wrote: > On Wed, 02/19 18:24, Jeff Cody wrote: > > On Wed, Feb 19, 2014 at 04:22:30PM -0500, Jeff Cody wrote: > > > On Wed, Feb 19, 2014 at 09:42:25PM +0800, Fam Zheng wrote: > > > > Dropping intermediate could

Re: [Qemu-devel] [PATCH v14 06/14] block: Add backing_blocker in BlockDriverState

2014-02-20 Thread Jeff Cody
On Thu, Feb 20, 2014 at 04:28:56PM +0800, Fam Zheng wrote: > On Thu, 02/20 00:08, Jeff Cody wrote: > > On Thu, Feb 20, 2014 at 01:01:38PM +0800, Fam Zheng wrote: > > > On Wed, 02/19 16:17, Jeff Cody wrote: > > > > On Wed, Feb 19, 2014 at 09:42:23PM +0800, Fam Zheng w

Re: [Qemu-devel] [PATCH v2 6/6] qemu-iotests: Check qemu-img command line parsing

2014-02-20 Thread Jeff Cody
On Thu, Feb 20, 2014 at 03:57:23PM +0100, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/082 | 187 +++ > tests/qemu-iotests/082.out | 436 > + > tests/qemu-iotests/group | 1 + > 3 files changed, 624 i

Re: [Qemu-devel] [PATCH v2 2/6] qemu-img create: Support multiple -o options

2014-02-20 Thread Jeff Cody
> +g_free(options); > return 0; > + > +fail: > + g_free(options); > +return 1; One minor preference: there are 3 separate cleanup spots to free 'options'. If a ret variable was used, the label 'fail:' could become 'out:', and those 3 cleanups could be consolidated to a single g_free(options). That would help any future committer not forget a cleanup spot. But, as it is correct as-is: Reviewed-by: Jeff Cody > } > > static void dump_json_image_check(ImageCheck *check, bool quiet) > -- > 1.8.1.4 > >

Re: [Qemu-devel] [PATCH v2 3/6] qemu-img convert: Support multiple -o options

2014-02-20 Thread Jeff Cody
ough. And this is an instance (the only instance) where img_convert returns -1 instead of 0 or 1. I'm not sure the implications if that changed, and became '1', so we'd probably want to preserve the return value. Since this doesn't have anything to do with this patch (alt

Re: [Qemu-devel] [PATCH v2 4/6] qemu-img amend: Support multiple -o options

2014-02-20 Thread Jeff Cody
Wolf Reviewed-by: Jeff Cody > --- > qemu-img.c | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/qemu-img.c b/qemu-img.c > index ba6e82d..d6dc7ec 100644 > --- a/qemu-img.c > +++ b/qemu-img.c > @@ -2658,7 +2658,13 @@

Re: [Qemu-devel] [PATCH v2 5/6] qemu-img: Allow -o help with incomplete argument list

2014-02-20 Thread Jeff Cody
> /* Get the filename */ > +filename = (optind < argc) ? argv[optind] : NULL; > +if (options && has_help_option(options)) { > +g_free(options); > +return print_block_option_help(filename, fmt); > +} > + Same comment as patch #2 with

Re: [Qemu-devel] [PATCH v2 1/6] qemu-option: Introduce has_help_option()

2014-02-20 Thread Jeff Cody
On Thu, Feb 20, 2014 at 03:57:18PM +0100, Kevin Wolf wrote: > This new function checks if any help option ('help' or '?') occurs > anywhere in an option string, so that things like 'cluster_size=4k,help' > are recognised. > > Signed-off-by: Kevin Wol

Re: [Qemu-devel] [PULL v2 33/37] block: vhdx - add .bdrv_create() support

2014-02-21 Thread Jeff Cody
On Fri, Feb 21, 2014 at 01:06:43PM +0100, Alexander Graf wrote: > > On 08.11.2013, at 11:12, Stefan Hajnoczi wrote: > > > From: Jeff Cody > > > > This adds support for VHDX image creation, for images of type "Fixed" > > and "Dynamic".

Re: [Qemu-devel] [PATCH v3 0/6] qemu-img: Support multiple -o options

2014-02-21 Thread Jeff Cody
/qemu-iotests/082.out > > -- > 1.8.1.4 > > Series Reviewed-by: Jeff Cody

Re: [Qemu-devel] [PATCH v2 1/2] block: gluster - code movements, state storage changes

2014-02-26 Thread Jeff Cody
On Wed, Feb 26, 2014 at 03:58:40PM +0100, Stefan Hajnoczi wrote: > On Mon, Feb 17, 2014 at 11:11:11AM -0500, Jeff Cody wrote: > > In preparation for supporting reopen on gluster, move flag > > parsing out to a function. Also, store open_flags and filename > > in the gluster

Re: [Qemu-devel] [PATCH v15 08/14] block: Support dropping active in bdrv_drop_intermediate

2014-02-26 Thread Jeff Cody
On Sun, Feb 23, 2014 at 09:54:49AM +0800, Fam Zheng wrote: > Dropping intermediate could be useful both for commit and stream, and > BDS refcnt plus bdrv_swap could do most of the job nicely. It also needs > to work with op blockers. > > Signed-off-by: Fam Zheng > --- > block.c| 137 > +

Re: [Qemu-devel] [PATCH v15 09/14] stream: Use bdrv_drop_intermediate and drop close_unused_images

2014-02-26 Thread Jeff Cody
On Sun, Feb 23, 2014 at 09:54:50AM +0800, Fam Zheng wrote: > This reuses the new bdrv_drop_intermediate. > > Signed-off-by: Fam Zheng > --- > block/stream.c | 30 +- > 1 file changed, 1 insertion(+), 29 deletions(-) > > diff --git a/block/stream.c b/block/stream.c >

Re: [Qemu-devel] [PATCH v15 05/14] block: Add bdrv_set_backing_hd()

2014-02-26 Thread Jeff Cody
On Sun, Feb 23, 2014 at 09:54:46AM +0800, Fam Zheng wrote: > This is the common but non-trivial steps to assign or change the > backing_hd of BDS. > > Signed-off-by: Fam Zheng > --- > block.c | 46 ++ > include/block/block.h | 1 + > 2 f

Re: [Qemu-devel] [PATCH v15 05/14] block: Add bdrv_set_backing_hd()

2014-02-26 Thread Jeff Cody
On Sun, Feb 23, 2014 at 09:54:46AM +0800, Fam Zheng wrote: > This is the common but non-trivial steps to assign or change the > backing_hd of BDS. > > Signed-off-by: Fam Zheng > --- > block.c | 46 ++ > include/block/block.h | 1 + > 2 f

Re: [Qemu-devel] git build from clean broken?

2014-02-27 Thread Jeff Cody
On Thu, Feb 27, 2014 at 07:38:56PM +, Peter Maydell wrote: > $ git clone git://git.qemu.org/qemu.git > [...] > $ cd qemu > $ mkdir build/a64-targets-nodbg/ && (cd build/a64-targets-nodbg/ && > '../../configure' > '--target-list=aarch64-softmmu,arm-softmmu,aarch64-linux-user,arm-linux-user' > '

Re: [Qemu-devel] [PATCH] build: build block-obj-y explicitly before recursing

2014-02-27 Thread Jeff Cody
specify block-obj-y in the dependencies of the > target subdirectories. > > Thanks to Stefan Weil and Jeff Cody for suggesting the cause of > the regression. > > Reported-by: Peter Maydell > Signed-off-by: Paolo Bonzini > --- > Makefile | 2 +- > 1 file changed, 1 in

[Qemu-devel] [PATCH] block: qemu-iotests 085 - live snapshots tests

2014-02-28 Thread Jeff Cody
tions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'virtio0', 'snapshot-file': '...' } }, { 'type': 'blockdev-snapshot-sync', 'data&

Re: [Qemu-devel] [PULL v2 33/37] block: vhdx - add .bdrv_create() support

2014-03-03 Thread Jeff Cody
On Fri, Feb 21, 2014 at 01:06:43PM +0100, Alexander Graf wrote: > > On 08.11.2013, at 11:12, Stefan Hajnoczi wrote: > > > From: Jeff Cody > > > > This adds support for VHDX image creation, for images of type "Fixed" > > and "Dynamic".

[Qemu-devel] [PATCH] block: mirror - remove code cruft that has no function

2014-03-04 Thread Jeff Cody
. Signed-off-by: Jeff Cody --- block/mirror.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index e683959..dd5ee05 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -520,9 +520,6 @@ static void mirror_complete(BlockJob *job, Error **errp) ret

Re: [Qemu-devel] [PATCH v2 2/3] block: resize backing image during active layer commit, if needed

2014-01-21 Thread Jeff Cody
On Wed, Jan 22, 2014 at 09:54:26AM +0800, Fam Zheng wrote: > On Tue, 01/21 11:31, Jeff Cody wrote: > > If the top image to commit is the active layer, and also larger than > > the base image, then an I/O error will likely be returned during > > block-commit. > > >

[Qemu-devel] [PATCH v3 2/3] block: resize backing image during active layer commit, if needed

2014-01-23 Thread Jeff Cody
ommit' will likely fail. This will automatically attempt to resize the base image, if the active layer image to be committed is larger. Signed-off-by: Jeff Cody Reviewed-by: Eric Blake --- block/mirror.c | 41 + 1 file changed, 41 insertions(+) di

[Qemu-devel] [PATCH v3 1/3] block: resize backing file image during offline commit, if necessary

2014-01-23 Thread Jeff Cody
l likely fail. This will automatically attempt to resize the base image, if the snapshot image to be committed is larger. Signed-off-by: Jeff Cody Reviewed-by: Fam Zheng Reviewed-by: Eric Blake --- block.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) di

[Qemu-devel] [PATCH v3 0/3] block: commits of snapshots larger than backing files

2014-01-23 Thread Jeff Cody
both bdrv_commit() and commit_active_start(), this series will resize the underlying base image if needed. If the resize fails, an error will be returned. Jeff Cody (3): block: resize backing file image during offline commit, if necessary block: resize backing image during active layer c

[Qemu-devel] [PATCH v3 3/3] block: update block commit documentation regarding image truncation

2014-01-23 Thread Jeff Cody
. In the case of the base image being larger, it is not resized automatically, but once the commit has completed it is safe for the user to truncate the base image. Signed-off-by: Jeff Cody Reviewed-by: Fam Zheng Reviewed-by: Eric Blake --- hmp-commands.hx | 5 + qapi-schema.json | 7

<    1   2   3   4   5   6   7   8   9   10   >