aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2016-06-08 12:17:02 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2016-06-08 12:34:54 +0200
commit603fc95a2b0d3a4a860132d38ab6d9e26db73ced (patch)
treee9f80df16eb12908e0266306f9ecdc1ea7b108ba
parent1d691addc217ec5757561b8f8aa7462e29bbe0c5 (diff)
downloadman-pages-603fc95a2b0d3a4a860132d38ab6d9e26db73ced.tar.gz
ioctl_ficlonerange.2: Minor tweaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man2/ioctl_ficlonerange.238
1 files changed, 20 insertions, 18 deletions
diff --git a/man2/ioctl_ficlonerange.2 b/man2/ioctl_ficlonerange.2
index eee2a3f4c0..376f685c2a 100644
--- a/man2/ioctl_ficlonerange.2
+++ b/man2/ioctl_ficlonerange.2
@@ -30,10 +30,10 @@ ioctl_ficlonerange, ioctl_ficlone \- share some the data of one file with anothe
If a filesystem supports files sharing physical storage between multiple
files ("reflink"), this
.BR ioctl (2)
-system call can be used to make some of the data in the
-.B src_fd
+operation can be used to make some of the data in the
+.I src_fd
file appear in the
-.B dest_fd
+.I dest_fd
file by sharing the underlying storage, which is faster than making a separate
physical copy of the data.
If a file write should occur to a shared region,
@@ -58,10 +58,10 @@ the following form:
.nf
struct file_clone_range {
- __s64 src_fd;
- __u64 src_offset;
- __u64 src_length;
- __u64 dest_offset;
+ __s64 src_fd;
+ __u64 src_offset;
+ __u64 src_length;
+ __u64 dest_offset;
};
.fi
@@ -69,7 +69,9 @@ struct file_clone_range {
Clones are atomic with regards to concurrent writes, so no locks need to be
taken to obtain a consistent cloned copy.
-The FICLONE ioctl clones entire files.
+The
+.B FICLONE
+ioctl clones entire files.
.SH RETURN VALUE
On error, \-1 is returned, and
.I errno
@@ -89,18 +91,18 @@ regions in directories.
.B EINVAL
The filesystem does not support reflinking the ranges of the given files.
This error can also appear if either file descriptor represents
-a device, fifo, or socket.
+a device, FIFO, or socket.
Disk filesystems generally require the offset and length arguments
to be aligned to the fundamental block size.
-XFS and btrfs do not support
+XFS and Btrfs do not support
overlapping reflink ranges in the same file.
.TP
.B EBADF
.IR src_fd
is not open for reading;
.IR dest_fd
-is not open for writing or is open for append-only writes; or the filesystem
-which
+is not open for writing or is open for append-only writes;
+or the filesystem which
.IR src_fd
resides on does not support reflink.
.TP
@@ -115,17 +117,17 @@ Swap files cannot share storage.
.B EOPNOTSUPP
This can appear if the filesystem does not support reflinking either file
descriptor.
-.SH NOTES
-Because a copy on write operation requires the allocation of new storage, the
-.B fallocate (2)
-operation may un-share shared blocks to guarantee that subsequent writes will
-not fail because of lack of disk space.
.SH CONFORMING TO
This API is Linux-specific.
This ioctl was previously known as
.B BTRFS_IOC_CLONE_RANGE
-and was private to btrfs.
+and was private to Btrfs.
.fi
.in
+.SH NOTES
+Because a copy-on-write operation requires the allocation of new storage, the
+.BR fallocate (2)
+operation may unshare shared blocks to guarantee that subsequent writes will
+not fail because of lack of disk space.
.SH SEE ALSO
.BR ioctl (2)