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 RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux