Re: [PATCH v15 05/17] overlayfs: Implement splice-read

From: Miklos Szeredi
Date: Wed Feb 15 2023 - 11:40:20 EST


On Wed, 15 Feb 2023 at 16:53, Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
>
> On Wed, Feb 15, 2023 at 04:50:04PM +0100, Miklos Szeredi wrote:
> > Looks good. One more suggestion: add a vfs_splice() helper and use
> > that from do_splice_to() as well.
>
> I really hate call_read_iter() etc. Please don't perpetuate that
> pattern.

I didn't suggest call_splice_read(). vfs_splice_read() would have the
rw_verify_area() as well as the check for non-null ->splice_read().

Doing it that way from the start would have prevented two of the bugs
that David introduced in the first version.

Thanks,
Miklos