VFS - ENOTSUP vs ENOSYS

Michael Adam obnox at samba.org
Tue Sep 1 11:52:04 UTC 2015


On 2015-08-31 at 20:33 -0400, Ira Cooper wrote:
> Hello,
> 
> I've hit a bug that I'm working on fixing involving kernel share modes,
> and vfs modules that don't implement them.
> 
> But I realized, returning ENOSYS was wrong, because in this case
> kernel_flock will implement it on XFS.  But Gluster doesn't support
> kernel_flock.  So it should return ENOTSUP not ENOSYS, IMHO.

Maybe I am just confused, but looking at the code in open.c,
where SMB_VFS_KERNEL_FLOCK is called, we currently have a problem
of getting sharing violation for any vfs module that returns
-1 from kernel_flock_fn, irrespective of the errno?
(The code does not check it.)

I have had the impression before, that I can't see
how the current glusterfs vfs module can work without
'kernel share modes = no' in the config.

Maybe I am also just missing a subtle point.

Michael

> This
> brings up a larger question... how many times are we returning ENOSYS
> from the VFS where we mean ENOTSUP?
> 
> Just looking for thoughts on this one before I do a larger audit and
> clean it up, in the VFS.  What do we want here?
> 
> Thanks,
> 
> -Ira
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150901/cb67b345/attachment.sig>


More information about the samba-technical mailing list