[Qemu-devel] [PATCH 0/5] NBD reconnect: preliminary refactoring

Vladimir Sementsov-Ogievskiy posted 5 patches 7 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180507154458.73945-1-vsementsov@virtuozzo.com
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test s390x passed
block/nbd-client.h |   2 +-
block/nbd-client.c | 163 ++++++++++++++++++++++++++++++++++-------------------
block/nbd.c        |  41 +-------------
3 files changed, 107 insertions(+), 99 deletions(-)
[Qemu-devel] [PATCH 0/5] NBD reconnect: preliminary refactoring
Posted by Vladimir Sementsov-Ogievskiy 7 years, 5 months ago
Hi all!

Here are some preliminary refactoring patches, before NBD reconnect
series.

Vladimir Sementsov-Ogievskiy (5):
  block/nbd-client: split channel errors from export errors
  block/nbd: move connection code from block/nbd to block/nbd-client
  block/nbd-client: split connection from initialization
  block/nbd-client: fix nbd_reply_chunk_iter_receive
  block/nbd-client: don't check ioc

 block/nbd-client.h |   2 +-
 block/nbd-client.c | 163 ++++++++++++++++++++++++++++++++++-------------------
 block/nbd.c        |  41 +-------------
 3 files changed, 107 insertions(+), 99 deletions(-)

-- 
2.11.1


Re: [Qemu-devel] [PATCH 0/5] NBD reconnect: preliminary refactoring
Posted by Vladimir Sementsov-Ogievskiy 7 years, 5 months ago
What about patches 1-4?

07.05.2018 18:44, Vladimir Sementsov-Ogievskiy wrote:
> Hi all!
>
> Here are some preliminary refactoring patches, before NBD reconnect
> series.
>
> Vladimir Sementsov-Ogievskiy (5):
>    block/nbd-client: split channel errors from export errors
>    block/nbd: move connection code from block/nbd to block/nbd-client
>    block/nbd-client: split connection from initialization
>    block/nbd-client: fix nbd_reply_chunk_iter_receive
>    block/nbd-client: don't check ioc
>
>   block/nbd-client.h |   2 +-
>   block/nbd-client.c | 163 ++++++++++++++++++++++++++++++++++-------------------
>   block/nbd.c        |  41 +-------------
>   3 files changed, 107 insertions(+), 99 deletions(-)
>


-- 
Best regards,
Vladimir


Re: [Qemu-devel] [PATCH 0/5] NBD reconnect: preliminary refactoring
Posted by Eric Blake 7 years, 5 months ago
On 05/17/2018 04:54 AM, Vladimir Sementsov-Ogievskiy wrote:
> What about patches 1-4?

Still on my list to review (I'm first trying to post an updated proposal 
on the libvirt list for managing incremental backups); but on first 
glance, the idea of being able to reconnect instead of permanently 
switching to EIO failures on first error seems reasonable.

> 
> 07.05.2018 18:44, Vladimir Sementsov-Ogievskiy wrote:
>> Hi all!
>>
>> Here are some preliminary refactoring patches, before NBD reconnect
>> series.
>>
>> Vladimir Sementsov-Ogievskiy (5):
>>    block/nbd-client: split channel errors from export errors
>>    block/nbd: move connection code from block/nbd to block/nbd-client
>>    block/nbd-client: split connection from initialization
>>    block/nbd-client: fix nbd_reply_chunk_iter_receive
>>    block/nbd-client: don't check ioc
>>
>>   block/nbd-client.h |   2 +-
>>   block/nbd-client.c | 163 
>> ++++++++++++++++++++++++++++++++++-------------------
>>   block/nbd.c        |  41 +-------------
>>   3 files changed, 107 insertions(+), 99 deletions(-)
>>
> 
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH 0/5] NBD reconnect: preliminary refactoring
Posted by Vladimir Sementsov-Ogievskiy 7 years, 5 months ago
17.05.2018 16:48, Eric Blake wrote:
> On 05/17/2018 04:54 AM, Vladimir Sementsov-Ogievskiy wrote:
>> What about patches 1-4?
>
> Still on my list to review (I'm first trying to post an updated 
> proposal on the libvirt list for managing incremental backups); but on 
> first glance, the idea of being able to reconnect instead of 
> permanently switching to EIO failures on first error seems reasonable.

It relates to the same case as CMD_CACHE. We need to start guest over 
new empty disk with backing = r-o nbd server (backup). Guest is already 
running, disconnect will lead to data loss (not very significant, we can 
retry, starting from the same backup), so ability to reconnect may help.



>
>>
>> 07.05.2018 18:44, Vladimir Sementsov-Ogievskiy wrote:
>>> Hi all!
>>>
>>> Here are some preliminary refactoring patches, before NBD reconnect
>>> series.
>>>
>>> Vladimir Sementsov-Ogievskiy (5):
>>>    block/nbd-client: split channel errors from export errors
>>>    block/nbd: move connection code from block/nbd to block/nbd-client
>>>    block/nbd-client: split connection from initialization
>>>    block/nbd-client: fix nbd_reply_chunk_iter_receive
>>>    block/nbd-client: don't check ioc
>>>
>>>   block/nbd-client.h |   2 +-
>>>   block/nbd-client.c | 163 
>>> ++++++++++++++++++++++++++++++++++-------------------
>>>   block/nbd.c        |  41 +-------------
>>>   3 files changed, 107 insertions(+), 99 deletions(-)
>>>
>>
>>
>


-- 
Best regards,
Vladimir