diff options
author | David Disseldorp <ddiss@samba.org> | 2018-07-05 17:18:15 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2018-07-28 06:16:15 +0200 |
commit | be42bf487da2f2e94506840f18b47457fe31da75 (patch) | |
tree | b0f0aa10385c44c27c47d56d84037ce2fea11358 /source3 | |
parent | 5bfa46c23ecbd4f3dd9ed0238a3fdac9fe1581ea (diff) | |
download | samba-be42bf487da2f2e94506840f18b47457fe31da75.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>
(cherry picked from commit 926ae50627d536735cee9b3931ee35bc19060261)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/vfs_ceph.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index 9f752837a6a..57bafec098c 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -1261,12 +1261,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) |