Re: [Qemu-devel] [PATCH v6 6/7] block/nbd-client: nbd reconnect

2019-06-10 Thread Eric Blake
On 6/10/19 8:29 AM, Vladimir Sementsov-Ogievskiy wrote: >> Hmm, and then, include it into BDRVNBDState? I don't remember why didn't do >> it, and now I don't see any reason for it. We store this information anyway >> for the whole life of the driver.. >> >> So, if I'm going to refactor it, I have

Re: [Qemu-devel] [PATCH v6 6/7] block/nbd-client: nbd reconnect

2019-06-10 Thread Vladimir Sementsov-Ogievskiy
10.06.2019 15:38, Vladimir Sementsov-Ogievskiy wrote: > 07.06.2019 6:17, Eric Blake wrote: >>> +typedef struct NBDConnection { >>> +    BlockDriverState *bs; >>> +    SocketAddress *saddr; >>> +    const char *export; >>> +    QCryptoTLSCreds *tlscreds; >>> +    const char *hostname; >>> +    const

Re: [Qemu-devel] [PATCH v6 6/7] block/nbd-client: nbd reconnect

2019-06-10 Thread Vladimir Sementsov-Ogievskiy
07.06.2019 6:17, Eric Blake wrote: >> +typedef struct NBDConnection { >> +BlockDriverState *bs; >> +SocketAddress *saddr; >> +const char *export; >> +QCryptoTLSCreds *tlscreds; >> +const char *hostname; >> +const char *x_dirty_bitmap; >> +} NBDConnection; > Can we put this t

Re: [Qemu-devel] [PATCH v6 6/7] block/nbd-client: nbd reconnect

2019-06-07 Thread Kevin Wolf
Am 07.06.2019 um 16:27 hat Vladimir Sementsov-Ogievskiy geschrieben: > 07.06.2019 16:26, Kevin Wolf wrote: > > Am 07.06.2019 um 14:02 hat Vladimir Sementsov-Ogievskiy geschrieben: > >> 07.06.2019 11:06, Kevin Wolf wrote: > >>> Am 07.06.2019 um 05:17 hat Eric Blake geschrieben: > On 4/11/19 12:

Re: [Qemu-devel] [PATCH v6 6/7] block/nbd-client: nbd reconnect

2019-06-07 Thread Vladimir Sementsov-Ogievskiy
07.06.2019 16:26, Kevin Wolf wrote: > Am 07.06.2019 um 14:02 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 07.06.2019 11:06, Kevin Wolf wrote: >>> Am 07.06.2019 um 05:17 hat Eric Blake geschrieben: On 4/11/19 12:27 PM, Vladimir Sementsov-Ogievskiy wrote: > +static coroutine_fn void nbd_

Re: [Qemu-devel] [PATCH v6 6/7] block/nbd-client: nbd reconnect

2019-06-07 Thread Kevin Wolf
Am 07.06.2019 um 14:02 hat Vladimir Sementsov-Ogievskiy geschrieben: > 07.06.2019 11:06, Kevin Wolf wrote: > > Am 07.06.2019 um 05:17 hat Eric Blake geschrieben: > >> On 4/11/19 12:27 PM, Vladimir Sementsov-Ogievskiy wrote: > >>> +static coroutine_fn void nbd_reconnect_loop(NBDConnection *con) > >>

Re: [Qemu-devel] [PATCH v6 6/7] block/nbd-client: nbd reconnect

2019-06-07 Thread Vladimir Sementsov-Ogievskiy
07.06.2019 6:17, Eric Blake wrote: > On 4/11/19 12:27 PM, Vladimir Sementsov-Ogievskiy wrote: >> 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

Re: [Qemu-devel] [PATCH v6 6/7] block/nbd-client: nbd reconnect

2019-06-07 Thread Vladimir Sementsov-Ogievskiy
07.06.2019 11:06, Kevin Wolf wrote: > Am 07.06.2019 um 05:17 hat Eric Blake geschrieben: >> On 4/11/19 12:27 PM, Vladimir Sementsov-Ogievskiy wrote: >>> +static coroutine_fn void nbd_reconnect_loop(NBDConnection *con) >>> +{ >>> +NBDClientSession *s = nbd_get_client_session(con->bs); >>> +u

Re: [Qemu-devel] [PATCH v6 6/7] block/nbd-client: nbd reconnect

2019-06-07 Thread Kevin Wolf
Am 07.06.2019 um 05:17 hat Eric Blake geschrieben: > On 4/11/19 12:27 PM, Vladimir Sementsov-Ogievskiy wrote: > > +static coroutine_fn void nbd_reconnect_loop(NBDConnection *con) > > +{ > > +NBDClientSession *s = nbd_get_client_session(con->bs); > > +uint64_t start_time_ns = qemu_clock_get_

Re: [Qemu-devel] [PATCH v6 6/7] block/nbd-client: nbd reconnect

2019-06-06 Thread Eric Blake
On 4/11/19 12:27 PM, Vladimir Sementsov-Ogievskiy wrote: > 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. >