Page MenuHomeFreeBSD

Make linux(4) support splice(2) - kind of
ClosedPublic

Authored by trasz on Jul 12 2020, 3:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 29, 3:12 PM
Unknown Object (File)
Mon, Mar 24, 7:37 PM
Unknown Object (File)
Fri, Mar 7, 10:44 PM
Unknown Object (File)
Fri, Mar 7, 2:32 PM
Unknown Object (File)
Feb 20 2025, 5:00 PM
Unknown Object (File)
Feb 14 2025, 4:53 PM
Unknown Object (File)
Jan 23 2025, 11:33 PM
Unknown Object (File)
Jan 18 2025, 9:19 PM
Subscribers

Details

Summary

Add a trivial linux(4) splice(2) implementation, which simply
returns EINVAL. Fixes grep (grep-3.1-2build1).

PR: kern/247219

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

trasz requested review of this revision.Jul 12 2020, 3:24 PM
sys/compat/linux/linux_file.c
1774 ↗(On Diff #74361)

so consumers handle EINVAL from splice but not ENOSYS?

sys/compat/linux/linux_file.c
1774 ↗(On Diff #74361)

Precisely. Well, the one I found: grep. But looking at splice(2) man page, consumers probably need to handle it anyway: with early kernels exactly one of the fds had to be a pipe, later both could be, then there's "EINVAL The target filesystem doesn't support splicing"...

Probably worth putting that EINVAL description in a comment by the return.

This revision is now accepted and ready to land.Jul 14 2020, 12:58 AM