Re: [PATCH] fs/splice: don't block splice_direct_to_actor() after data was read

From: Christoph Hellwig
Date: Tue Nov 08 2022 - 02:38:02 EST


On Sat, Nov 05, 2022 at 10:04:21AM +0100, Max Kellermann wrote:
> Since there are no other parameters, I suggest adding the
> SPLICE_F_NOWAIT flag, which is similar to SPLICE_F_NONBLOCK, but
> affects the "non-pipe" file descriptor passed to sendfile() or
> splice(). It translates to IOCB_NOWAIT for regular files.

This looks reasonable to me and matches the read/write side.

>
> For now, I
> have documented the flag to be kernel-internal with a high bit, like
> io_uring does with SPLICE_F_FD_IN_FIXED, but making this part of the
> system call ABI may be a good idea as well.

Yeah, my only comment here is that I see no reason to make this
purely kernel internal.

And while looking at that: does anyone remember why the (public)
SPLICE_F_* aren't in a uapi header?