Re: [PATCH 01/11] vfs: copy_file_range source range over EOF should fail

Christoph Hellwig
2018-12-05T21:30:03Z

On Thu, Dec 06, 2018 at 08:08:24AM +1100, Dave Chinner wrote:
> On Wed, Dec 05, 2018 at 06:12:52AM -0800, Christoph Hellwig wrote:
> > > Realistically, though, I think an attempt to read beyond EOF for the
> > > copy should result in behaviour like read() (i.e. return 0 bytes),
> > > not EINVAL. The existing behaviour needs to change, though.
> >
> > I agree with this statement. So we don't we implement these semantics?
>
> No, we don't.

Sorry - I was rushing that sentence out. It should have been:

So why don't we implement these semantics?

>
> I will rework the patch series to make attempts to copy beyond the
> end of the source file return 0 to indicate that there is no more
> data to copy rather than return an error.

Great, thanks!