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
F167970940: D25636.id74359.diff
Tue, Aug 25, 4:49 PM
F167958201: D25636.id74360.diff
Tue, Aug 25, 3:21 PM
F167947815: D25636.id74614.diff
Tue, Aug 25, 2:04 PM
F167939034: D25636.id74361.diff
Tue, Aug 25, 12:55 PM
F167925261: D25636.id74360.diff
Tue, Aug 25, 11:18 AM
F167918905: D25636.id74614.diff
Tue, Aug 25, 10:35 AM
F167869972: D25636.diff
Tue, Aug 25, 3:30 AM
Unknown Object (File)
Mon, Aug 24, 4:58 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 Passed
Unit
No Test Coverage
Build Status
Buildable 32277
Build 29761: arc lint + arc unit

Event Timeline

trasz requested review of this revision.Jul 12 2020, 3:24 PM
sys/compat/linux/linux_file.c
1774

so consumers handle EINVAL from splice but not ENOSYS?

sys/compat/linux/linux_file.c
1774

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