[Qemu-block] [PATCH] qemu-pr-helper: Actually allow users to specify pidfile

2018-03-23 Thread Michal Privoznik
Due to wrong specification of arguments to getopt_long() any attempt to set pidfile resulted in: 1) the default to be leaked 2) the @pidfile variable to be set to NULL (because optarg is NULL without this patch). Signed-off-by: Michal Privoznik --- scsi/qemu-pr-helper.c | 7 --- 1 file chan

Re: [Qemu-block] [PATCH v2 5/5] Remove unnecessary variables for function return value

2018-03-23 Thread David Gibson
On Fri, Mar 23, 2018 at 03:32:02PM +0100, Laurent Vivier wrote: > Re-run Coccinelle script scripts/coccinelle/return_directly.cocci > > Signed-off-by: Laurent Vivier ppc part Acked-by: David Gibson > --- > accel/tcg/translate-all.c | 5 +- > block/quorum.c

Re: [Qemu-block] [PATCH v2 0/5] coccinelle: re-run scripts from scripts/coccinelle

2018-03-23 Thread Laurent Vivier
On 23/03/2018 18:47, Eric Blake wrote: > On 03/23/2018 09:31 AM, Laurent Vivier wrote: >> I've re-run some scripts from the coccinelle directory, >> and they have found some problems. >> >> This series fixes them. >> >> v2: only change PATCH 4/4 >>    - keep comments >>    - fix indentation >>    I

Re: [Qemu-block] raw iotest regressions in 2.12.0-rc0

2018-03-23 Thread Eric Blake
On 03/22/2018 08:54 AM, Peter Xu wrote: On Wed, Mar 21, 2018 at 05:58:48PM -0400, John Snow wrote: ./check -v -raw Failures: 109 132 136 148 152 183 ./check -v raw Failures: 055 Failed 5 of 5 tests Maybe these are known, but I wanted to consolidate them for rc0 for something easy to sea

Re: [Qemu-block] [PATCH for-2.12 v2 06/12] qemu-iotests: Test invalid resize on luks

2018-03-23 Thread Eric Blake
On 03/21/2018 12:37 PM, Kevin Wolf wrote: This tests that the .bdrv_truncate implementation for luks doesn't crash for invalid image sizes. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/210 | 37 + tests/qemu-iotests/210.out | 16

Re: [Qemu-block] [PATCH for-2.12 v2 03/12] qemu-iotests: Test vdi image creation with QMP

2018-03-23 Thread Eric Blake
On 03/21/2018 12:37 PM, Kevin Wolf wrote: Signed-off-by: Kevin Wolf --- tests/qemu-iotests/211 | 246 + tests/qemu-iotests/211.out | 97 ++ tests/qemu-iotests/group | 1 + 3 files changed, 344 insertions(+) create mode 1

Re: [Qemu-block] [PATCH 2/4] error: Remove NULL checks on error_propagate() calls

2018-03-23 Thread Eric Blake
On 03/22/2018 11:12 AM, Laurent Vivier wrote: Re-run Coccinelle patch scripts/coccinelle/error_propagate_null.cocci Signed-off-by: Laurent Vivier --- io/channel-websock.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Misses an offender in numa.c, why? https://lists.gnu.org/arc

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 0/5] atapi: change unlimited recursion to while loop

2018-03-23 Thread John Snow
On 03/23/2018 04:17 PM, Paolo Bonzini wrote: > On 23/03/2018 21:08, John Snow wrote: >> >> >> On 02/23/2018 10:26 AM, Paolo Bonzini wrote: >>> Real hardware doesn't have an unlimited stack, so the unlimited >>> recursion in the ATAPI code smells a bit. In fact, the call to >>> ide_transfer_start

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 0/5] atapi: change unlimited recursion to while loop

2018-03-23 Thread Paolo Bonzini
On 23/03/2018 21:08, John Snow wrote: > > > On 02/23/2018 10:26 AM, Paolo Bonzini wrote: >> Real hardware doesn't have an unlimited stack, so the unlimited >> recursion in the ATAPI code smells a bit. In fact, the call to >> ide_transfer_start easily becomes a tail call with a small change >> to

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 0/5] atapi: change unlimited recursion to while loop

2018-03-23 Thread John Snow
On 02/23/2018 10:26 AM, Paolo Bonzini wrote: > Real hardware doesn't have an unlimited stack, so the unlimited > recursion in the ATAPI code smells a bit. In fact, the call to > ide_transfer_start easily becomes a tail call with a small change > to the code (patch 4). The remaining four patches

