Re: [Qemu-block] [PATCH v3] block/gluster: Handle changed glfs_ftruncate signature

2018-07-31 Thread Jeff Cody
On Tue, Jul 31, 2018 at 11:18:02AM +0200, Niels de Vos wrote: > On Mon, Jul 30, 2018 at 03:27:29PM -0400, Jeff Cody wrote: > > On Mon, Jul 30, 2018 at 10:07:27AM -0500, Eric Blake wrote: > > > On 07/28/2018 02:50 AM, Niels de Vos wrote: > > > >> > > > >>Part of me wishes that libgfapi had just

Re: [Qemu-block] qemu NBD client behaviour when device size is not a multiple of 512

2018-07-31 Thread Eric Blake
On 07/31/2018 01:00 PM, Richard W.M. Jones wrote: Hi Eric. Is this a bug? $ nbdkit -fv random size=1023 (You can choose any size which is not a multiple of 512.) $ qemu-img convert nbd:localhost:10809 /var/tmp/test qemu-img: error while reading sector 0: Invalid argument Or more

[Qemu-block] qemu NBD client behaviour when device size is not a multiple of 512

2018-07-31 Thread Richard W.M. Jones
Hi Eric. Is this a bug? $ nbdkit -fv random size=1023 (You can choose any size which is not a multiple of 512.) $ qemu-img convert nbd:localhost:10809 /var/tmp/test qemu-img: error while reading sector 0: Invalid argument In the nbdkit debugging output: nbdkit: random.1: error:

[Qemu-block] [PATCH v4 08/10] block/nbd: add cmdline and qapi parameter reconnect-delay

2018-07-31 Thread Vladimir Sementsov-Ogievskiy
Reconnect will be implemented in the following commit, so for now, in semantics below, disconnect itself is a "serious error". Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 12 +++- block/nbd-client.h | 1 + block/nbd-client.c | 1 + block/nbd.c |

[Qemu-block] [PATCH v4 07/10] block/nbd-client: rename read_reply_co to connection_co

2018-07-31 Thread Vladimir Sementsov-Ogievskiy
This coroutine will serve nbd reconnects, so, rename it to be something more generic. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd-client.h | 4 ++-- block/nbd-client.c | 24 2 files changed, 14 insertions(+), 14 deletions(-) diff --git

[Qemu-block] [PATCH v4 06/10] block/nbd-client: move from quit to state

2018-07-31 Thread Vladimir Sementsov-Ogievskiy
To implement reconnect we need several states for the client: CONNECTED, QUIT and two CONNECTING states. CONNECTING states will be realized in the following patches. This patch implements CONNECTED and QUIT. QUIT means, that we should close the connection and fail all current and further requests

[Qemu-block] [PATCH v4 00/10] NBD reconnect

2018-07-31 Thread Vladimir Sementsov-Ogievskiy
Hi all. Here is NBD reconnect. Previously, if connection failed all current and future requests will fail. After the series, nbd-client driver will try to reconnect unlimited times. During first @reconnect-delay seconds of reconnecting all requests will wait for the connection, and if it is

[Qemu-block] [PATCH v4 03/10] block/nbd-client: split connection from initialization

2018-07-31 Thread Vladimir Sementsov-Ogievskiy
Split connection code to reuse it for reconnect. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd-client.c | 33 - 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/block/nbd-client.c b/block/nbd-client.c index a0d8f2523e..a1813cbfe1 100644

[Qemu-block] [PATCH v4 09/10] block/nbd-client: nbd reconnect

2018-07-31 Thread Vladimir Sementsov-Ogievskiy
Implement reconnect. To achieve this: 1. add new modes: connecting-wait: means, that reconnecting is in progress, and there were small number of reconnect attempts, so all requests are waiting for the connection. connecting-nowait: reconnecting is in progress, there were a lot of

[Qemu-block] [PATCH v4 02/10] block/nbd: move connection code from block/nbd to block/nbd-client

2018-07-31 Thread Vladimir Sementsov-Ogievskiy
Keep all connection code in one file, to be able to implement reconnect in further patches. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd-client.h | 2 +- block/nbd-client.c | 37 +++-- block/nbd.c| 40 ++--

[Qemu-block] [PATCH v4 01/10] block/nbd-client: split channel errors from export errors

2018-07-31 Thread Vladimir Sementsov-Ogievskiy
To implement nbd reconnect in further patches, we need to distinguish error codes, returned by nbd server, from channel errors, to reconnect only in the latter case. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/nbd-client.c | 83

[Qemu-block] [PATCH v4 05/10] block/nbd-client: don't check ioc

2018-07-31 Thread Vladimir Sementsov-Ogievskiy
We have several paranoiac checks for ioc != NULL. But ioc may become NULL only on close, which should not happen during requests handling. Also, we check ioc only sometimes, not after each yield, which is inconsistent. Let's drop these checks. However, for safety, lets leave asserts instead.

[Qemu-block] [PATCH v4 10/10] iotests: test nbd reconnect

2018-07-31 Thread Vladimir Sementsov-Ogievskiy
Add test, which starts backup to nbd target and restarts nbd server during backup. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/220| 67 +++ tests/qemu-iotests/220.out| 7 + tests/qemu-iotests/group | 1 +

[Qemu-block] [PATCH v4 04/10] block/nbd-client: fix nbd_reply_chunk_iter_receive

2018-07-31 Thread Vladimir Sementsov-Ogievskiy
Use exported report, not the variable to be reused (should not really matter). Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/nbd-client.c b/block/nbd-client.c index a1813cbfe1..263d1721f9 100644 ---

Re: [Qemu-block] [PATCH] throttle-groups: fix hang when group member leaves

2018-07-31 Thread Alberto Garcia
On Wed 04 Jul 2018 04:54:10 PM CEST, Stefan Hajnoczi wrote: > Throttle groups consist of members sharing one throttling state > (including bps/iops limits). Round-robin scheduling is used to ensure > fairness. If a group member already has a timer pending then other > groups members do not

Re: [Qemu-block] Python NBD client library

2018-07-31 Thread Richard W.M. Jones
On Tue, Jul 31, 2018 at 05:48:50PM +0300, Nir Soffer wrote: > Thanks everyone for the good input on > http://lists.nongnu.org/archive/html/qemu-block/2018-07/msg00168.html > > I'm convinced that the best direction for oVirt is having NBD client instead > of using the kernel nbd client. I think a

[Qemu-block] Python NBD client library

2018-07-31 Thread Nir Soffer
Thanks everyone for the good input on http://lists.nongnu.org/archive/html/qemu-block/2018-07/msg00168.html I'm convinced that the best direction for oVirt is having NBD client instead of using the kernel nbd client. I think a C library would be best, but a python version is faster to implement

Re: [Qemu-block] [PATCH] throttle-groups: fix hang when group member leaves

2018-07-31 Thread Alberto Garcia
On Wed 04 Jul 2018 04:54:10 PM CEST, Stefan Hajnoczi wrote: > Throttle groups consist of members sharing one throttling state > (including bps/iops limits). Round-robin scheduling is used to ensure > fairness. If a group member already has a timer pending then other > groups members do not

Re: [Qemu-block] [PATCH] Add interactive mode to qemu-img command

2018-07-31 Thread Programmingkid
> On Jul 31, 2018, at 6:48 AM, Kevin Wolf wrote: > > Am 30.07.2018 um 22:27 hat Programmingkid geschrieben: >> On Jul 30, 2018, at 3:39 PM, Max Reitz wrote: >>> On 2018-07-30 21:14, John Arbuckle wrote: >>> What comes to my mind is this: Why don't you write a front-end for >>> qemu-img? It'd

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img-cmds.hx: Add example usage for create command

2018-07-31 Thread Programmingkid
> On Jul 31, 2018, at 7:57 AM, Eric Blake wrote: > > On 07/30/2018 09:52 PM, John Arbuckle wrote: >> Add an example on how to use the create command. I believe this will make >> qemu-img easier to use. >> Signed-off-by: John Arbuckle >> --- >> qemu-img-cmds.hx | 2 +- >> 1 file changed, 1

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img-cmds.hx: Add example usage for create command

2018-07-31 Thread Programmingkid
> On Jul 31, 2018, at 8:35 AM, Kevin Wolf wrote: > > Am 31.07.2018 um 13:57 hat Eric Blake geschrieben: >> On 07/30/2018 09:52 PM, John Arbuckle wrote: >>> Add an example on how to use the create command. I believe this will make >>> qemu-img easier to use. >>> >>> Signed-off-by: John

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img-cmds.hx: Add example usage for create command

2018-07-31 Thread Kevin Wolf
Am 31.07.2018 um 13:57 hat Eric Blake geschrieben: > On 07/30/2018 09:52 PM, John Arbuckle wrote: > > Add an example on how to use the create command. I believe this will make > > qemu-img easier to use. > > > > Signed-off-by: John Arbuckle > > --- > > qemu-img-cmds.hx | 2 +- > > 1 file

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img-cmds.hx: Add example usage for create command

2018-07-31 Thread Eric Blake
On 07/30/2018 09:52 PM, John Arbuckle wrote: Add an example on how to use the create command. I believe this will make qemu-img easier to use. Signed-off-by: John Arbuckle --- qemu-img-cmds.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img-cmds.hx

Re: [Qemu-block] [PATCH] Add interactive mode to qemu-img command

2018-07-31 Thread Kevin Wolf
Am 30.07.2018 um 22:27 hat Programmingkid geschrieben: > On Jul 30, 2018, at 3:39 PM, Max Reitz wrote: > > On 2018-07-30 21:14, John Arbuckle wrote: > > What comes to my mind is this: Why don't you write a front-end for > > qemu-img? It'd be trivial to write a script that performs the > >

Re: [Qemu-block] [PATCH v3] block/gluster: Handle changed glfs_ftruncate signature

2018-07-31 Thread Niels de Vos
On Mon, Jul 30, 2018 at 03:27:29PM -0400, Jeff Cody wrote: > On Mon, Jul 30, 2018 at 10:07:27AM -0500, Eric Blake wrote: > > On 07/28/2018 02:50 AM, Niels de Vos wrote: > > >> > > >>Part of me wishes that libgfapi had just created a new function > > >>'glfs_ftruncate2', so that existing users

Re: [Qemu-block] [PULL 00/13] Block layer patches

2018-07-31 Thread Peter Maydell
On 30 July 2018 at 16:09, Kevin Wolf wrote: > The following changes since commit 6d9dd5fb9d0e9f4a174f53a0e20a39fbe809c71e: > > Merge remote-tracking branch > 'remotes/armbru/tags/pull-qobject-2018-07-27-v2' into staging (2018-07-30 > 09:55:47 +0100) > > are available in the git repository at: