Re: sendfile -EOVERFLOW on AMD64

From: Jan Kasprzak
Date: Wed May 19 2004 - 05:40:01 EST


Andi Kleen wrote:
: Jan Kasprzak <kas@xxxxxxxxxxxxxxxxxxx> writes:
: >
: > The image (FC2-i386-DVD.iso) has 4370640896 bytes. The FTP server is native
: > x86_64 binary, not a 32-bit one.
:
: sys_sendfile limits itself dumbly to 2GB even on 64bit architectures.
: This patch should fix it on x86-64, although other 64bit ports may
: need a similar patch. Just removing the limit in read_write
: is not easy, because it would need fixes in all the 32bit emulation
: layers.
:
It partly helped, thanks. But there is still one more problem
- it looks like sendfile() returns 32-bit value instead of 64-bit.
My debug info looks like this:

sendfile(offset=0, count=4370640896)
= -767073160, offset=3527894136

where I do

long val = sendfile(...); printf(...%ld..., val);

-Yenya


--
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/ Czech Linux Homepage: http://www.linux.cz/ |
Any compiler or language that likes to hide things like memory allocations
behind your back just isn't a good choice for a kernel. --Linus Torvalds
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/