smbd/smb2_ioctl: check sparseness for dup extents
authorDavid Disseldorp <ddiss@samba.org>
Fri, 30 Sep 2016 18:53:07 +0000 (20:53 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 10 May 2017 06:22:19 +0000 (08:22 +0200)
commitfb31e359bf8e80ece6641bc1a7e6a1e2a5e67ddb
tree80c913ea58a3a4d14e34f45c9d12cc2ccd1cdc08
parente95318466255323ab22e772c12219cc738d15177
smbd/smb2_ioctl: check sparseness for dup extents

FSCTL_DUPLICATE_EXTENTS_TO_FILE should fail if the source is marked
sparse while the target is not:

From: Jeff McCashland
To: David Disseldorp
Subject: RE: FSCTL_DUPLICATE_EXTENTS_TO_FILE questions, 116092214702946
Date: Tue, 27 Dec 2016 18:06:14 +0000

...
We have updated the spec for future release:

Section 2.3.8 FSCTL_DUPLICATE_EXTENTS_TO_FILE Reply
Changed description of STATUS_NOT_SUPPORTED error code to:
"--The source and target destination ranges overlap on the same file.
--Source file is sparse, while -target is a non-sparse file.
--The source range is beyond the source file's allocation size."

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source3/smbd/smb2_ioctl_filesys.c