[Qemu-block] [PATCH v3 2/7] block/ssh: make compliant with coding guidelines

2017-11-07 Thread Jeff Cody
Signed-off-by: Jeff Cody <jc...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> --- block/ssh.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index de81ec8..39cacc1 100644 --- a/block/ssh.c

[Qemu-block] [PATCH v3 5/7] block/curl: check error return of curl_global_init()

2017-11-07 Thread Jeff Cody
Signed-off-by: Jeff Cody <jc...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> --- block/curl.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/block/curl.c b/block/curl.c index 2a244e2..00a9879 100644 --- a/block/curl.c +++ b/block/curl.c @@

[Qemu-block] [PATCH v4 4/4] qemu-iotests: update unsupported image formats in 194

2017-11-07 Thread Jeff Cody
<a...@ozlabs.ru> Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/194 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194 index 8d973b4..1d4214a 100755 --- a/tests/qemu-iotests/194 +++ b/tests/qemu-iotests/194 @@

[Qemu-block] [PATCH v4 2/4] block/parallels: Do not update header or truncate image when INMIGRATE

2017-11-07 Thread Jeff Cody
If we write or modify the image file while the QEMU run state is INMIGRATE, then the BDRV_O_INACTIVE BDS flag is set. This will cause an assert, since the image is marked inactive. Make sure we obey this flag. Tested-by: Alexey Kardashevskiy <a...@ozlabs.ru> Signed-off-by: Jeff Co

[Qemu-block] [PATCH v4 1/4] block/vhdx.c: Don't blindly update the header

