[Qemu-block] [PATCH 1/3] nbd/server: Advertise all contexts in response to bare LIST

2018-11-29 Thread Eric Blake
The NBD spec, and even our code comment, says that if the client asks for NBD_OPT_LIST_META_CONTEXT with 0 queries, then we should reply with (a possibly-compressed representation of) ALL contexts that we are willing to let them try. But commit 3d068aff forgot to advertise qemu:dirty-bitmap:FOO.

[Qemu-block] [PATCH 3/3] nbd/client: Send NBD_CMD_DISC if open fails after connect

2018-11-29 Thread Eric Blake
If nbd_client_init() fails after we are already connected, then the server will spam logs with: Disconnect client, due to: Unexpected end-of-file before all bytes were read unless we gracefully disconnect before closing the connection. Ways to trigger this: $

[Qemu-block] [PATCH 2/3] nbd/client: Make x-dirty-bitmap more reliable

2018-11-29 Thread Eric Blake
The implementation of x-dirty-bitmap in qemu 3.0 silently falls back to treating the server as not supporting NBD_CMD_BLOCK_STATUS if a requested meta_context name was not negotiated, which in turn means treating the _entire_ image as data. Since our hack relied on using 'qemu-img map' to view

[Qemu-block] [RFC v1 1/1] qemu-iotests: Don't run the test when user is root

2018-11-29 Thread Farhan Ali
Test 232 creates image files with read-only permission and expects an error message when trying to access the image files with read-only and auto-read-only turned off. Don't run as root user, since root can open files with read/write access for read-only files. Signed-off-by: Farhan Ali ---

Re: [Qemu-block] [RFC for-3.1? v1 1/1] qemu-iotests: Don't run the test when user is root

2018-11-29 Thread Eric Blake
On 11/29/18 4:32 PM, Farhan Ali wrote: Test 232 creates image files with read-only permission and expects an error message when trying to access the image files with read-only and auto-read-only turned off. Don't run as root user, since root can open files with read/write access for read-only

Re: [Qemu-block] qemu-iotests 232 fails when running the test as root user

2018-11-29 Thread Farhan Ali
On 11/29/2018 04:07 PM, Eric Blake wrote: On 11/29/18 3:03 PM, Farhan Ali wrote: Hi, I am seeing a failure of the qemu-iotest number 232 when running the test as a root user. Is this the expected behavior? Here is the output of the failure: -QEMU_PROG: -drive

Re: [Qemu-block] qemu-iotests 232 fails when running the test as root user

2018-11-29 Thread Eric Blake
On 11/29/18 3:03 PM, Farhan Ali wrote: Hi, I am seeing a failure of the qemu-iotest number 232 when running the test as a root user. Is this the expected behavior? Here is the output of the failure: -QEMU_PROG: -drive

[Qemu-block] qemu-iotests 232 fails when running the test as root user

2018-11-29 Thread Farhan Ali
Hi, I am seeing a failure of the qemu-iotest number 232 when running the test as a root user. Is this the expected behavior? Here is the output of the failure: sudo ./check -qcow2 232 QEMU -- "/home/alifm/kvmdev/qemu/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64"

Re: [Qemu-block] [PATCH 04/18] xen: create xenstore areas for XenDevice-s

2018-11-29 Thread Anthony PERARD
On Wed, Nov 21, 2018 at 03:11:57PM +, Paul Durrant wrote: > This patch adds a new source module, xen-bus-helper.c, which builds on > basic libxenstore primitives to provide functions to create (setting > permissions appropriately) and destroy xenstore areas, and functions to > 'printf' and

Re: [Qemu-block] encrypt in threads

2018-11-29 Thread Vladimir Sementsov-Ogievskiy
On 27.11.2018 16:08, Daniel P. Berrangé wrote: > On Thu, Nov 22, 2018 at 01:01:20PM +, Vladimir Sementsov-Ogievskiy wrote: >> 21.11.2018 20:30, Vladimir Sementsov-Ogievskiy wrote: >>> Hi Daniel! >>> >>> After moving compression to threads in Qcow2 it's an obvious next step to >>> "threadyfy"

