Re: [PATCH v2 4/7] xen/9pfs: connect to the backend

2017-03-13 Thread Stefano Stabellini
On Thu, 9 Mar 2017, Boris Ostrovsky wrote: > > + > > +static int xen_9pfs_front_alloc_dataring(struct xenbus_device *dev, > > + struct xen_9pfs_dataring *ring) > > +{ > > + int i; > > + int ret = -ENOMEM; > > + > > + init_waitqueue_head(&ring->wq); > > + spin_lock_init(&ring->lock

Re: [PATCH v2 4/7] xen/9pfs: connect to the backend

2017-03-09 Thread Boris Ostrovsky
> + > +static int xen_9pfs_front_alloc_dataring(struct xenbus_device *dev, > + struct xen_9pfs_dataring *ring) > +{ > + int i; > + int ret = -ENOMEM; > + > + init_waitqueue_head(&ring->wq); > + spin_lock_init(&ring->lock); > + INIT_WORK(&ring->work, p9_xen_response)

[PATCH v2 4/7] xen/9pfs: connect to the backend

2017-03-08 Thread Stefano Stabellini
Implement functions to handle the xenbus handshake. Upon connection, allocate the rings according to the protocol specification. Initialize a work_struct and a wait_queue. The work_struct will be used to schedule work upon receiving an event channel notification from the backend. The wait_queue wi