2017-11-07 Thread Jeff Cody
evskiy <a...@ozlabs.ru> Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/vhdx.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index 7ae4589..9956933 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -1008,13 +1008,6 @@ static int vhdx_open(BlockDriv

[Qemu-block] [PATCH v4 3/4] block/parallels: add migration blocker

2017-11-07 Thread Jeff Cody
-by: Jeff Cody <jc...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com> --- block/parallels.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/block/parallels.c b/block/parallels.c index 7b7a3ef..9545761 100644 --- a/block/parallels.c +++ b/block/parallels.c @@

[Qemu-block] [PATCH v4 0/4] Don't write headers if BDS is INACTIVE

2017-11-07 Thread Jeff Cody
ts in 194' v1: VHDX and Parallels both blindly write headers to the image file if the images are opened R/W. This causes an assert if the QEMU run state is INMIGRATE. Jeff Cody (4): block/vhdx.c: Don't blindly update the header block/parallels: Do not update header or truncate image when

[Qemu-block] [PATCH v3 3/4] block/parallels: add migration blocker

2017-11-06 Thread Jeff Cody
-by: Jeff Cody <jc...@redhat.com> --- block/parallels.c | 12 1 file changed, 12 insertions(+) diff --git a/block/parallels.c b/block/parallels.c index 7b7a3ef..ffe0a79 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -35,6 +35,7 @@ #include "qemu/module.h"

[Qemu-block] [PATCH v3 4/4] qemu-iotests: update unsupported image formats in 194

2017-11-06 Thread Jeff Cody
<a...@ozlabs.ru> Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/194 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194 index 8d973b4..1d4214a 100755 --- a/tests/qemu-iotests/194 +++ b/tests/qemu-iotests/194 @@

[Qemu-block] [PATCH v3 0/4] Don't write headers if BDS is INACTIVE

2017-11-06 Thread Jeff Cody
assert if the QEMU run state is INMIGRATE. Jeff Cody (4): block/vhdx.c: Don't blindly update the header block/parallels: Do not update header or truncate image when INMIGRATE block/parallels: add migration blocker qemu-iotests: update unsupported image formats in 194 block/parallels.c

[Qemu-block] [PATCH v3 2/4] block/parallels: Do not update header or truncate image when INMIGRATE

2017-11-06 Thread Jeff Cody
If we write or modify the image file while the QEMU run state is INMIGRATE, then the BDRV_O_INACTIVE BDS flag is set. This will cause an assert, since the image is marked inactive. Make sure we obey this flag. Tested-by: Alexey Kardashevskiy <a...@ozlabs.ru> Signed-off-by: Jeff Co

[Qemu-block] [PATCH v3 1/4] block/vhdx.c: Don't blindly update the header

2017-11-06 Thread Jeff Cody
evskiy <a...@ozlabs.ru> Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/vhdx.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index 7ae4589..9956933 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -1008,13 +1008,6 @@ static int vhdx_open(BlockDriv

Re: [Qemu-block] [PATCH v2 2/3] block/parallals: Do not update header or truncate image when INMIGRATE

2017-11-06 Thread Jeff Cody
On Mon, Nov 06, 2017 at 03:23:43PM -0500, Jeff Cody wrote: > On Fri, Nov 03, 2017 at 02:08:13PM +0300, Denis V. Lunev wrote: > > On 11/03/2017 02:05 PM, Stefan Hajnoczi wrote: > > > On Mon, Oct 30, 2017 at 02:10:27PM +0100, Jeff Cody wrote: > > >> If we write

Re: [Qemu-block] [PATCH v2 2/3] block/parallals: Do not update header or truncate image when INMIGRATE

2017-11-06 Thread Jeff Cody
On Fri, Nov 03, 2017 at 02:08:13PM +0300, Denis V. Lunev wrote: > On 11/03/2017 02:05 PM, Stefan Hajnoczi wrote: > > On Mon, Oct 30, 2017 at 02:10:27PM +0100, Jeff Cody wrote: > >> If we write or modify the image file while the QEMU run state is > >> INMIGRATE, then t

Re: [Qemu-block] [PATCH] qemu-iotests: Use -nographic in 182

2017-10-30 Thread Jeff Cody
ic -monitor stdio \ > -drive file=$TEST_IMG,if=none,id=drive0,file.locking=on \ > -device $virtioblk,drive=drive0 2>&1 | _filter_testdir 2>&1 | > _filter_qemu | > -- > 2.13.6 > > Reviewed-by: Jeff Cody <jc...@redhat.com>

[Qemu-block] [PATCH v2 3/3] qemu-iotests: update unsupported image formats in 194

2017-10-30 Thread Jeff Cody
Test 194 checks for 'luks' to exclude as an unsupported format, However, most formats are unsupported, due to migration blockers. Rather than specifying a blacklist of unsupported formats, whitelist supported formats (specifically, qcow2, qed, raw, dmg). Signed-off-by: Jeff Cody <

[Qemu-block] [PATCH v2 1/3] block/vhdx.c: Don't blindly update the header

2017-10-30 Thread Jeff Cody
the image is written. And lo and behold, we do just that, via vhdx_user_visible_write() in vhdx_co_writev(). This means the call to vhdx_update_headers() in vhdx_open() is likely just vestigial, and can be removed. Reported-by: Alexey Kardashevskiy <a...@ozlabs.ru> Signed-off-by: Jeff Co

[Qemu-block] [PATCH v2 2/3] block/parallals: Do not update header or truncate image when INMIGRATE

2017-10-30 Thread Jeff Cody
If we write or modify the image file while the QEMU run state is INMIGRATE, then the BDRV_O_INACTIVE BDS flag is set. This will cause an assert, since the image is marked inactive. Make sure we obey this flag. Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/parallels.c | 7 ++--

[Qemu-block] [PATCH v2 0/3] Don't write headers if BDS is INACTIVE

2017-10-30 Thread Jeff Cody
ats in 194' v1: VHDX and Parallels both blindly write headers to the image file if the images are opened R/W. This causes an assert if the QEMU run state is INMIGRATE. Jeff Cody (3): block/vhdx.c: Don't blindly update the header block/parallals: Do not update header or truncate image w

Re: [Qemu-block] [PATCH 3/4] block/parallels: Don't update header until the first actual write

2017-10-27 Thread Jeff Cody
On Fri, Oct 27, 2017 at 11:09:19AM +0200, Kevin Wolf wrote: > Am 27.10.2017 um 10:57 hat Jeff Cody geschrieben: > > The on disk image format 'inuse' header field is updated blindly if the > > image is opened RDWR. This can cause problems if the QEMU runstate is > > set t

[Qemu-block] [PATCH 2/4] block/parallels: code movement

2017-10-27 Thread Jeff Cody
Code movement, to make subsequent patches simpler. Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/parallels.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 2b6c6e5709..fed199eccd

[Qemu-block] [PATCH 1/4] block/vhdx.c: Don't blindly update the header

2017-10-27 Thread Jeff Cody
the image is written. And lo and behold, we do just that, via vhdx_user_visible_write() in vhdx_co_writev(). This means the call to vhdx_update_headers() in vhdx_open() is likely just vestigial, and can be removed. Reported-by: Alexey Kardashevskiy <a...@ozlabs.ru> Signed-off-by: Jeff Co

[Qemu-block] [PATCH 3/4] block/parallels: Don't update header until the first actual write

2017-10-27 Thread Jeff Cody
in VHDX; latch the first write, and update the header the first time we modify the file. Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/parallels.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/block/parallels.c b/block/parallels.c

[Qemu-block] [PATCH 0/4] Don't write headers if BDS is INACTIVE

2017-10-27 Thread Jeff Cody
VHDX and Parallels both blindly write headers to the image file if the images are opened R/W. This causes an assert if the QEMU run state is INMIGRATE. Rather than blindly write on open, latch the first write to the image, and update the header then. Jeff Cody (4): block/vhdx.c: Don't blindly

[Qemu-block] [PATCH 4/4] qemu-iotests: update unsupported image formats in 194

2017-10-27 Thread Jeff Cody
Test 194 checks for 'luks' to exclude as an unsupported format, However, most formats are unsupported, due to migration blockers. Rather than specifying a blacklist of unsupported formats, whitelist supported formats (specifically, qcow2, qed, raw, dmg). Signed-off-by: Jeff Cody <

Re: [Qemu-block] [PATCH] qemu-img.1: Image invalidation on qemu-img commit

2017-10-26 Thread Jeff Cody
@code{-b} implies @code{-d} (so that > +the top image stays valid). > > @item compare [-f @var{fmt}] [-F @var{fmt}] [-T @var{src_cache}] [-p] [-s] > [-q] @var{filename1} @var{filename2} > > -- > 2.13.6 > > Reviewed-by: Jeff Cody <jc...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH v5 03/10] qemu-iotests: automatically clean up bash protocol servers

2017-10-19 Thread Jeff Cody
On Thu, Oct 19, 2017 at 12:23:39PM +0200, Paolo Bonzini wrote: > On 18/10/2017 19:27, Jeff Cody wrote: > > On Wed, Oct 18, 2017 at 06:39:26PM +0200, Paolo Bonzini wrote: > >> On 18/10/2017 18:19, Jeff Cody wrote: > >>>>> Here is what we

Re: [Qemu-block] [Qemu-devel] [PATCH v5 03/10] qemu-iotests: automatically clean up bash protocol servers

2017-10-18 Thread Jeff Cody
On Wed, Oct 18, 2017 at 06:39:26PM +0200, Paolo Bonzini wrote: > On 18/10/2017 18:19, Jeff Cody wrote: > >>> Here is what we need from common.rc for this series: > >>> > >>> _rm_test_img > >>> _cleanup_nbd > >>> _cleanup_vxhs >

Re: [Qemu-block] [Qemu-devel] [PATCH v5 03/10] qemu-iotests: automatically clean up bash protocol servers

2017-10-18 Thread Jeff Cody
On Wed, Oct 18, 2017 at 05:51:53PM +0200, Paolo Bonzini wrote: > On 18/10/2017 17:50, Jeff Cody wrote: > > Here is what we need from common.rc for this series: > > > > _rm_test_img > > _cleanup_nbd > > _cleanup_vxhs > > _cleanup_rbd >

Re: [Qemu-block] [Qemu-devel] [PATCH v5 03/10] qemu-iotests: automatically clean up bash protocol servers

2017-10-18 Thread Jeff Cody
On Wed, Oct 18, 2017 at 05:39:40PM +0200, Paolo Bonzini wrote: > On 18/10/2017 17:34, Jeff Cody wrote: > >> Well, I have no idea (hence the "not very constructive" part). I'm only > >> "nacking" the sourcing of common.rc in the check script. > >>

Re: [Qemu-block] [Qemu-devel] [PATCH v5 03/10] qemu-iotests: automatically clean up bash protocol servers

2017-10-18 Thread Jeff Cody
On Wed, Oct 18, 2017 at 05:16:44PM +0200, Paolo Bonzini wrote: > On 18/10/2017 17:03, Jeff Cody wrote: > > On Wed, Oct 18, 2017 at 04:46:20PM +0200, Paolo Bonzini wrote: > >> On 17/10/2017 18:31, Jeff Cody wrote: > >>> ) > >>> else &

Re: [Qemu-block] [Qemu-devel] [PATCH v5 03/10] qemu-iotests: automatically clean up bash protocol servers

2017-10-18 Thread Jeff Cody
On Wed, Oct 18, 2017 at 04:46:20PM +0200, Paolo Bonzini wrote: > On 17/10/2017 18:31, Jeff Cody wrote: > > ) > > else > > +# Do this in a sub-shell, so we are operating on the right > > +

Re: [Qemu-block] [PATCH v5 05/10] qemu-iotests: change qemu pid and fd tracking / cleanup

2017-10-18 Thread Jeff Cody
On Tue, Oct 17, 2017 at 12:31:50PM -0400, Jeff Cody wrote: > So that later patches can cleanup running qemu processes called from > different subshells, track resources to cleanup in pid and fd list > files. > > In subsquent patches, ./check will kill all QEMU pro

Re: [Qemu-block] [PATCH v5 04/10] qemu-iotests: remove file cleanup from bash tests

2017-10-18 Thread Jeff Cody
On Wed, Oct 18, 2017 at 08:46:46AM -0500, Eric Blake wrote: > On 10/17/2017 11:31 AM, Jeff Cody wrote: > > All files for a given test are now self-contained in a subdirectory, > > and therefore the "./check" script can do all file-related cleanup > > without any h

Re: [Qemu-block] [PATCH v5 10/10] qemu-iotests: add support for running multi-threaded iotests

2017-10-17 Thread Jeff Cody
On Tue, Oct 17, 2017 at 12:31:55PM -0400, Jeff Cody wrote: > This adds support for running qemu-iotests in an arbitrary number > of sub-processes, so that tests can be run in parallel. > > This necessarily changes the output format, although it should still > be familiar. If you

Re: [Qemu-block] [PATCH v5 01/10] qemu-iotests: refuse to run if TEST_DIR contains spaces