Re: [Qemu-block] [Qemu-ppc] [PATCH v2 3/5] error: Remove NULL checks on error_propagate() calls

2018-03-23 Thread Thomas Huth
On 23.03.2018 15:32, Laurent Vivier wrote: > Re-run Coccinelle patch > scripts/coccinelle/error_propagate_null.cocci > > Signed-off-by: Laurent Vivier > --- > io/channel-websock.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/io/channel-websock.c b/io/channel-webso

Re: [Qemu-block] [PATCH v2 0/5] coccinelle: re-run scripts from scripts/coccinelle

2018-03-23 Thread Eric Blake
On 03/23/2018 09:31 AM, Laurent Vivier wrote: I've re-run some scripts from the coccinelle directory, and they have found some problems. This series fixes them. v2: only change PATCH 4/4 - keep comments - fix indentation I didn't remove changes in autogenerated files as it seems the

Re: [Qemu-block] [PATCH 0/4] coccinelle: re-run scripts from scripts/coccinelle

2018-03-23 Thread Eric Blake
On 03/23/2018 07:37 AM, Michael Tokarev wrote: 22.03.2018 19:12, Laurent Vivier wrote: I've re-run some scripts from the coccinelle directory, and they have found some problems. This series fixes them. Laurent Vivier (4): error: Strip trailing '\n' from error string arguments (again again)

Re: [Qemu-block] [PATCH v2 2/5] error: Strip trailing '\n' from error string arguments (again again)

2018-03-23 Thread Eric Blake
On 03/23/2018 09:31 AM, Laurent Vivier wrote: Re-run Coccinelle script scripts/coccinelle/err-bad-newline.cocci, and found new error_report() occurences with '\n'. s/occurences/occurrences/ Signed-off-by: Laurent Vivier --- target/i386/hvf/hvf.c | 24 1 file chan

Re: [Qemu-block] [Qemu-devel] [PATCH 4/5] migration/block: limit the number of parallel I/O requests

2018-03-23 Thread Dr. David Alan Gilbert
* Peter Lieven (p...@kamp.de) wrote: > the current implementation submits up to 512 I/O requests in parallel > which is much to high especially for a background task. > This patch adds a maximum limit of 16 I/O requests that can > be submitted in parallel to avoid monopolizing the I/O device. > >

[Qemu-block] [PATCH] block: simplify code around releasing bitmaps

2018-03-23 Thread Paolo Bonzini
QLIST_REMOVE does not require walking the list, and once the "bitmap" argument is removed from bdrv_do_release_matching_dirty_bitmap_locked the code simplifies a lot and it is worth inlining everything in the callers of bdrv_do_release_matching_dirty_bitmap. Signed-off-by: Paolo Bonzini --- bloc

[Qemu-block] [PATCH] block: remove bdrv_dirty_bitmap_make_anon

2018-03-23 Thread Paolo Bonzini
All this function is doing will be repeated by bdrv_do_release_matching_dirty_bitmap_locked, except resetting bm->persistent. But even that does not matter because the bitmap will be freed. Signed-off-by: Paolo Bonzini --- block/dirty-bitmap.c | 9 - blockdev.c

[Qemu-block] [PATCH v2 5/5] Remove unnecessary variables for function return value

2018-03-23 Thread Laurent Vivier
Re-run Coccinelle script scripts/coccinelle/return_directly.cocci Signed-off-by: Laurent Vivier --- accel/tcg/translate-all.c | 5 +- block/quorum.c | 6 +-- hw/arm/exynos4210.c| 6 +-- hw/block/vhost

[Qemu-block] [PATCH v2 4/5] qdict: remove useless cast

2018-03-23 Thread Laurent Vivier
Re-run Coccinelle script scripts/coccinelle/qobject.cocci Signed-off-by: Laurent Vivier --- block/nvme.c | 11 +-- monitor.c| 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/block/nvme.c b/block/nvme.c index 8bca57aae6..c4f3a7bc94 100644 --- a/block/nvme.c +++ b

[Qemu-block] [PATCH v2 3/5] error: Remove NULL checks on error_propagate() calls

2018-03-23 Thread Laurent Vivier
Re-run Coccinelle patch scripts/coccinelle/error_propagate_null.cocci Signed-off-by: Laurent Vivier --- io/channel-websock.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/io/channel-websock.c b/io/channel-websock.c index ec48a305f0..e6608b969d 100644 --- a/io/channel-web

