On Fri, Jan 13, 2017 at 08:08:27PM +0000, Al Viro wrote:

> Because it's "truncate to size", not "throw everything up to that point
> out".
> 
> We have some amount of data pushed into pipe (in this case - 0) and we
> have some buffers allocated by ..._get_pages() past the end of it.
> Some of that we want to keep (again, in this case - none) and have the next
> copy_to_iter() go after those, the rest we discard.

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.

Reply via email to