Re: [PATCH 2/3] generic/43[014]: copy_range beyond source EOF should fail

Dave Chinner
2018-12-05T22:23:37Z

On Mon, Dec 03, 2018 at 05:42:55PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> As per the copy_file_range() man page:
>
> EINVAL
> Requested range extends beyond the end of the source file;
> .....
>
> These tests actually attempt to copy beyond the end of the source
> file and so should fail with EINVAL. The kernel does not check this
> and so needs fixing. These operations should fail, so fix the tests.
>
> Also move the tests to the copy_range group so they are distinct
> from the copy group which refers to xfs_copy tests.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>

Self NACK on this - the behaviour for this corner case we've decided
on is going to be different to what the man page says, so this patch
is going to have to be reworked.

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com