diff options
author | David Disseldorp <ddiss@samba.org> | 2018-07-05 17:18:15 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2018-07-06 20:37:20 +0200 |
commit | 926ae50627d536735cee9b3931ee35bc19060261 (patch) | |
tree | bb4ff38993ff5e332d8239a98d4510342e1e5867 | |
parent | 887f9147b4ccb6498b0e93efd7ea3696d3d36df2 (diff) | |
download | samba-926ae50627d536735cee9b3931ee35bc19060261.tar.gz |
vfs_ceph: don't lie about flock support
Instead, match vfs_gluster behaviour and require that users explicitly
disable "kernel share modes".
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13506
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | docs-xml/manpages/vfs_ceph.8.xml | 8 | ||||
-rw-r--r-- | source3/modules/vfs_ceph.c | 11 |
2 files changed, 13 insertions, 6 deletions
diff --git a/docs-xml/manpages/vfs_ceph.8.xml b/docs-xml/manpages/vfs_ceph.8.xml index 453030e50de..813b430739e 100644 --- a/docs-xml/manpages/vfs_ceph.8.xml +++ b/docs-xml/manpages/vfs_ceph.8.xml @@ -62,7 +62,15 @@ <programlisting> <smbconfsection name="[share]"/> <smbconfoption name="vfs objects">ceph</smbconfoption> + <smbconfoption name="path">/non-mounted/cephfs/path</smbconfoption> + <smbconfoption name="kernel share modes">no</smbconfoption> </programlisting> + + <para> + Note that currently <command>kernel share modes</command> have + to be disabled in a share running with the CephFS vfs module for + file serving to work properly. + </para> </refsect1> <refsect1> diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index b6ca27dd47e..47371bc9e08 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -1164,12 +1164,11 @@ static bool cephwrap_lock(struct vfs_handle_struct *handle, files_struct *fsp, i static int cephwrap_kernel_flock(struct vfs_handle_struct *handle, files_struct *fsp, uint32_t share_mode, uint32_t access_mask) { - DBG_DEBUG("[CEPH] kernel_flock\n"); - /* - * We must return zero here and pretend all is good. - * One day we might have this in CEPH. - */ - return 0; + DBG_ERR("[CEPH] flock unsupported! Consider setting " + "\"kernel share modes = no\"\n"); + + errno = ENOSYS; + return -1; } static bool cephwrap_getlock(struct vfs_handle_struct *handle, files_struct *fsp, off_t *poffset, off_t *pcount, int *ptype, pid_t *ppid) |