Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-27 Thread Marc-André Lureau
Hi On Thu, Feb 27, 2020 at 12:39 PM Daniel P. Berrangé wrote: > > On Thu, Feb 27, 2020 at 12:19:58PM +0100, Kevin Wolf wrote: > > Am 27.02.2020 um 12:07 hat Marc-André Lureau geschrieben: > > > On Thu, Feb 27, 2020 at 11:55 AM Kevin Wolf wrote: > > > > Am 27.02.2020 um 11:28 hat Coiby Xu geschri

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-27 Thread Daniel P . Berrangé
On Thu, Feb 27, 2020 at 12:19:58PM +0100, Kevin Wolf wrote: > Am 27.02.2020 um 12:07 hat Marc-André Lureau geschrieben: > > On Thu, Feb 27, 2020 at 11:55 AM Kevin Wolf wrote: > > > Am 27.02.2020 um 11:28 hat Coiby Xu geschrieben: > > > > > > we still need customized vu_message_read because libvhos

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-27 Thread Kevin Wolf
Am 27.02.2020 um 12:07 hat Marc-André Lureau geschrieben: > On Thu, Feb 27, 2020 at 11:55 AM Kevin Wolf wrote: > > Am 27.02.2020 um 11:28 hat Coiby Xu geschrieben: > > > > > we still need customized vu_message_read because libvhost-user assumes > > > > > we will always get a full-size VhostUserMsg

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-27 Thread Marc-André Lureau
Hi On Thu, Feb 27, 2020 at 11:55 AM Kevin Wolf wrote: > > Am 27.02.2020 um 11:28 hat Coiby Xu geschrieben: > > > > we still need customized vu_message_read because libvhost-user assumes > > > > we will always get a full-size VhostUserMsg and hasn't taken care of > > > > this short read case. I wi

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-27 Thread Kevin Wolf
Am 27.02.2020 um 11:28 hat Coiby Xu geschrieben: > > > we still need customized vu_message_read because libvhost-user assumes > > > we will always get a full-size VhostUserMsg and hasn't taken care of > > > this short read case. I will improve libvhost-user's vu_message_read > > > by making it keep

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-27 Thread Coiby Xu
> > we still need customized vu_message_read because libvhost-user assumes > > we will always get a full-size VhostUserMsg and hasn't taken care of > > this short read case. I will improve libvhost-user's vu_message_read > > by making it keep reading from socket util getting enough bytes. I > > ass

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-27 Thread Kevin Wolf
Am 27.02.2020 um 10:53 hat Coiby Xu geschrieben: > Thank you for reminding me of this socket short read issue! It seems > we still need customized vu_message_read because libvhost-user assumes > we will always get a full-size VhostUserMsg and hasn't taken care of > this short read case. I will impr

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-27 Thread Coiby Xu
Thank you for reminding me of this socket short read issue! It seems we still need customized vu_message_read because libvhost-user assumes we will always get a full-size VhostUserMsg and hasn't taken care of this short read case. I will improve libvhost-user's vu_message_read by making it keep rea

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-26 Thread Stefan Hajnoczi
On Wed, Feb 26, 2020 at 11:18:41PM +0800, Coiby Xu wrote: > Hi Stefan, > > Thank you for reviewing my code! > > I tried to reach you on IRC. But somehow either you missed my message > or I missed your reply. So I will reply by email instead. > > If we use qio_channel_set_aio_fd_handler to monito

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-26 Thread Coiby Xu
Hi Stefan, Thank you for reviewing my code! I tried to reach you on IRC. But somehow either you missed my message or I missed your reply. So I will reply by email instead. If we use qio_channel_set_aio_fd_handler to monitor G_IO_IN event, i.e. use vu_dispatch as the read handler, then we can re-

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-19 Thread Stefan Hajnoczi
On Tue, Feb 18, 2020 at 01:07:06PM +0800, Coiby Xu wrote: > v4: > * add object properties in class_init > * relocate vhost-user-blk-test > * other changes including using SocketAddress, coding style, etc. Thanks! I think the vhost-user server code can be simplified if libvhost-user uses the ev

[PATCH v4 0/5] vhost-user block device backend implementation

2020-02-17 Thread Coiby Xu
v4: * add object properties in class_init * relocate vhost-user-blk-test * other changes including using SocketAddress, coding style, etc. v3: * separate generic vhost-user-server code from vhost-user-blk-server code * re-write vu_message_read and kick hander function as coroutines to d