Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153081028
D51938.id160442.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D51938.id160442.diff
View Options
diff --git a/lib/libsys/copy_file_range.2.clone b/lib/libsys/copy_file_range.2
--- a/lib/libsys/copy_file_range.2.clone
+++ b/lib/libsys/copy_file_range.2
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd December 28, 2023
+.Dd August 16, 2025
.Dt COPY_FILE_RANGE 2
.Os
.Sh NAME
@@ -101,9 +101,33 @@
or
.Fa outfd
respectively will not be affected.
-The
+The only
.Fa flags
-argument must be 0.
+argument currently defined is
+.Dv COPY_FILE_RANGE_CLONE .
+When this flag is set,
+.Fn copy_file_range
+will return
+.Er ENOSYS
+if the copy cannot be done via
+block cloning.
+When
+.Fa flags
+is 0, a file system may do the copy via block cloning
+or by data copying.
+Block cloning is only possible when the offsets (plus
+.Fa len
+if not to EOF on the input file) are block
+aligned.
+The correct block alignment can normally be acquired via the
+.Dv _PC_CLONE_BLKSIZE
+name for
+.Xr pathconf 2 .
+Note that
+.Dv COPY_FILE_RANGE_CLONE
+is a
+.Fx
+specific flag and is not Linux compatible.
.Pp
This system call attempts to maintain holes in the output file for
the byte range being copied.
@@ -203,9 +227,15 @@
File system that stores
.Fa outfd
is full.
+.It Bq Er ENOSYS
+Cannot do the copy via block cloning when the
+.Dv COPY_FILE_RANGE_CLONE
+.Fa flags
+argument is specified.
.El
.Sh SEE ALSO
-.Xr lseek 2
+.Xr lseek 2 ,
+.Xr pathconf 2
.Sh STANDARDS
The
.Fn copy_file_range
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 12:21 AM (15 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31811652
Default Alt Text
D51938.id160442.diff (1 KB)
Attached To
Mode
D51938: copy_file_range.2: Document the COPY_FILE_RANGE_CLONE flags argument
Attached
Detach File
Event Timeline
Log In to Comment