Re: [PATCH 1/4] virtiofsd: Release file locks using F_UNLCK

2019-11-22 Thread Vivek Goyal
On Fri, Nov 22, 2019 at 10:07:13AM +, Stefan Hajnoczi wrote: > On Fri, Nov 15, 2019 at 03:55:40PM -0500, Vivek Goyal wrote: > > diff --git a/contrib/virtiofsd/passthrough_ll.c > > b/contrib/virtiofsd/passthrough_ll.c > > index bc214df0c7..028e7da273 100644 > > --- a/contrib/virtiofsd/passthrou

Re: [PATCH 1/4] virtiofsd: Release file locks using F_UNLCK

2019-11-22 Thread Stefan Hajnoczi
On Fri, Nov 15, 2019 at 03:55:40PM -0500, Vivek Goyal wrote: > diff --git a/contrib/virtiofsd/passthrough_ll.c > b/contrib/virtiofsd/passthrough_ll.c > index bc214df0c7..028e7da273 100644 > --- a/contrib/virtiofsd/passthrough_ll.c > +++ b/contrib/virtiofsd/passthrough_ll.c > @@ -936,6 +936,14 @@ s

[PATCH 1/4] virtiofsd: Release file locks using F_UNLCK

2019-11-15 Thread Vivek Goyal
We are emulating posix locks for guest using open file description locks in virtiofsd. When any of the fd is closed in guest, we find associated OFD lock fd (if there is one) and close it to release all the locks. Assumption here is that there is no other thread using lo_inode_plock structure or p