[Qemu-block] [PATCH v2 1/5] make: improve check for stale generated files in source dir

2018-03-23 Thread Laurent Vivier
From: Daniel P. Berrangé When doing a build with builddir != srcdir, if any generated files are accidentally present in srcdir from a previous build, these can cause unexpected failures. Currently there is a rule that checks for existance of config-host.mak, but there have been cases where confi

[Qemu-block] [PATCH v2 2/5] error: Strip trailing '\n' from error string arguments (again again)

2018-03-23 Thread Laurent Vivier
Re-run Coccinelle script scripts/coccinelle/err-bad-newline.cocci, and found new error_report() occurences with '\n'. Signed-off-by: Laurent Vivier --- target/i386/hvf/hvf.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/target/i386/hvf/hvf.c b/tar

[Qemu-block] [PATCH v2 0/5] coccinelle: re-run scripts from scripts/coccinelle

2018-03-23 Thread Laurent Vivier
I've re-run some scripts from the coccinelle directory, and they have found some problems. This series fixes them. v2: only change PATCH 4/4 - keep comments - fix indentation I didn't remove changes in autogenerated files as it seems they are generated only once. Daniel P. Berrangé (1):

Re: [Qemu-block] [PATCH v2 1/2] make: move generated headers to qemu-build/

2018-03-23 Thread Michael S. Tsirkin
On Fri, Mar 23, 2018 at 10:22:27AM +, Daniel P. Berrangé wrote: > On Thu, Mar 22, 2018 at 09:27:55PM +0200, Michael S. Tsirkin wrote: > > Make sure all generated files go into qemu-build subdirectory. > > We can then include them like this: > > #include "qemu-build/trace.h" > > > > This serve

Re: [Qemu-block] [PATCH 0/4] coccinelle: re-run scripts from scripts/coccinelle

2018-03-23 Thread Laurent Vivier
On 23/03/2018 13:37, Michael Tokarev wrote: > 22.03.2018 19:12, Laurent Vivier wrote: >> I've re-run some scripts from the coccinelle directory, >> and they have found some problems. >> >> This series fixes them. >> >> Laurent Vivier (4): >> error: Strip trailing '\n' from error string arguments

Re: [Qemu-block] [PATCH 0/4] coccinelle: re-run scripts from scripts/coccinelle

2018-03-23 Thread Michael Tokarev
22.03.2018 19:12, Laurent Vivier wrote: > I've re-run some scripts from the coccinelle directory, > and they have found some problems. > > This series fixes them. > > Laurent Vivier (4): > error: Strip trailing '\n' from error string arguments (again again) > error: Remove NULL checks on erro

Re: [Qemu-block] [PATCH v2 1/2] make: move generated headers to qemu-build/

2018-03-23 Thread Kevin Wolf
Am 23.03.2018 um 11:22 hat Daniel P. Berrangé geschrieben: > On Thu, Mar 22, 2018 at 09:27:55PM +0200, Michael S. Tsirkin wrote: > > Make sure all generated files go into qemu-build subdirectory. > > We can then include them like this: > > #include "qemu-build/trace.h" > > > > This serves two pur

Re: [Qemu-block] [PATCH 4/4] Remove unnecessary variables for function return value

2018-03-23 Thread Alberto Garcia
On Thu 22 Mar 2018 05:12:26 PM CET, Laurent Vivier wrote: > diff --git a/block/quorum.c b/block/quorum.c > index 14333c18aa..304442ef65 100644 > --- a/block/quorum.c > +++ b/block/quorum.c > @@ -608,7 +608,7 @@ static void read_quorum_children_entry(void *opaque) > static int read_quorum_children

Re: [Qemu-block] [PATCH v2 1/2] make: move generated headers to qemu-build/

2018-03-23 Thread Daniel P . Berrangé
On Thu, Mar 22, 2018 at 09:27:55PM +0200, Michael S. Tsirkin wrote: > Make sure all generated files go into qemu-build subdirectory. > We can then include them like this: > #include "qemu-build/trace.h" > > This serves two purposes: > - make it easy to detect which files are in the source > dir

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] iotests: fix test case 185

2018-03-23 Thread Stefan Hajnoczi
On Fri, Mar 23, 2018 at 3:43 AM, QingFeng Hao wrote: > Test case 185 failed since commit 4486e89c219 --- "vl: introduce > vm_shutdown()". > It's because of the newly introduced function vm_shutdown calls > bdrv_drain_all, > which is called later by bdrv_close_all. bdrv_drain_all resumes the jobs