[PATCH] flock() files even with a permissive share mode.

Christof Schmitt cs at samba.org
Mon Feb 4 21:31:15 UTC 2019

On Mon, Feb 04, 2019 at 08:25:54PM +0100, Volker Lendecke wrote:
> On Mon, Feb 04, 2019 at 11:31:20AM -0700, Christof Schmitt wrote:
> > > The NFS people I met do not see this as a priority, nobody ever could
> > > allocate time. Locking seems to be a topic nobody outside the SMB
> > > world ever looks at. We need to keep the VFS call in, because I know
> > > of at least one vendor who has this implemented in his proprietary
> > > file system. For the rest -- I don't think it matters if we keep it
> > > in.
> > 
> > Do you mean what we have implemented for gpfs? Or is there another file
> > system that can enforce share modes?
> Yes, I meant GPFS.
> > I see the problems with the flock call. The main advantage of keeping it
> > would be having an easy way to test the vfs call. We could add a test
> > for this to autobuild to ensure that the codepath is excersized, but if
> > gpfs is the only actual user, that probably would fall on me.
> This might mean we need a mock implementation of that call somewhere
> in autobuild, assuming we don't have it available on sn-devel the way
> GPFS does it.

I meant to keep and fix the flock calls and then write a testcase around
that: Open files with different SMB share modes and verify that the
flocks appear in the file system as expected.

Whether it would make sense to do some mock testing for the vfs_gpfs
module is an interesting topic, but that would take some more time to
implement. For now, we could keep it simple by only testing the flocks.


More information about the samba-technical mailing list