Messages in this thread | | | Date | Wed, 19 May 2004 06:58:06 -0400 | From | Jakub Jelinek <> | Subject | Re: sendfile -EOVERFLOW on AMD64 |
| |
On Wed, May 19, 2004 at 12:38:56PM +0200, Jan Kasprzak wrote: > Andi Kleen wrote: > : Jan Kasprzak <kas@informatics.muni.cz> 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);
What filesystem you're using? For XFS I'd expect this: STATIC ssize_t linvfs_sendfile( struct file *filp, loff_t *ppos, size_t count, read_actor_t actor, void *target) { vnode_t *vp = LINVFS_GET_VP(filp->f_dentry->d_inode); int error;
VOP_SENDFILE(vp, filp, ppos, 0, count, actor, target, NULL, error); return error; }
(note error is int, not ssize_t), but I don't see anything obvious for other filesystems.
Jakub - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |