Re: [PATCH v2 1/5] vhost-user block device backend

2020-02-20 Thread Coiby Xu
> > +vmsg->fd_num = 0; > > +for (cmsg = CMSG_FIRSTHDR(); > > + cmsg != NULL; > > + cmsg = CMSG_NXTHDR(, cmsg)) > > +{ > > +if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) { > > +fd_size = cmsg->cmsg_len - CMSG_LEN(0); > > +

Re: [PATCH v2 1/5] vhost-user block device backend

2020-02-19 Thread Coiby Xu
Hi Kevin, Thank you for reviewing my work in a rather detailed way. > > blockdev-vu.c | 1008 > > include/block/vhost-user.h | 46 ++ > > vl.c |4 + > > 3 files changed, 1058 insertions(+) > > create mode 100644

Re: [PATCH v2 1/5] vhost-user block device backend

2020-02-13 Thread Coiby Xu
Thank you for reviewing this patch! I'm already posted v3 based on your feedback. > > +#include "hw/qdev-properties.h" > > +enum { > > +VHOST_USER_BLK_MAX_QUEUES = 8, > > +}; > The number of queues is hardcoded to 1 so this constant can be removed for now. > > + > > +static QTAILQ_HEAD(,

Re: [PATCH v2 1/5] vhost-user block device backend

2020-01-16 Thread Kevin Wolf
Am 16.01.2020 um 14:51 hat Stefan Hajnoczi geschrieben: > > +static void vu_set_unix_socket(Object *obj, const char *value, > > +Error **errp) > > +{ > > +VubDev *vus = VHOST_USER_SERVER(obj);; > > + > > +if (vus->unix_socket) { > > +

Re: [PATCH v2 1/5] vhost-user block device backend

2020-01-16 Thread Kevin Wolf
Hi, I'm only doing a quick first review pointing out the more obvious things while I familiarise myself with your code. I intend to review it in more detail later (either in a second pass for this series, or when you post v3). Am 14.01.2020 um 15:06 hat Coiby Xu geschrieben: > By making use of

Re: [PATCH v2 1/5] vhost-user block device backend

2020-01-16 Thread Stefan Hajnoczi
On Tue, Jan 14, 2020 at 10:06:16PM +0800, Coiby Xu wrote: > By making use of libvhost, multiple block device drives can be exported and > each drive can serve multiple clients simultaneously. Since vhost-user-server > needs a block drive to be created first, delay the creation of this object. >

[PATCH v2 1/5] vhost-user block device backend

2020-01-14 Thread Coiby Xu
By making use of libvhost, multiple block device drives can be exported and each drive can serve multiple clients simultaneously. Since vhost-user-server needs a block drive to be created first, delay the creation of this object. Signed-off-by: Coiby Xu --- blockdev-vu.c | 1008