summaryrefslogtreecommitdiff
path: root/source3/smbd/smb2_ioctl_filesys.c
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2017-05-04 15:09:36 +0200
committerRalph Boehme <slow@samba.org>2017-05-10 12:27:00 +0200
commitde01e117d65219e5765e8e83730aa00c4bac5b6b (patch)
tree0fe43d84ebc955e34c0bb5fc4353f11e61ec7ed3 /source3/smbd/smb2_ioctl_filesys.c
parentc4fd96016610171a31ad54a7883b3682680ef8d1 (diff)
downloadsamba-de01e117d65219e5765e8e83730aa00c4bac5b6b.tar.gz
smbd/smb2_ioctl: instruct VFS to ignore locks for dup extents
As described in the previous commit - Windows Server 2016 (ReFS) ignores locks for FSCTL_DUPLICATE_EXTENTS_TO_FILE. Do the same for Samba. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed May 10 12:27:00 CEST 2017 on sn-devel-144
Diffstat (limited to 'source3/smbd/smb2_ioctl_filesys.c')
-rw-r--r--source3/smbd/smb2_ioctl_filesys.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/smb2_ioctl_filesys.c b/source3/smbd/smb2_ioctl_filesys.c
index 9a44dba5224..fbff97cc830 100644
--- a/source3/smbd/smb2_ioctl_filesys.c
+++ b/source3/smbd/smb2_ioctl_filesys.c
@@ -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);
}