Re: [Qemu-block] [PATCH v3 5/9] IDE: replace DEBUG_AIO with trace events

2017-08-31 Thread John Snow
On 08/31/2017 08:27 PM, Philippe Mathieu-Daudé wrote: > On 08/31/2017 09:14 PM, John Snow wrote: >> Signed-off-by: John Snow > > Reviewed-by: Philippe Mathieu-Daudé > TY, and btw the reasoning behind what I went with: Since s->dma_cmd is itself a type `enum ide_dma_cmd` then by definition s

Re: [Qemu-block] [Qemu-devel] [PATCH v3 0/9] IDE: replace printfs with tracing

2017-08-31 Thread John Snow
On 08/31/2017 08:27 PM, no-re...@patchew.org wrote: > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Message-id: 20170901001502.29915-1-js...@redhat.com > Subject: [Qemu-devel] [PATCH v3 0/9] IDE: replace printfs with tracing > Type: s

Re: [Qemu-block] [PATCH v3 5/9] IDE: replace DEBUG_AIO with trace events

2017-08-31 Thread Philippe Mathieu-Daudé
On 08/31/2017 09:14 PM, John Snow wrote: Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé --- hw/ide/atapi.c| 5 + hw/ide/core.c | 24 +--- hw/ide/trace-events | 3 +++ include/hw/ide/internal.h | 6 -- 4 files c

Re: [Qemu-block] [Qemu-devel] [PATCH v3 0/9] IDE: replace printfs with tracing

2017-08-31 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20170901001502.29915-1-js...@redhat.com Subject: [Qemu-devel] [PATCH v3 0/9] IDE: replace printfs with tracing Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(gi

[Qemu-block] [PATCH v3 6/9] AHCI: Replace DPRINTF with trace-events

2017-08-31 Thread John Snow
There are a few hangers-on that will be dealt with individually in forthcoming patches. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: John Snow --- hw/ide/ahci.c | 157 +++- hw/ide/trace-events | 49 2 files changed, 1

[Qemu-block] [PATCH v3 3/9] IDE: add tracing for data ports

2017-08-31 Thread John Snow
To be used sparingly, but still interesting in the case of small firmwares designed to reproduce bugs in QEMU IDE. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: John Snow --- hw/ide/core.c | 12 +++- hw/ide/trace-events | 5 + 2 files changed, 16 insertions(+), 1 deletio

[Qemu-block] [PATCH v3 9/9] AHCI: remove DPRINTF macro

2017-08-31 Thread John Snow
Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: John Snow --- hw/ide/ahci.c | 9 - 1 file changed, 9 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 6c98047..14b71a3 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -34,17 +34,8 @@ #i

[Qemu-block] [PATCH v3 8/9] AHCI: pretty-print FIS to buffer instead of stderr

2017-08-31 Thread John Snow
The current FIS printing routines dump the FIS to screen. adjust this such that it dumps to buffer instead, then use this ability to have FIS dump mechanisms via trace-events instead of compiled defines. Signed-off-by: John Snow --- hw/ide/ahci.c | 28 ++-- hw/ide/t

[Qemu-block] [PATCH v3 7/9] AHCI: Rework IRQ constants

2017-08-31 Thread John Snow
Create a new enum so that we can name the IRQ bits, which will make debugging them a little nicer if we can print them out. Not handled in this patch, but this will make it possible to get a nice debug printf detailing exactly which status bits are set, as it can be multiple at any given time. As

[Qemu-block] [PATCH v3 2/9] IDE: Add register hints to tracing

2017-08-31 Thread John Snow
Name the registers for tracing purposes. Signed-off-by: John Snow Reviewed-by: Eric Blake --- hw/ide/core.c | 88 + hw/ide/trace-events | 8 ++--- 2 files changed, 72 insertions(+), 24 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/c

[Qemu-block] [PATCH v3 4/9] ATAPI: Replace DEBUG_IDE_ATAPI with tracing events

2017-08-31 Thread John Snow
As part of the ongoing effort to modernize the tracing facilities for the IDE family of devices, remove PRINTFs in the ATAPI device with actual tracing events. Signed-off-by: John Snow --- hw/ide/atapi.c| 64 +-- hw/ide/trace-events |

[Qemu-block] [PATCH v3 5/9] IDE: replace DEBUG_AIO with trace events

2017-08-31 Thread John Snow
Signed-off-by: John Snow --- hw/ide/atapi.c| 5 + hw/ide/core.c | 24 +--- hw/ide/trace-events | 3 +++ include/hw/ide/internal.h | 6 -- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c i

[Qemu-block] [PATCH v3 1/9] IDE: replace DEBUG_IDE with tracing system

2017-08-31 Thread John Snow
Remove the DEBUG_IDE preprocessor definition with something more appropriately flexible, using the trace-events subsystem. This will be less prone to bitrot and will more effectively allow us to target just the functions we care about. Signed-off-by: John Snow Reviewed-by: Eric Blake --- Makef

[Qemu-block] [PATCH v3 0/9] IDE: replace printfs with tracing

2017-08-31 Thread John Snow
Wherever possible, replace all printfs with proper tracing. In most places I've tried to do a straight replacement, but forthcoming patches may calibrate the tracing to be a little nicer. For now, it's nice to just remove the all-or-nothing tracing. Key: [] : patches are identical [] : nu

Re: [Qemu-block] [Qemu-devel] [PATCH v2 5/9] IDE: replace DEBUG_AIO with trace events

2017-08-31 Thread Laszlo Ersek
On 08/31/17 01:25, John Snow wrote: > CCing Laszlo Ersek literally just for laughs, as he is the most > entertaining language lawyer I know of. > > Laszlo, please feel free to ignore this if you don't care :P > > On 08/29/2017 11:14 PM, Philippe Mathieu-Daudé wrote: >> Hi John, >> >> On 08/29/201

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 can

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

2017-08-31 Thread Stefan Hajnoczi
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 can take care of > >> our temp files for us now, but because each python test is i

Re: [Qemu-block] [PATCH v2 4/4] block: convert qcrypto_block_encrypt|decrypt to take bytes offset

2017-08-31 Thread Daniel P. Berrange
On Thu, Aug 31, 2017 at 10:17:43AM -0500, Eric Blake wrote: > On 08/31/2017 06:05 AM, Daniel P. Berrange wrote: > > Instead of sector offset, take the bytes offset when encrypting > > or decrypting data. > > > > Signed-off-by: Daniel P. Berrange > > --- > > block/crypto.c | 8 >

Re: [Qemu-block] [PATCH v2 4/4] block: convert qcrypto_block_encrypt|decrypt to take bytes offset

2017-08-31 Thread Eric Blake
On 08/31/2017 06:05 AM, Daniel P. Berrange wrote: > Instead of sector offset, take the bytes offset when encrypting > or decrypting data. > > Signed-off-by: Daniel P. Berrange > --- > block/crypto.c | 8 > block/qcow.c | 7 +-- > block/qcow2-cluster.c | 8 +++--

Re: [Qemu-block] [PATCH v2 3/4] block: convert crypto driver to bdrv_co_preadv|pwritev

2017-08-31 Thread Eric Blake
On 08/31/2017 06:05 AM, Daniel P. Berrange wrote: > Make the crypto driver implement the bdrv_co_preadv|pwritev > callbacks, and also use bdrv_co_preadv|pwritev for I/O > with the protocol driver beneath. > > Signed-off-by: Daniel P. Berrange > --- > block/crypto.c | 103 >

Re: [Qemu-block] [PATCH v2 2/4] block: use BDRV_SECTOR_SIZE in crypto driver

2017-08-31 Thread Eric Blake
On 08/31/2017 06:05 AM, Daniel P. Berrange wrote: > Signed-off-by: Daniel P. Berrange > --- > block/crypto.c | 32 > 1 file changed, 16 insertions(+), 16 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc.

[Qemu-block] [PATCH v4] block: document semantics of bdrv_co_preadv|pwritev

2017-08-31 Thread Daniel P. Berrange
Reviewed-by: Stefan Hajnoczi Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- Changed in v4: - Fix typo in commit message include/block/block_int.h | 31 +++ 1 file changed, 31 insertions(+) diff --git a/include/block/block_int.h b/include/block/bl

[Qemu-block] [PATCH v2 4/4] block: convert qcrypto_block_encrypt|decrypt to take bytes offset

2017-08-31 Thread Daniel P. Berrange
Instead of sector offset, take the bytes offset when encrypting or decrypting data. Signed-off-by: Daniel P. Berrange --- block/crypto.c | 8 block/qcow.c | 7 +-- block/qcow2-cluster.c | 8 +++- block/qcow2.c | 4 ++-- crypto/block-luks.c| 12

[Qemu-block] [PATCH v2 1/4] block: use 1 MB bounce buffers for crypto instead of 16KB

2017-08-31 Thread Daniel P. Berrange
Using 16KB bounce buffers creates a significant performance penalty for I/O to encrypted volumes on storage which high I/O latency (rotating rust & network drives), because it triggers lots of fairly small I/O operations. On tests with rotating rust, and cache=none|directsync, write speed increase

[Qemu-block] [PATCH v2 0/4] block: improve luks driver perf & switch to byte APIs

2017-08-31 Thread Daniel P. Berrange
This series includes a previously posted patch that improves performance of the luks crypto driver: https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg00781.html And then adds three patches that switch over to use byte based APIs for I/O, rather than the legacy sector based APIs. Daniel

[Qemu-block] [PATCH v2 3/4] block: convert crypto driver to bdrv_co_preadv|pwritev

2017-08-31 Thread Daniel P. Berrange
Make the crypto driver implement the bdrv_co_preadv|pwritev callbacks, and also use bdrv_co_preadv|pwritev for I/O with the protocol driver beneath. Signed-off-by: Daniel P. Berrange --- block/crypto.c | 103 + 1 file changed, 53 insertion

[Qemu-block] [PATCH v2 2/4] block: use BDRV_SECTOR_SIZE in crypto driver

2017-08-31 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- block/crypto.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/block/crypto.c b/block/crypto.c index cc8afe0e0d..e63f094379 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -392,16 +392,16 @@ block_cry

[Qemu-block] [PULL 09/29] vpc: use DIV_ROUND_UP

2017-08-31 Thread Marc-André Lureau
I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Reviewed-by: Richard Henderson --- block/vpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/vpc.c b

[Qemu-block] [PULL 07/29] dmg: use DIV_ROUND_UP

2017-08-31 Thread Marc-André Lureau
I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson --- block/dmg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/dmg.c

[Qemu-block] [PULL 08/29] qcow2: use DIV_ROUND_UP

2017-08-31 Thread Marc-André Lureau
I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Reviewed-by: Richard Henderson --- block/qcow2-cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/q

[Qemu-block] [PULL 10/29] vvfat: use DIV_ROUND_UP

2017-08-31 Thread Marc-André Lureau
I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Reviewed-by: Richard Henderson --- block/vvfat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/vvfat

[Qemu-block] [PULL 03/29] vhdx: use QEMU_ALIGN_DOWN

2017-08-31 Thread Marc-André Lureau
I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Reviewed-by: Richard Henderson --- block/vhdx-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vhdx-l

Re: [Qemu-block] [Qemu-devel] Persistent bitmaps for non-qcow2 formats

2017-08-31 Thread Yaniv Lavi (Dary)
YANIV LAVI (YANIV DARY) SENIOR TECHNICAL PRODUCT MANAGER Red Hat Israel Ltd. 34 Jerusalem Road, Building A, 1st floor Ra'anana, Israel 4350109 yl...@redhat.comT: +972-9-7692306/8272306 F: +972-9-7692223IM: ylavi TRIED. TESTED. TRUSTED

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

2017-08-31 Thread Richard W.M. Jones
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 library calls during the block_i