A Anna Schumaker #
Message details and related content
On 09/14/2015 02:32 PM, Darrick J. Wong wrote:
On Sun, Sep 13, 2015 at 09:50:18AM +0200, Michael Kerrisk (man-pages) wrote:quoted
Hi Anna, On 09/11/2015 10:30 PM, Anna Schumaker wrote:quoted
copy_file_range() is a new system call for copying ranges of data completely in the kernel. This gives filesystems an opportunity to implement some kind of "copy acceleration", such as reflinks or server-side-copy (in the case of NFS). Signed-off-by: Anna Schumaker <redacted>Thanks for writing such a nice first draft man page! I have a few comments below. Would you be willing to revise and resubmit?quoted
--- man2/copy_file_range.2 | 188 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 man2/copy_file_range.2diff --git a/man2/copy_file_range.2 b/man2/copy_file_range.2 new file mode 100644 index 0000000..84912b5 --- /dev/null +++ b/man2/copy_file_range.2@@ -0,0 +1,188 @@ +.\"This manpage is Copyright (C) 2015 Anna Schumaker <Anna.Schumaker-ZwjVKphTwtPQT0dZR+AlfA@public.gmane.org>We need a license for this page. Please see https://www.kernel.org/doc/man-pages/licenses.htmlquoted
+.TH COPY 2 2015-8-31 "Linux" "Linux Programmer's Manual"Make the month 2 digits (leading 0).quoted
+.SH NAME +copy_file_range \- Copy a range of data from one file to another +.SH SYNOPSIS +.nf +.B #include <linux/copy.h> +.B #include <sys/syscall.h>
Is there a better behavior for flags=0? I was thinking this would be what people want when they don't care how the copy happens in the kernel. Anna
quoted
What are the semantics with respect to signals, especially if data copying a very large file range? This info should be included in the man page, probably under NOTES.quoted
+.SH RETURN VALUE +Upon successful completion, +.BR copy_file_range () +will return the number of bytes copied between files. +This could be less than the length originally requested. + +On error, +.BR copy_file_range () +returns \-1 and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EBADF +One or more file descriptors are not valid, +or do not have proper read-write mode;I think that last line can go. I mean, isn't this point (again) covered in the next few lines?Or change the ';' to a ':'?quoted
quoted
+.I fd_in +is not open for reading; or +.I fd_out +is not open for writing. +.TP +.B EINVAL +Requested range extends beyond the end of the file; or thes/file/source file/ (right?)quoted
+.I flags +argument is set to an invalid value. +.TP
-- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html