-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposal
Milestone
Description
Proposal Details
Writing to a file from an io.SectionReader backed by a file could
use copy_file_range(2).
The machinery for this mostly exists: SectionReader.Outer() gives
access to the underlying *os.File and offset. Then, the offset
should be passed into unix.CopyFileRange. After the call completes,
the number of bytes (or the updated offset) can be passed to
SectionReader.Seek.
The only missing piece is that CopyFileRange in internal/poll
does not accept offset arguments. Is this something that can be
changed, and if yes, does it require a formal proposal?
For reference, this is similar to
#61727.
Metadata
Metadata
Assignees
Labels
LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposal