Re: [Virtio-fs] [PATCH 4/4] virtiofsd: Implement blocking posix locks

2019-12-09 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > On Tue, Nov 26, 2019 at 01:02:29PM +, Dr. David Alan Gilbert wrote: > > [..] > > > > > @@ -1950,21 +1948,54 @@ static void lo_setlk(fuse_req_t req, > > > > > fuse_ino_t ino, > > > > > > > > > > if (!plock) { > > > > > saverr = r

Re: [Virtio-fs] [PATCH 4/4] virtiofsd: Implement blocking posix locks

2019-11-27 Thread Vivek Goyal
On Tue, Nov 26, 2019 at 01:02:29PM +, Dr. David Alan Gilbert wrote: [..] > > > > @@ -1950,21 +1948,54 @@ static void lo_setlk(fuse_req_t req, fuse_ino_t > > > > ino, > > > > > > > > if (!plock) { > > > > saverr = ret; > > > > + pthread_mutex_unlock(&ino

Re: [Virtio-fs] [PATCH 4/4] virtiofsd: Implement blocking posix locks

2019-11-26 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > On Fri, Nov 22, 2019 at 05:47:32PM +, Dr. David Alan Gilbert wrote: > > [..] > > > +static int virtio_send_notify_msg(struct fuse_session *se, struct iovec > > > *iov, > > > + int count) > > > +{ > > > +struct fv_QueueIn

Re: [Virtio-fs] [PATCH 4/4] virtiofsd: Implement blocking posix locks

2019-11-25 Thread Vivek Goyal
On Fri, Nov 22, 2019 at 05:47:32PM +, Dr. David Alan Gilbert wrote: [..] > > +static int virtio_send_notify_msg(struct fuse_session *se, struct iovec > > *iov, > > + int count) > > +{ > > +struct fv_QueueInfo *qi; > > +VuDev *dev = &se->virtio_dev->dev; > >

Re: [Virtio-fs] [PATCH 4/4] virtiofsd: Implement blocking posix locks

2019-11-25 Thread Vivek Goyal
On Fri, Nov 22, 2019 at 10:53:24AM +, Stefan Hajnoczi wrote: > On Fri, Nov 15, 2019 at 03:55:43PM -0500, Vivek Goyal wrote: > > diff --git a/contrib/virtiofsd/fuse_lowlevel.c > > b/contrib/virtiofsd/fuse_lowlevel.c > > index d4a42d9804..f706e440bf 100644 > > --- a/contrib/virtiofsd/fuse_lowlev

Re: [PATCH 4/4] virtiofsd: Implement blocking posix locks

2019-11-22 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > As of now we don't support fcntl(F_SETLKW) and if we see one, we return > -EOPNOTSUPP. > > Change that by accepting these requests and returning a reply immediately > asking caller to wait. Once lock is available, send a notification to > the waiter indic

Re: [PATCH 4/4] virtiofsd: Implement blocking posix locks

2019-11-22 Thread Stefan Hajnoczi
On Fri, Nov 15, 2019 at 03:55:43PM -0500, Vivek Goyal wrote: > diff --git a/contrib/virtiofsd/fuse_lowlevel.c > b/contrib/virtiofsd/fuse_lowlevel.c > index d4a42d9804..f706e440bf 100644 > --- a/contrib/virtiofsd/fuse_lowlevel.c > +++ b/contrib/virtiofsd/fuse_lowlevel.c > @@ -183,7 +183,8 @@ int fu

[PATCH 4/4] virtiofsd: Implement blocking posix locks

2019-11-15 Thread Vivek Goyal
As of now we don't support fcntl(F_SETLKW) and if we see one, we return -EOPNOTSUPP. Change that by accepting these requests and returning a reply immediately asking caller to wait. Once lock is available, send a notification to the waiter indicating lock is available. Signed-off-by: Vivek Goyal