Page MenuHomeFreeBSD

copy_file_range.2: Document the COPY_FILE_RANGE_CLONE flags argument
ClosedPublic

Authored by rmacklem on Aug 16 2025, 11:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 15, 3:34 AM
Unknown Object (File)
Fri, Oct 10, 10:37 PM
Unknown Object (File)
Fri, Oct 10, 10:37 PM
Unknown Object (File)
Fri, Oct 10, 10:54 AM
Unknown Object (File)
Fri, Oct 10, 10:54 AM
Unknown Object (File)
Fri, Oct 10, 4:20 AM
Unknown Object (File)
Fri, Sep 26, 1:53 PM
Unknown Object (File)
Thu, Sep 18, 7:42 PM
Subscribers

Details

Summary

Commit 37b2cb5ecb0f added support for the
COPY_FILE_RANGE_CLONE flags argument to
copy_file_range(2).

This patch documents this flags argument.

This is a content change.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

The first paragraph of the DESCRIPTION becomes too heavy IMO.

Can we split it into a paragraph per arg. I do not think it would require anything but a bunch of .Pps.

lib/libsys/copy_file_range.2
136
142

I do not see a need to list a differences with other OSes in the main description. You might add a COMPATIBILITY section if you think that this is important enough for the FreeBSD manpage.

227

BTW, ENOSYS feels somewhat out of place there. Is there a reason the error cannot be ENOTSUPP?

ENOSYS means that the (whole) syscall is not implemented.

Thanks for the feedback. I'm off doing other things for
a few days, but will update this next weekend.

lib/libsys/copy_file_range.2
227

Sure, I can change it. The only reason I used ENOSYS
was that that was what zfs_copy_file_range() already
uses to indicate it cannot block clone. But, that ENOSYS
does not become a syscall return because the code just
calls vn_generic_copy_file_range() for ENOSYS.

I put up the one liner patch to change it to ENOTSUPP.

Made changes suggested by kib@.

kib added inline comments.
lib/libsys/copy_file_range.2
228
This revision is now accepted and ready to land.Aug 22 2025, 9:19 PM