smbd/smb2_ioctl: instruct VFS to ignore locks for dup extents
[gd/samba-autobuild/.git] / source3 / smbd / smb2_ioctl_filesys.c
index 9a44dba5224d073f35288c15e368ce8b6c3a6672..fbff97cc8300aecc9f10787ccc4bcfcb91c26c3f 100644 (file)
@@ -256,11 +256,13 @@ static struct tevent_req *fsctl_dup_extents_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
+       /* tell the VFS to ignore locks across the clone, matching ReFS */
        subreq = SMB_VFS_COPY_CHUNK_SEND(dst_fsp->conn, state, ev,
                                         src_fsp, state->dup_extents.source_off,
                                         dst_fsp, state->dup_extents.target_off,
                                         state->dup_extents.byte_count,
-                                        VFS_COPY_CHUNK_FL_MUST_CLONE);
+                                        VFS_COPY_CHUNK_FL_MUST_CLONE
+                                        | VFS_COPY_CHUNK_FL_IGNORE_LOCKS);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
        }