copy_file_range() takes a size_t as it's length, not a "long long".
Therefore we need to be able to pass sizes larger than 8EB to it
to be able to test the interface fully and that requires copy_range
to accept all values except an explicit error value of "-1LL".
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Jan Tulak <jtulak@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
* glibc buffered copy fallback.
*/
static loff_t
-copy_file_range_cmd(int fd, long long *src, long long *dst, long long len)
+copy_file_range_cmd(int fd, long long *src, long long *dst, size_t len)
{
loff_t ret;
{
long long src = 0;
long long dst = 0;
- long long len = 0;
+ size_t len = 0;
int opt;
int ret;
int fd;
break;
case 'l':
len = cvtnum(fsblocksize, fssectsize, optarg);
- if (len < 0) {
+ if (len == -1LL) {
printf(_("invalid length -- %s\n"), optarg);
return 0;
}