Re: Bug in short splice to socket?
From: Linus Torvalds
Date: Fri Jun 02 2023 - 07:28:32 EST
On Fri, Jun 2, 2023 at 4:23 AM David Howells <dhowells@xxxxxxxxxx> wrote:
>
> +/*
> + * Pass a zero-length record to the splice-write actor with SPLICE_F_MORE
> + * turned off to allow the network to see MSG_MORE deasserted.
> + */
> +static ssize_t splice_from_pipe_zero(struct pipe_inode_info *pipe,
David, STOP.
Stop doing these crazy hacks to generic splice code. None of this makes sense.
Those zero-sized splices have never worked, don't try to make them work.
The splice() system call has always had that
if (!len)
return 0;
since being introduced. We're not adding any crazy stuff now.
Do what I already suggested: making SPLICE_F_MORE reflect reality.
Or don't do anything at all. Because this kind of hacky garbage is not
even amusing.
Linus