2017-10-17 Thread Jeff Cody
On Tue, Oct 17, 2017 at 08:03:56PM -0500, Eric Blake wrote: > On 10/17/2017 11:31 AM, Jeff Cody wrote: > > Currently, not all qemu-iotests work if TEST_DIR has spaces, and they > > also might not be safe. Refuse to run if TEST_DIR in this case, at > > least until all tes

[Qemu-block] [PATCH v5 06/10] qemu-iotests: make ./check automatically reap QEMU processes

2017-10-17 Thread Jeff Cody
Check will now take care of cleaning up all QEMU processes started from bash tests using the common.qemu framework. This also paves the way to added another check option to keep QEMU processes around, in the case of a failed test. Signed-off-by: Jeff Cody <jc...@redhat.com> --- test

[Qemu-block] [PATCH v5 09/10] qemu-iotests: add option to save temp files on error

2017-10-17 Thread Jeff Cody
Now that ./check takes care of cleaning up after each tests, it can also selectively not clean up. Add option to leave all output from tests intact if that test encountered an error. Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/check | 13 - 1 file chang

[Qemu-block] [PATCH v5 07/10] qemu-iotests: run python tests in own subdirectories

2017-10-17 Thread Jeff Cody
the test file. In python tests using iiotests.QMPTestCase, any reference to 'iotests.test_dir' should be replaced by 'self.workdir'. This may also require changing the scope of path name variables. Suggested-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Jeff Cody <jc...@r

[Qemu-block] [PATCH v5 03/10] qemu-iotests: automatically clean up bash protocol servers

2017-10-17 Thread Jeff Cody
For bash tests, this allows 'check' to reap all launch protocol servers / processes, after a test has finished running. Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/check | 13 +++ tests/qemu-iotests/common.rc | 93 +

[Qemu-block] [PATCH v5 10/10] qemu-iotests: add support for running multi-threaded iotests

2017-10-17 Thread Jeff Cody
' tests in subsequent patches, that complete designated single-thread jobs at the end. * Running protocol tests multi-threaded may fail, as multiple tests may try to bind the same address. If '-j' is not specified, the default is a single iotest being run at a time. Signed-off-by: Jeff

[Qemu-block] [PATCH v5 02/10] qemu-iotests: set TEST_DIR to a unique dir for each test

2017-10-17 Thread Jeff Cody
-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/check | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index e2163cc..5ae34bf 100755 ---

[Qemu-block] [PATCH v5 04/10] qemu-iotests: remove file cleanup from bash tests

2017-10-17 Thread Jeff Cody
eanup_qemu. Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/001 | 6 -- tests/qemu-iotests/002 | 6 -- tests/qemu-iotests/003 | 6 -- tests/qemu-iotests/004 | 6 -- tests/qemu-iotests/005 | 6 -- tests/qemu-iotests/007 |

[Qemu-block] [PATCH v5 00/10] qemu-iotests improvements

2017-10-17 Thread Jeff Cody
es on error' 010/10:[down] 'qemu-iotests: add support for running multi-threaded iotests' Jeff Cody (10): qemu-iotests: refuse to run if TEST_DIR contains spaces qemu-iotests: set TEST_DIR to a unique dir for each test qemu-iotests: automatically clean up bash protocol servers qemu-iote

[Qemu-block] [PATCH v5 01/10] qemu-iotests: refuse to run if TEST_DIR contains spaces

2017-10-17 Thread Jeff Cody
Currently, not all qemu-iotests work if TEST_DIR has spaces, and they also might not be safe. Refuse to run if TEST_DIR in this case, at least until all tests are fixed sometime in the future. Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/check | 8 1 file c

[Qemu-block] [PATCH v5 05/10] qemu-iotests: change qemu pid and fd tracking / cleanup

2017-10-17 Thread Jeff Cody
(unless they want to do so as part of the test, e.g. wait for a process to end such as migration). Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/common.qemu | 82 -- tests/qemu-iotests/common.rc | 3 +- 2 files changed, 64 insertions(

Re: [Qemu-block] [Qemu-devel] [PATCH v4 00/10] qemu-iotests improvements

2017-10-17 Thread Jeff Cody
On Mon, Oct 16, 2017 at 10:44:27PM -0700, no-re...@patchew.org wrote: > Hi, > > This series failed automatic build test. Please find the testing commands and > their output below. If you have docker installed, you can probably reproduce > it > locally. > > Type: series > Message-id:

[Qemu-block] [PATCH v4 10/10] qemu-iotests: add support for running multi-threaded iotests

2017-10-16 Thread Jeff Cody
' tests in subsequent patches, that complete designated single-thread jobs at the end. * Running protocol tests multi-threaded may fail, as multiple tests may try to bind the same address. If '-j' is not specified, the default is a single iotest being run at a time. Signed-off-by: Jeff

[Qemu-block] [PATCH v4 04/10] qemu-iotests: remove file cleanup from bash tests

2017-10-16 Thread Jeff Cody
eanup_qemu. Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/001 | 6 -- tests/qemu-iotests/002 | 6 -- tests/qemu-iotests/003 | 6 -- tests/qemu-iotests/004 | 6 -- tests/qemu-iotests/005 | 6 -- tests/qemu-iotests/007 |

[Qemu-block] [PATCH v4 06/10] qemu-iotests: make ./check automatically reap QEMU processes

2017-10-16 Thread Jeff Cody
Check will now take care of cleaning up all QEMU processes started from bash tests using the common.qemu framework. This also paves the way to added another check option to keep QEMU processes around, in the case of a failed test. Signed-off-by: Jeff Cody <jc...@redhat.com> --- test

[Qemu-block] [PATCH v4 00/10] qemu-iotests improvements

2017-10-16 Thread Jeff Cody
mu-iotests: modify python tests to run from subdir' 009/10:[0017] [FC] 'qemu-iotests: add option to save temp files on error' 010/10:[down] 'qemu-iotests: add support for running multi-threaded iotests' Jeff Cody (10): qemu-iotests: refuse to run if TEST_DIR contains spaces qemu-iotests: se

[Qemu-block] [PATCH v4 02/10] qemu-iotests: set TEST_DIR to a unique dir for each test

2017-10-16 Thread Jeff Cody
-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/check | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index e2163cc..c7b9526 100755 ---

[Qemu-block] [PATCH v4 09/10] qemu-iotests: add option to save temp files on error

2017-10-16 Thread Jeff Cody
Now that ./check takes care of cleaning up after each tests, it can also selectively not clean up. Add option to leave all output from tests intact if that test encountered an error. Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/check | 13 - 1 file chang

[Qemu-block] [PATCH v4 07/10] qemu-iotests: run python tests in own subdirectories

2017-10-16 Thread Jeff Cody
the test file. In python tests using iiotests.QMPTestCase, any reference to 'iotests.test_dir' should be replaced by 'self.workdir'. This may also require changing the scope of path name variables. Suggested-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Jeff Cody <jc...@r

[Qemu-block] [PATCH v4 01/10] qemu-iotests: refuse to run if TEST_DIR contains spaces

2017-10-16 Thread Jeff Cody
Currently, not all qemu-iotests work if TEST_DIR has spaces, and they also might not be safe. Refuse to run if TEST_DIR in this case, at least until all tests are fixed sometime in the future. Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/check | 8 1 file c

[Qemu-block] [PATCH v4 05/10] qemu-iotests: change qemu pid and fd tracking / cleanup

2017-10-16 Thread Jeff Cody
(unless they want to do so as part of the test, e.g. wait for a process to end such as migration). Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/common.qemu | 65 +++--- tests/qemu-iotests/common.rc | 2 +- 2 files changed, 49 insertions(

[Qemu-block] [PATCH v4 03/10] qemu-iotests: automatically clean up bash protocol servers

2017-10-16 Thread Jeff Cody
For bash tests, this allows 'check' to reap all launch protocol servers / processes, after a test has finished running. Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/check | 13 +++ tests/qemu-iotests/common.rc | 93 +

Re: [Qemu-block] [PATCH 3/3] iotests: Add cluster_size=64k to 125

2017-10-09 Thread Jeff Cody
On Mon, Oct 09, 2017 at 11:55:33PM +0200, Max Reitz wrote: > Apparently it would be a good idea to test that, too. > > Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Jeff Cody <jc...@redhat.com> > --- > tests/qemu-iotests/125 | 7 +- > te

Re: [Qemu-block] [PATCH 2/3] qcow2: Always execute preallocate() in a coroutine

2017-10-09 Thread Jeff Cody
e > the qemu_co_mutex_* functions. > > Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Jeff Cody <jc...@redhat.com> > --- > block/qcow2.c | 41 ++--- > 1 file changed, 34 insertions(+), 7 deletions(-) > > diff --git a/bl

Re: [Qemu-block] [PATCH 1/3] qcow2: Fix unaligned preallocated truncation

2017-10-09 Thread Jeff Cody
iled to inquire current file length"); > return old_file_size; > } > +old_file_size = ROUND_UP(old_file_size, s->cluster_size); > > nb_new_data_clusters = DIV_ROUND_UP(offset - old_length, > s->cluster_size); > -- > 2.13.6 > > Reviewed-by: Jeff Cody <jc...@redhat.com>

Re: [Qemu-block] [PATCH v5 09/23] block: Switch BdrvCoGetBlockStatusData to byte-based

2017-10-09 Thread Jeff Cody
On Tue, Oct 03, 2017 at 09:00:34PM -0500, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Convert another internal > type (no semantic change), and rename it to match the corresponding > public function rename. > >

Re: [Qemu-block] [PATCH] qcow2: Emit errp when truncating the image tail

2017-10-09 Thread Jeff Cody
rv_truncate(bs->file, (last_cluster + 1) * s->cluster_size, > + PREALLOC_MODE_OFF, _err); > +if (local_err) { > +warn_reportf_err(local_err, > + "Failed to truncate the tail of the image: > "); > } > } > } else { > -- > 2.13.6 > > Reviewed-by: Jeff Cody <jc...@redhat.com>

Re: [Qemu-block] [PATCH 2/2] iotests: Filter actual image size in 184 and 191

2017-10-09 Thread Jeff Cody
On Mon, Oct 09, 2017 at 06:34:56PM +0200, Max Reitz wrote: > Whenever the actual image size is not part of the test, it should be > filtered as it depends on the host filesystem. > > Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Jeff Cody <jc...@redhat.com&

Re: [Qemu-block] [PATCH 1/2] iotests: Pull _filter_actual_image_size from 67/87

2017-10-09 Thread Jeff Cody
t's pull out the sed line from both tests into such a function. > > Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Jeff Cody <jc...@redhat.com> > --- > tests/qemu-iotests/067 | 2 +- > tests/qemu-iotests/087 | 2 +- > tests/qemu-i

Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] blockjob: expose manual-cull property

