Re: [PATCH 22/23] fs: default to generic_file_splice_read for files having ->read_iter

2020-07-30 Thread Christoph Hellwig
On Thu, Jul 30, 2020 at 05:22:19PM +0100, Al Viro wrote: > FWIW, none of the dubious (and outright broken) cases I've found go anywhere > near that. And it definitely won't help tun/tap... Then I'm missing something obvious - what is the problem with tun/tap?

Re: [PATCH 22/23] fs: default to generic_file_splice_read for files having ->read_iter

2020-07-30 Thread Al Viro
On Thu, Jul 30, 2020 at 05:17:01PM +0100, Al Viro wrote: > On Thu, Jul 30, 2020 at 05:20:46PM +0200, Christoph Hellwig wrote: > > > Fortunately I think the fix is pretty easy - remove the special pipe > > zero copy optimization from copy_page_to_iter, and just have the > > callers actually want

Re: [PATCH 22/23] fs: default to generic_file_splice_read for files having ->read_iter

2020-07-30 Thread Al Viro
On Thu, Jul 30, 2020 at 05:20:46PM +0200, Christoph Hellwig wrote: > Fortunately I think the fix is pretty easy - remove the special pipe > zero copy optimization from copy_page_to_iter, and just have the > callers actually want it because they have pagecache or similar > refcountable pages use

Re: [PATCH 22/23] fs: default to generic_file_splice_read for files having ->read_iter

2020-07-30 Thread Christoph Hellwig
On Thu, Jul 30, 2020 at 04:08:26PM +0100, Al Viro wrote: > > I think we need to fix that in the instances, as we really expect > > ->splice_read to just work instead of the caller knowing what could > > work and what might not. > > Er... generic_file_splice_read() is a library helper; the

Re: [PATCH 22/23] fs: default to generic_file_splice_read for files having ->read_iter

2020-07-30 Thread Al Viro
On Thu, Jul 30, 2020 at 09:03:29AM +0200, Christoph Hellwig wrote: > On Thu, Jul 30, 2020 at 01:05:44AM +0100, Al Viro wrote: > > On Tue, Jul 07, 2020 at 07:48:00PM +0200, Christoph Hellwig wrote: > > > If a file implements the ->read_iter method, the iter based splice read > > > works and is

Re: [PATCH 22/23] fs: default to generic_file_splice_read for files having ->read_iter

2020-07-30 Thread Christoph Hellwig
On Thu, Jul 30, 2020 at 01:05:44AM +0100, Al Viro wrote: > On Tue, Jul 07, 2020 at 07:48:00PM +0200, Christoph Hellwig wrote: > > If a file implements the ->read_iter method, the iter based splice read > > works and is always preferred over the ->read based one. Use it by > > default in

Re: [PATCH 22/23] fs: default to generic_file_splice_read for files having ->read_iter

2020-07-29 Thread Al Viro
On Tue, Jul 07, 2020 at 07:48:00PM +0200, Christoph Hellwig wrote: > If a file implements the ->read_iter method, the iter based splice read > works and is always preferred over the ->read based one. Use it by > default in do_splice_to and remove all the direct assignment of >

[PATCH 22/23] fs: default to generic_file_splice_read for files having ->read_iter

2020-07-07 Thread Christoph Hellwig
If a file implements the ->read_iter method, the iter based splice read works and is always preferred over the ->read based one. Use it by default in do_splice_to and remove all the direct assignment of generic_file_splice_read to file_operations. Signed-off-by: Christoph Hellwig ---

[PATCH 22/23] fs: default to generic_file_splice_read for files having ->read_iter

2020-07-01 Thread Christoph Hellwig
If a file implements the ->read_iter method, the iter based splice read works and is always preferred over the ->read based one. Use it by default in do_splice_to and remove all the direct assignment of generic_file_splice_read to file_operations. Signed-off-by: Christoph Hellwig ---