vfs_glusterfs: Fix exporting subdirs with shadow_copy2
[sfrench/samba-autobuild/.git] / source3 / modules / vfs_glusterfs.c
index b6bc1682d1f6e3e00996e48d37f76f9b04cc6245..8d12ac65f026993d8ce915fc629141a12fcdfe52 100644 (file)
@@ -352,6 +352,16 @@ static int vfs_gluster_connect(struct vfs_handle_struct *handle,
                          volume, strerror(errno)));
                goto done;
        }
+
+       /*
+        * The shadow_copy2 module will fail to export subdirectories
+        * of a gluster volume unless we specify the mount point,
+        * because the detection fails if the file system is not
+        * locally mounted:
+        * https://bugzilla.samba.org/show_bug.cgi?id=13091
+        */
+       lp_do_parameter(SNUM(handle->conn), "shadow:mountpoint", "/");
+
 done:
        if (ret < 0) {
                if (fs)
@@ -1473,8 +1483,6 @@ static struct vfs_fn_pointers glusterfs_fns = {
        .realpath_fn = vfs_gluster_realpath,
        .chflags_fn = vfs_gluster_chflags,
        .file_id_create_fn = NULL,
-       .copy_chunk_send_fn = NULL,
-       .copy_chunk_recv_fn = NULL,
        .streaminfo_fn = NULL,
        .get_real_filename_fn = vfs_gluster_get_real_filename,
        .connectpath_fn = vfs_gluster_connectpath,
@@ -1482,8 +1490,7 @@ static struct vfs_fn_pointers glusterfs_fns = {
        .brl_lock_windows_fn = NULL,
        .brl_unlock_windows_fn = NULL,
        .brl_cancel_windows_fn = NULL,
-       .strict_lock_fn = NULL,
-       .strict_unlock_fn = NULL,
+       .strict_lock_check_fn = NULL,
        .translate_name_fn = NULL,
        .fsctl_fn = NULL,