2017-10-03 Thread Jeff Cody
On Tue, Oct 03, 2017 at 11:59:28AM -0400, John Snow wrote: > > > On 10/03/2017 11:57 AM, Paolo Bonzini wrote: > > On 03/10/2017 05:15, John Snow wrote: > >> For drive-backup and blockdev-backup, expose the manual-cull > >> property, having it default to false. There are no universal > >>

Re: [Qemu-block] [Qemu-devel] [PATCH v3 4/5] qemu-iotests: make python tests attempt to leave intermediate files

2017-09-04 Thread Jeff Cody
On Mon, Sep 04, 2017 at 10:51:24AM +0100, Stefan Hajnoczi wrote: > On Thu, Aug 31, 2017 at 11:47:59AM -0400, Jeff Cody wrote: > > On Thu, Aug 31, 2017 at 04:39:49PM +0100, Stefan Hajnoczi wrote: > > > On Wed, Aug 30, 2017 at 06:40:29PM -0400, John Snow wrote: > > > &

Re: [Qemu-block] [Qemu-devel] [PATCH v3 4/5] qemu-iotests: make python tests attempt to leave intermediate files

2017-08-31 Thread Jeff Cody
On Thu, Aug 31, 2017 at 04:39:49PM +0100, Stefan Hajnoczi wrote: > On Wed, Aug 30, 2017 at 06:40:29PM -0400, John Snow wrote: > > > > > > On 08/30/2017 06:35 PM, Eric Blake wrote: > > > On 08/30/2017 05:28 PM, John Snow wrote: > > > > > >> I'm a little iffy on this patch; I know that ./check

Re: [Qemu-block] [Qemu-devel] [PATCH v3 1/5] qemu-iotests: set TEST_DIR to a unique dir for each test

2017-08-30 Thread Jeff Cody
On Wed, Aug 30, 2017 at 06:15:05PM -0400, John Snow wrote: > > > On 08/30/2017 12:52 PM, Jeff Cody wrote: > > Right now, all qemu-iotests output data into the same scratch directory, > > and so each test needs to be responsible for cleaning up its own files. > > >

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/7] block/ssh: don't call libssh2_init() in block_init()

2017-08-30 Thread Jeff Cody
On Wed, Aug 30, 2017 at 02:40:16PM -0500, Eric Blake wrote: > On 08/30/2017 11:56 AM, Jeff Cody wrote: > > We don't need libssh2 failure to be fatal (we could just opt to not > > register the driver on failure). But, it is probably a good idea to > > avoid external

[Qemu-block] [PATCH v2 3/3] hmp: Optionally disable live block operations in HMP monitor

2017-08-30 Thread Jeff Cody
From: Jeffrey Cody <jc...@redhat.com> If live block operations are disabled, disable the corresponding HMP commands. Signed-off-by: Jeff Cody <jc...@redhat.com> --- hmp-commands-info.hx | 4 hmp-commands.hx | 12 hmp.c| 12 3 f

[Qemu-block] [PATCH v2 4/7] block/sheepdog: code beautification

2017-08-30 Thread Jeff Cody
No functional changes, just whitespace manipulation. Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/sheepdog.c | 162 +++ 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index b

[Qemu-block] [PATCH v2 6/7] block/curl: fix minor memory leaks

2017-08-30 Thread Jeff Cody
Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/curl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block/curl.c b/block/curl.c index 00a9879..35cf417 100644 --- a/block/curl.c +++ b/block/curl.c @@ -857,6 +857,9 @@ out_noclean: qemu_mutex_destroy(>mutex);

[Qemu-block] [PATCH v2 1/3] configure: Add option in configure to disable live block ops

2017-08-30 Thread Jeff Cody
From: Jeffrey Cody <jc...@redhat.com> This adds in the option to disable the live block operations. The resultant config option is not checked until subsequent patches. Signed-off-by: Jeff Cody <jc...@redhat.com> --- configure | 11 +++ 1 file changed, 11 insertions(+)

