Re: [PATCH v18 09/15] iov_iter: Kill ITER_PIPE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 14, 2023 at 10:07:51PM +0000, David Howells wrote:
> The ITER_PIPE-type iterator was only used for generic_file_splice_read(),
> but that has now been switched to either pull pages directly from the
> pagecache for buffered file splice-reads or to use ITER_BVEC instead for
> O_DIRECT file splice-reads.  This leaves ITER_PIPE unused - so remove it.

Wonderful, except that now you've got duplicates of ->read_iter() for
everyone who wants zero-copy on ->splice_read() ;-/

I understand the attraction of arbitrary seeks on those suckers; ITER_PIPE
is a massive headache in that respect.  But I really don't like what your
approach trades it for.

And you are nowhere near done - consider e.g. NFS.  Mainline has it
feed ITER_PIPE to nfs_file_read(), which does call generic_file_read_iter() -
after
        result = nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping);

Sure, you can add nfs_file_splice_read() that would do what nfs_file_read()
does, calling filemap_spice_read() instead of generic_file_read_iter().

Repeat the same for ocfs2 (locking of its own).  And orangefs.  And
XFS (locking, again).  And your own AFS, while we are at it.  Et sodding
cetera - *everything* that uses generic_file_splice_read() with
->read_iter other than generic_file_read_iter() needs review and,
quite likely, a ->splice_read() instance of its own.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux