[Qemu-devel] [PATCH v9 0/3] NBD reconnect

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

v9:

01: - fix grammar [Eric] [1]
    - add "static" to qemu_co_sleep_ns__scheduled variable definition [Eric] [2]
    - add public typedef for internal QemuCoSleepState and use it [Kevin]
        [this leads to returning of co_sleep_cb, as we need wrapper with
         void * argument o pass to aio_timer_new][3]
    - rename function and add helper with old name and old semantics [Kevin]
    - keep Kevin's r-b, hope [1], [2] and [3] are not too much.
02: rebase on 01 changes
    some tiny improvements from Eric's review

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                   | 332 +++++++++++++++++++++++++++-------
 util/qemu-coroutine-sleep.c   |  51 ++++--
 tests/qemu-iotests/264        |  65 +++++++
 tests/qemu-iotests/264.out    |  12 ++
 tests/qemu-iotests/group      |   1 +
 tests/qemu-iotests/iotests.py |   4 +
 7 files changed, 410 insertions(+), 78 deletions(-)
 create mode 100755 tests/qemu-iotests/264
 create mode 100644 tests/qemu-iotests/264.out

-- 
2.21.0