On Fri, Jan 13, 2017 at 12:11 PM, Al Viro <v...@zeniv.linux.org.uk> wrote:
>
> PS: 'size' argument of iov_iter_advance() is the second "some" in the
> above - we tell it how much we want to advance by and everything past
> that point is, in case of PIPE_ITER, discarded.

Ok. The naming threw me. It would be more logical to call that
operation a "truncate", not advance.

I notice that one of the comments in fs/splice.c actually says that:

        iov_iter_advance(&to, copied);  /* truncates and discards */

but yes, I see what it's trying to do now.

Ugh. I still think your patch is butt-ugly, and the index comparisons
make me nervous, but..

Let's see if Alan's issue actually goes away with your later patch.

             Linus

Reply via email to