[Qemu-block] [PATCH v2 2/7] block/ssh: make compliant with coding guidelines

2017-08-30 Thread Jeff Cody
Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/ssh.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index cbb0e34..97f7673 100644 --- a/block/ssh.c +++ b/block/ssh.c @@ -241,7 +241,7 @@ static int par

[Qemu-block] [PATCH v2 3/7] block/sheepdog: remove spurious NULL check

2017-08-30 Thread Jeff Cody
'tag' is already checked in the lines immediately preceding this check, and set to non-NULL if NULL. No need to check again, it hasn't changed. Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/sheepdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/sheepd

[Qemu-block] [PATCH v2 0/7] Code cleanup and minor fixes

2017-08-30 Thread Jeff Cody
Minor bug fixes and code cleanup. Changes from v1 -> v2: Rebased to v2.10.0 Jeff Cody (7): block/ssh: don't call libssh2_init() in block_init() block/ssh: make compliant with coding guidelines block/sheepdog: remove spurious NULL check block/sheepdog: code beautification block/c

[Qemu-block] [PATCH v2 0/3] Live block optional disable

2017-08-30 Thread Jeff Cody
This series adds a configurable option to disable live block operations. The default is that live block operations are 'enabled'. Jeffrey Cody (3): configure: Add option in configure to disable live block ops block-jobs: Optionally unregister live block operations hmp: Optionally disable

[Qemu-block] [PATCH v2 2/3] block-jobs: Optionally unregister live block operations

2017-08-30 Thread Jeff Cody
From: Jeffrey Cody <jc...@redhat.com> If configured without live block operations enabled, unregister the live block operation commands. Signed-off-by: Jeff Cody <jc...@redhat.com> --- monitor.c | 16 1 file changed, 16 insertions(+) diff --git a/monitor.c b/mon

[Qemu-block] [PATCH v2 5/7] block/curl: check error return of curl_global_init()

2017-08-30 Thread Jeff Cody
Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/curl.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/block/curl.c b/block/curl.c index 2a244e2..00a9879 100644 --- a/block/curl.c +++ b/block/curl.c @@ -89,6 +89,8 @@ static CUR

[Qemu-block] [PATCH v2 1/7] block/ssh: don't call libssh2_init() in block_init()

2017-08-30 Thread Jeff Cody
We don't need libssh2 failure to be fatal (we could just opt to not register the driver on failure). But, it is probably a good idea to avoid external library calls during the block_init(), and call the libssh2 global init function on the first usage, returning any errors. Signed-off-by: Jeff

[Qemu-block] [PATCH v3 5/5] qemu-iotests: add option to save temp files on error

2017-08-30 Thread Jeff Cody
. Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/check | 10 +- tests/qemu-iotests/common | 6 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index f6ca85d..8a5fc0d 100755 --- a/tests/qemu-i

[Qemu-block] [PATCH v3 4/5] qemu-iotests: make python tests attempt to leave intermediate files

2017-08-30 Thread Jeff Cody
pings from previous runs. We must use 'blind_remove' then for these, as the files might not exist yet, but we don't want to throw an error for that. Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/030 | 8 +++--- tests/qemu-iotests/040 | 35 ++--- tests/

[Qemu-block] [PATCH v3 2/5] qemu-iotests: remove file cleanup from bash tests

2017-08-30 Thread Jeff Cody
eanup_qemu. Reviewed-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/001 | 6 -- tests/qemu-iotests/002 | 6 -- tests/qemu-iotests/003 | 6 -- tests/qemu-iotests/004 | 6 -- tests/qemu-iotests/005

[Qemu-block] [PATCH v3 0/5] qemu-iotests: place output in unique dir

2017-08-30 Thread Jeff Cody
ing temporary files 3.) Add option to './check' to retain temporary files in case of error Jeff Cody (5): qemu-iotests: set TEST_DIR to a unique dir for each test qemu-iotests: remove file cleanup from bash tests qemu-iotests: add 'blind_remove' for python tests qemu-iotests: make python te

[Qemu-block] [PATCH v3 1/5] qemu-iotests: set TEST_DIR to a unique dir for each test

2017-08-30 Thread Jeff Cody
-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/check | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index d504b6e..f6ca85d 100755 ---

[Qemu-block] [PATCH v3 3/5] qemu-iotests: add 'blind_remove' for python tests

2017-08-30 Thread Jeff Cody
Add a function to attempt to 'blindly' remove a file, without throwing an error if the file doesn't exist. Signed-off-by: Jeff Cody <jc...@redhat.com> --- tests/qemu-iotests/iotests.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-i

Re: [Qemu-block] [PATCH v3 for-2.10 0/4] improved --version/--help tweaks

2017-08-08 Thread Jeff Cody
On Tue, Aug 08, 2017 at 08:50:55AM -0500, Eric Blake wrote: > On 08/07/2017 07:08 PM, John Snow wrote: > > > > > > On 08/03/2017 12:33 PM, Eric Blake wrote: > >> Not sure if this should go through Kevin's block tree, Paolo's > >> miscellaneous patches, or if I should just do a pull request > >>

[Qemu-block] [PATCH for-2.11 2/7] block/ssh: make compliant with coding guidelines

2017-08-08 Thread Jeff Cody
Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/ssh.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index cbb0e34..97f7673 100644 --- a/block/ssh.c +++ b/block/ssh.c @@ -241,7 +241,7 @@ static int par

[Qemu-block] [PATCH for-2.11 3/7] block/sheepdog: remove spurious NULL check

2017-08-08 Thread Jeff Cody
'tag' is already checked in the lines immediately preceding this check, and set to non-NULL if NULL. No need to check again, it hasn't changed. Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/sheepdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/sheepd

[Qemu-block] [PATCH for-2.11 1/7] block/ssh: don't call libssh2_init() in block_init()

2017-08-08 Thread Jeff Cody
We don't need libssh2 failure to be fatal (we could just opt to not register the driver on failure). But, it is probably a good idea to avoid external library calls during the block_init(), and call the libssh2 global init function on the first usage, returning any errors. Signed-off-by: Jeff

[Qemu-block] [PATCH for-2.11 5/7] block/curl: check error return of curl_global_init()

2017-08-08 Thread Jeff Cody
Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/curl.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/block/curl.c b/block/curl.c index 2a244e2..00a9879 100644 --- a/block/curl.c +++ b/block/curl.c @@ -89,6 +89,8 @@ static CUR

[Qemu-block] [PATCH for-2.11 0/7] Code cleanup and minor fixes

2017-08-08 Thread Jeff Cody
Some minor cleanup for a few network protocols, with a few bug fixes thrown in. I don't think there is anything in here that needs to be for 2.10, however. Jeff Cody (7): block/ssh: don't call libssh2_init() in block_init() block/ssh: make compliant with coding guidelines block/sheepdog

[Qemu-block] [PATCH for-2.11 6/7] block/curl: fix minor memory leaks

2017-08-08 Thread Jeff Cody
Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/curl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block/curl.c b/block/curl.c index 00a9879..35cf417 100644 --- a/block/curl.c +++ b/block/curl.c @@ -857,6 +857,9 @@ out_noclean: qemu_mutex_destroy(>mutex);

Re: [Qemu-block] [PATCH 4/4] qcow2: Check failure of bdrv_getlength()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 03:30:07PM -0500, Eric Blake wrote: > qcow2_co_pwritev_compressed() should not call bdrv_truncate() > if determining the size failed. > > Reported-by: Markus Armbruster <arm...@redhat.com> > Signed-off-by: Eric Blake <ebl...@redhat.com>

Re: [Qemu-block] [PATCH 2/4] qcow: Check failure of bdrv_getlength() and bdrv_truncate()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 03:30:05PM -0500, Eric Blake wrote: > This also requires changing the return type of get_cluster_offset() > and adjusting all callers. > > Use osdep.h macros instead of open-coded rounding while in the > area. > > Reported-by: Markus Armbruster >

Re: [Qemu-block] [PATCH 3/4] qcow2: Drop debugging dump_refcounts()

2017-08-07 Thread Jeff Cody
ed-off-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Jeff Cody <jc...@redhat.com> > --- > block/qcow2.c | 21 - > 1 file changed, 21 deletions(-) > > diff --git a/block/qcow2.c b/block/qcow2.c > index d7c600b5a2..99407403ea 100644 > --- a/b

Re: [Qemu-block] [PATCH 2/4] qcow: Check failure of bdrv_getlength() and bdrv_truncate()

2017-08-07 Thread Jeff Cody
er <arm...@redhat.com> > Signed-off-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Jeff Cody <jc...@redhat.com> > --- > block/qcow.c | 64 > ++-- > 1 file changed, 45 insertions(+), 19 deletions(-) > >

Re: [Qemu-block] [PATCH 1/4] vpc: Check failure of bdrv_getlength()

2017-08-07 Thread Jeff Cody
pc: free_data_block_offset points after > " > "the end of file. The image has been > truncated."); > ret = -EINVAL; > -- > 2.13.4 > > Reviewed-by: Jeff Cody <jc...@redhat.com>

[Qemu-block] [PATCH for-2.10] block/nfs: fix mutex assertion in nfs_file_close()

2017-08-07 Thread Jeff Cody
should be able to get rid of the memset(), as it isn't necessary. Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/nfs.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index d8db419..bec16b7 100644 --- a/block/nfs.c +++ b

[Qemu-block] [PATCH v2 for-2.10 2/4] block/vhdx: check for offset overflow to bdrv_truncate()

2017-08-07 Thread Jeff Cody
this is not an issue, as the maximum VHDX image size is defined per the spec to be 64TB. Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Jeff Cody <jc...@redhat.com> --- block/vhdx-log.c | 6 +- block/vhdx.c | 3 +++

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