[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ftp 2GB file size limit bug
> Sorry, that was the ftpd.
>
> http://www.h5l.org/fisheye/changelog/heimdal/?cs=23211
contains
if (munmap (chunk, st.st_size) < 0)
The chunk is not of size st.st_size, it's of size len, isn't it?
So, how much should we bother to get mmap() working? Yes, it seems to
work if I replace st.st_size with len, but mmap() compared to read()
has a almost non-measurable time difference (<5% when transfering a
2GB file at 31MB/sec I would call "equal" even if mmap() was the
slightly slower one in my tests). So why do you want to keep mmap()?
Code that is not there can not break. The bottleneck is probably
somewhere else.
I have not tested with other sizes than 2GB yet.
Harald.
PS: Before my last change:
$ /usr/src/heimdal-1.2/appl/ftp/ftp/.libs/ftp hsm.pdc.kth.se
Connected to pynchon.pdc.kth.se.
220 pynchon.pdc.kth.se FTP server (Version 6.00+Heimdal 0.7.2) ready.
Trying GSSAPI...
Authenticated to <ftp/pynchon.pdc.kth.se@NADA.KTH.SE>
Authentication successful.
Name (hsm.pdc.kth.se:haba):
S:232 User haba logged in.
S:230 Password not necessary
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /hsm/home/h/haba
S:250 CWD command successful.
ftp> bin
S:200 Type set to I.
ftp> put random2G
local: random2G remote: random2G
S:150 Opening BINARY mode data connection for 'random2G'.
ftp: munmap: Invalid argument
ftp: munmap: Invalid argument
ftp: munmap: Invalid argument
ftp: munmap: Invalid argument
ftp: munmap: Invalid argument
....