On Wed, 2 Sep 2020 at 15:17, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote: > On Tue, Sep 01, 2020 at 08:01:31PM +0100, Sami Kerola wrote: > > A read() write() pair can be replaced with sendfile(), and it should be more > > efficient than suffling bytes back and forth user and kernel space. > > What kinds of fds are this? If this involves things like a tty > sendfile will probably stop working in Linux 5.10, as the kernel > fallback is pretty horrible and not exactly more efficient. Sendfile > also hasn't always been supported on all kinds of files, so you'll still > always need a fallback. Thank you for a review Christoph. Considering fallback to read() && write() is always required I do not think there is any advantage to call sendfile(). Karel, please consider this change falling short in simplifying or improving anything and therefore rejected. -- Sami Kerola http://www.iki.fi/kerolasa/