aboutsummaryrefslogtreecommitdiffstats
path: root/ioctl.h
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2014-02-06 15:29:18 +0100
committerChris Mason <clm@fb.com>2014-03-21 06:23:10 -0700
commit1484081f6113cd33ad538a4a50f332754dbcc873 (patch)
tree62d47e56dee80d985ef6fd0f9237f6194577e882 /ioctl.h
parentafb47079fa1e57c63c0ae0cfcb90817f3abf6830 (diff)
downloadbtrfs-progs-1484081f6113cd33ad538a4a50f332754dbcc873.tar.gz
btrfs-progs-1484081f6113cd33ad538a4a50f332754dbcc873.tar.xz
btrfs-progs-1484081f6113cd33ad538a4a50f332754dbcc873.zip
ioctl: add note regarding CLONE_RANGE(len=0) behaviour
A BTRFS_IOC_CLONE_RANGE request with a src_length value of zero has the effect of cloning all data from src_offset through to end-of-file. Document this behaviour in the header file for those who (like me) incorrectly assume that no data is cloned in such a case. Signed-off-by: David Disseldorp <ddiss@suse.de> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'ioctl.h')
-rw-r--r--ioctl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ioctl.h b/ioctl.h
index 2cf9c73..7f7e1d6 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -506,6 +506,7 @@ static inline char *btrfs_err_str(enum btrfs_err_code err_code)
#define BTRFS_IOC_SCAN_DEV _IOW(BTRFS_IOCTL_MAGIC, 4, \
struct btrfs_ioctl_vol_args)
+/* With a @src_length of zero, the range from @src_offset->EOF is cloned! */
struct btrfs_ioctl_clone_range_args {
__s64 src_fd;
__u64 src_offset, src_length;