[PATCH v9 0/3] NBD reconnect

Vladimir Sementsov-Ogievskiy posted 3 patches 4 years, 6 months ago
Test asan passed
Test checkpatch passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test docker-quick@centos7 passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191009084158.15614-1-vsementsov@virtuozzo.com
Maintainers: Stefan Hajnoczi <stefanha@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Eric Blake <eblake@redhat.com>, Max Reitz <mreitz@redhat.com>
include/qemu/coroutine.h      |  23 ++-
block/nbd.c                   | 331 +++++++++++++++++++++++++++-------
util/qemu-coroutine-sleep.c   |  51 ++++--
tests/qemu-iotests/264        |  95 ++++++++++
tests/qemu-iotests/264.out    |  13 ++
tests/qemu-iotests/group      |   1 +
tests/qemu-iotests/iotests.py |  11 ++
7 files changed, 447 insertions(+), 78 deletions(-)
create mode 100755 tests/qemu-iotests/264
create mode 100644 tests/qemu-iotests/264.out
[PATCH v9 0/3] NBD reconnect
Posted by Vladimir Sementsov-Ogievskiy 4 years, 6 months ago
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 established requests will be resent. After
@reconnect-delay period all requests will be failed (until successful
reconnect).

v10:

01: add Eric's r-b
02: drop dead assignment local_err = NULL
    s/nbd_reconnect_loop/nbd_co_reconnect_loop/
03: avoid race conditions + some improvements
  - introduce qemu_io_silent_check and use it to wait for NBD server
    start
  - use size variable instead of '5M' in all places
  - use smart waiting loop instead of sleep, to wait for job progress
  - do srv.wait() after srv.kill(), to be sure that server is stopped
  - drop throttling earlier
  - drop 'quick' tag in group file

Vladimir Sementsov-Ogievskiy (3):
  qemu-coroutine-sleep: introduce qemu_co_sleep_wake
  block/nbd: nbd reconnect
  iotests: test nbd reconnect

 include/qemu/coroutine.h      |  23 ++-
 block/nbd.c                   | 331 +++++++++++++++++++++++++++-------
 util/qemu-coroutine-sleep.c   |  51 ++++--
 tests/qemu-iotests/264        |  95 ++++++++++
 tests/qemu-iotests/264.out    |  13 ++
 tests/qemu-iotests/group      |   1 +
 tests/qemu-iotests/iotests.py |  11 ++
 7 files changed, 447 insertions(+), 78 deletions(-)
 create mode 100755 tests/qemu-iotests/264
 create mode 100644 tests/qemu-iotests/264.out

-- 
2.21.0


Re: [PATCH v9 0/3] NBD reconnect
Posted by Vladimir Sementsov-Ogievskiy 4 years, 6 months ago
Oops, somehow, I copied subject and forget to fix v9/v10. It's v10.

09.10.2019 11:41, Vladimir Sementsov-Ogievskiy wrote:
> 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 established requests will be resent. After
> @reconnect-delay period all requests will be failed (until successful
> reconnect).
> 
> v10:
> 
> 01: add Eric's r-b
> 02: drop dead assignment local_err = NULL
>      s/nbd_reconnect_loop/nbd_co_reconnect_loop/
> 03: avoid race conditions + some improvements
>    - introduce qemu_io_silent_check and use it to wait for NBD server
>      start
>    - use size variable instead of '5M' in all places
>    - use smart waiting loop instead of sleep, to wait for job progress
>    - do srv.wait() after srv.kill(), to be sure that server is stopped
>    - drop throttling earlier
>    - drop 'quick' tag in group file
> 
> Vladimir Sementsov-Ogievskiy (3):
>    qemu-coroutine-sleep: introduce qemu_co_sleep_wake
>    block/nbd: nbd reconnect
>    iotests: test nbd reconnect
> 
>   include/qemu/coroutine.h      |  23 ++-
>   block/nbd.c                   | 331 +++++++++++++++++++++++++++-------
>   util/qemu-coroutine-sleep.c   |  51 ++++--
>   tests/qemu-iotests/264        |  95 ++++++++++
>   tests/qemu-iotests/264.out    |  13 ++
>   tests/qemu-iotests/group      |   1 +
>   tests/qemu-iotests/iotests.py |  11 ++
>   7 files changed, 447 insertions(+), 78 deletions(-)
>   create mode 100755 tests/qemu-iotests/264
>   create mode 100644 tests/qemu-iotests/264.out
> 


-- 
Best regards,
Vladimir