Re: [Qemu-block] [PATCH v2] nvme: correct locking around completion

2018-10-10 Thread Fam Zheng
On Wed, 10/10 13:19, Paolo Bonzini wrote: > On 09/10/2018 21:37, John Snow wrote: > > > > > > On 08/14/2018 02:27 AM, Paolo Bonzini wrote: > >> nvme_poll_queues is already protected by q->lock, and > >> AIO callbacks are invoked outside the AioContext lock. > >> So remove the acquire/release pair

Re: [Qemu-block] [PATCH v2] nvme: correct locking around completion

2018-10-10 Thread Fam Zheng
On Wed, 10/10 13:19, Paolo Bonzini wrote: > On 09/10/2018 21:37, John Snow wrote: > > > > > > On 08/14/2018 02:27 AM, Paolo Bonzini wrote: > >> nvme_poll_queues is already protected by q->lock, and > >> AIO callbacks are invoked outside the AioContext lock. > >> So remove the acquire/release pair

Re: [Qemu-block] [PATCH v3] python: Use io.StringIO

2018-10-10 Thread Paolo Bonzini
On 10/10/2018 23:31, Philippe Mathieu-Daudé wrote: > Both Python 2.7 and 3 support the same io.StringIO to > handle unicode strings. > > Use the common form to use indistinctly Python 2.7 or 3. > > http://python-future.org/compatible_idioms.html#stringio > > This fixes running tests on the Fedor

[Qemu-block] [PATCH v3] python: Use io.StringIO

2018-10-10 Thread Philippe Mathieu-Daudé
Both Python 2.7 and 3 support the same io.StringIO to handle unicode strings. Use the common form to use indistinctly Python 2.7 or 3. http://python-future.org/compatible_idioms.html#stringio This fixes running tests on the Fedora Docker image, which uses Python3 since 356dc290f: $ make docke

Re: [Qemu-block] [PATCH v2 7/7] block/qcow2-refcount: fix out-of-file L2 entries to be read-as-zero

2018-10-10 Thread Vladimir Sementsov-Ogievskiy
10.10.2018 19:55, Vladimir Sementsov-Ogievskiy wrote: > 10.10.2018 19:39, Vladimir Sementsov-Ogievskiy wrote: >> 17.08.2018 15:22, Vladimir Sementsov-Ogievskiy wrote: >>> Rewrite corrupted L2 table entry, which reference space out of >>> underlying file. >>> >>> Make this L2 table entry read-as-all

Re: [Qemu-block] [PATCH v2 7/7] block/qcow2-refcount: fix out-of-file L2 entries to be read-as-zero

2018-10-10 Thread Vladimir Sementsov-Ogievskiy
10.10.2018 19:39, Vladimir Sementsov-Ogievskiy wrote: > 17.08.2018 15:22, Vladimir Sementsov-Ogievskiy wrote: >> Rewrite corrupted L2 table entry, which reference space out of >> underlying file. >> >> Make this L2 table entry read-as-all-zeros without any allocation. >> >> Signed-off-by: Vladimir

Re: [Qemu-block] [Qemu-devel] [PATCH] ide: piix: convert constant device name to MACRO

2018-10-10 Thread John Snow
On 10/10/2018 12:29 AM, Li Qiang wrote: > Signed-off-by: Li Qiang > --- > hw/ide/piix.c | 16 ++-- > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/hw/ide/piix.c b/hw/ide/piix.c > index a3afe1f..5f29cce 100644 > --- a/hw/ide/piix.c > +++ b/hw/ide/piix.c > @@ -35

Re: [Qemu-block] [PATCH v2 7/7] block/qcow2-refcount: fix out-of-file L2 entries to be read-as-zero

2018-10-10 Thread Vladimir Sementsov-Ogievskiy
17.08.2018 15:22, Vladimir Sementsov-Ogievskiy wrote: > Rewrite corrupted L2 table entry, which reference space out of > underlying file. > > Make this L2 table entry read-as-all-zeros without any allocation. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2-refcount.c | 32 +++

[Qemu-block] [PATCH] ide: piix: convert constant device name to MACRO

2018-10-10 Thread Li Qiang
Signed-off-by: Li Qiang --- hw/ide/piix.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index a3afe1f..5f29cce 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -35,6 +35,10 @@ #include "hw/ide/pci.h" #include "trace.h" +#d

Re: [Qemu-block] [PATCH v2 5/7] block/qcow2-refcount: check_refcounts_l2: split fix_l2_entry_to_zero

2018-10-10 Thread Vladimir Sementsov-Ogievskiy
08.10.2018 22:54, Max Reitz wrote: > On 17.08.18 14:22, Vladimir Sementsov-Ogievskiy wrote: >> Split entry repairing to separate function, to be reused later. >> >> Note: entry in in-memory l2 table (local variable in >> check_refcounts_l2) is not updated after this patch. >> >> Signed-off-by: Vlad

Re: [Qemu-block] [PATCH 12/14] block: Clean up reopen_backing_file() in block/replication.c

2018-10-10 Thread Alberto Garcia
On Mon 08 Oct 2018 04:34:24 AM CEST, Max Reitz wrote: >> This patch does the following changes: >> >> - Use an options QDict with the "read-only" option instead of >> passing the changes as flags only. >> >> - Simplify the code (it was unnecessarily complicated and verbose). >> >> - Fi

Re: [Qemu-block] [PATCH v2] nvme: correct locking around completion

2018-10-10 Thread Paolo Bonzini
On 09/10/2018 21:37, John Snow wrote: > > > On 08/14/2018 02:27 AM, Paolo Bonzini wrote: >> nvme_poll_queues is already protected by q->lock, and >> AIO callbacks are invoked outside the AioContext lock. >> So remove the acquire/release pair in nvme_handle_event. >> >> Signed-off-by: Paolo Bonzin

Re: [Qemu-block] [PATCH 0/3] block/qcow*: Don't take address of fields in packed structs

2018-10-10 Thread Kevin Wolf
Am 09.10.2018 um 19:24 hat Peter Maydell geschrieben: > Taking the address of a field in a packed struct is a bad idea, because > it might not be actually aligned enough for that pointer type (and > thus cause a crash on dereference on some host architectures). Newer > versions of clang warn about