Re: [Qemu-block] [PATCH 03/18] xen: introduce 'xen-qdisk'

2018-11-29 Thread Anthony PERARD
On Wed, Nov 21, 2018 at 03:11:56PM +, Paul Durrant wrote: > This patch adds a new XenDevice: 'xen-qdisk' [1]. This will eventually > replace the 'xen_disk' legacy PV backend but it is illustrative to build > up the implementation incrementally, along with the XenBus/XenDevice > framework.

Re: [Qemu-block] [Qemu-devel for-3.1?] [PATCH v2 0/2] mirror dead-lock

2018-11-29 Thread Eric Blake
On 11/29/18 4:17 AM, Vladimir Sementsov-Ogievskiy wrote: Hi all! v2: add fix:) We've faced the following mirror bug: Just run mirror on qcow2 image more than 1G, and qemu is in dead lock. How long has the bug been present? Based on patch 1 mentioning commit 2e1990b26e5 (in 3.0), I'm

Re: [Qemu-block] [Qemu-devel] [PATCH 17/18] MAINTAINERS: add myself as a Xen maintainer

2018-11-29 Thread Paul Durrant
> -Original Message- > From: Philippe Mathieu-Daudé [mailto:phi...@redhat.com] > Sent: 29 November 2018 14:01 > To: Paul Durrant ; qemu-block@nongnu.org; qemu- > de...@nongnu.org; xen-de...@lists.xenproject.org > Cc: Anthony Perard ; Paolo Bonzini > ; Stefano Stabellini > Subject: Re:

Re: [Qemu-block] [Qemu-devel] [PATCH 17/18] MAINTAINERS: add myself as a Xen maintainer

2018-11-29 Thread Philippe Mathieu-Daudé
On 21/11/18 16:12, Paul Durrant wrote: > I have made many significant contributions to the Xen code in QEMU, > particularly the recent patches introducing a new PV device framework. > I intend to make further significant contributions, porting other PV back- > ends to the new framework with the

Re: [Qemu-block] AioContext locking vs. coroutines

2018-11-29 Thread Vladimir Sementsov-Ogievskiy
29.11.2018 13:42, Kevin Wolf wrote: > Am 28.11.2018 um 21:13 hat Vladimir Sementsov-Ogievskiy geschrieben: >> Hi all! >> >> We've faced the following mirror bug: >> >> Just run mirror on qcow2 image more than 1G, and qemu is in dead lock. >> >> Note: I've decided to send this as a patch with

Re: [Qemu-block] [PATCH 14/18] xen: add implementations of xen-qdisk connect and disconnect functions...

2018-11-29 Thread Kevin Wolf
Am 29.11.2018 um 10:33 hat Paul Durrant geschrieben: > > -Original Message- > > From: Kevin Wolf [mailto:kw...@redhat.com] > > Sent: 29 November 2018 09:01 > > To: Paul Durrant > > Cc: qemu-block@nongnu.org; qemu-de...@nongnu.org; xen- > > de...@lists.xenproject.org; Stefano Stabellini ;

Re: [Qemu-block] [PATCH 14/18] xen: add implementations of xen-qdisk connect and disconnect functions...

2018-11-29 Thread Paul Durrant
> -Original Message- > From: Kevin Wolf [mailto:kw...@redhat.com] > Sent: 29 November 2018 10:46 > To: Paul Durrant > Cc: qemu-block@nongnu.org; qemu-de...@nongnu.org; xen- > de...@lists.xenproject.org; Stefano Stabellini ; > Anthony Perard ; Max Reitz > Subject: Re: [PATCH 14/18] xen:

[Qemu-block] AioContext locking vs. coroutines (was: [PATCH] mirror dead-lock)

2018-11-29 Thread Kevin Wolf
Am 28.11.2018 um 21:13 hat Vladimir Sementsov-Ogievskiy geschrieben: > Hi all! > > We've faced the following mirror bug: > > Just run mirror on qcow2 image more than 1G, and qemu is in dead lock. > > Note: I've decided to send this as a patch with reproducer, to make it > easier to reproduce).

[Qemu-block] [PATCH v2 0/2] mirror dead-lock

2018-11-29 Thread Vladimir Sementsov-Ogievskiy
Hi all! v2: add fix:) We've faced the following mirror bug: Just run mirror on qcow2 image more than 1G, and qemu is in dead lock. Dead lock described in 01, in short, we have extra aio_context_acquire and aio_context_release around blk_aio_pwritev in mirror_read_complete. So, write may yield

[Qemu-block] [PATCH v2 1/2] mirror: fix dead-lock

2018-11-29 Thread Vladimir Sementsov-Ogievskiy
Let start from the beginning: Commit b9e413dd375 (in 2.9) "block: explicitly acquire aiocontext in aio callbacks that need it" added pairs of aio_context_acquire/release to mirror_write_complete and mirror_read_complete, when they were aio callbacks for blk_aio_* calls. Then, commit 2e1990b26e5

[Qemu-block] [PATCH v2 2/2] iotests: simple mirror test with kvm on 1G image

2018-11-29 Thread Vladimir Sementsov-Ogievskiy
This test is broken without previous commit fixing dead-lock in mirror. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/235 | 59 ++ tests/qemu-iotests/235.out | 1 + tests/qemu-iotests/group | 1 + 3 files changed, 61 insertions(+)

Re: [Qemu-block] [PATCH 14/18] xen: add implementations of xen-qdisk connect and disconnect functions...

2018-11-29 Thread Paul Durrant
> -Original Message- > From: Kevin Wolf [mailto:kw...@redhat.com] > Sent: 29 November 2018 09:01 > To: Paul Durrant > Cc: qemu-block@nongnu.org; qemu-de...@nongnu.org; xen- > de...@lists.xenproject.org; Stefano Stabellini ; > Anthony Perard ; Max Reitz > Subject: Re: [PATCH 14/18] xen:

Re: [Qemu-block] [PATCH v2 0/3] block/iscsi: fix ioctl cancel use-after-free

2018-11-29 Thread Paolo Bonzini
On 15/02/18 11:37, Stefan Hajnoczi wrote: > On Sat, Feb 03, 2018 at 07:16:18AM +0100, Stefan Hajnoczi wrote: >> v2: >> * It was unnecessary to avoid duplicate iscsi_schedule_bh() calls since this >>function already protects against duplicate calls internally [Stefan] >> >> Patches 1 & 2 are

Re: [Qemu-block] [PATCH 02/18] xen: introduce new 'XenBus' and 'XenDevice' object hierarchy

2018-11-29 Thread Kevin Wolf
Am 28.11.2018 um 17:46 hat Paul Durrant geschrieben: > > -Original Message- > > From: Paul Durrant > > Sent: 28 November 2018 16:46 > > To: 'Kevin Wolf' > > Cc: 'Stefano Stabellini' ; qemu-block@nongnu.org; > > qemu-de...@nongnu.org; xen-de...@lists.xenproject.org; Eduardo Habkost > > ;

Re: [Qemu-block] [PATCH 14/18] xen: add implementations of xen-qdisk connect and disconnect functions...

2018-11-29 Thread Kevin Wolf
Am 28.11.2018 um 17:40 hat Paul Durrant geschrieben: > > -Original Message- > > From: Kevin Wolf [mailto:kw...@redhat.com] > > Sent: 28 November 2018 16:35 > > To: Paul Durrant > > Cc: qemu-block@nongnu.org; qemu-de...@nongnu.org; xen- > > de...@lists.xenproject.org; Stefano Stabellini ;