Menu

#92 Filesize limit on linux wasteserver

open
nobody
None
5
2006-08-05
2006-08-05
Anonymous
No

It is only possible to upload the first 2 GB of large
files to the wastesrv on linux, furthermore all shared
files larger than 2 GB are shown as much smaller and
you get a file not found when you try to download them
from a client.

Discussion

  • earney

    earney - 2007-01-16

    Logged In: YES
    user_id=225986
    Originator: NO

    I've been looking at the source code to see what could be producing the 2GB problem. It looks like we are using the function stat to figure out the size of each file (sharedmain.cpp ~ line 702). I believe st_size is pretty much an int and in 32 bit arch, I believe int goes from ~ -2 Billion to 2 Billion (which would give us an upper limit for filesize around 2GB).

    I will look to see if I can find a solution for this. Does anyone off the type of their heads have any ideas of how to fix this?

     
  • earney

    earney - 2007-01-16

    Logged In: YES
    user_id=225986
    Originator: NO

    I have done some research, and from the pages I have read, it looks like we can change stat to stat64 and struct stat to struct stat64 and that should do it. I'll try to work on making these changes and testing them in a linux environment ASAP.

     
  • earney

    earney - 2007-01-18

    Logged In: YES
    user_id=225986
    Originator: NO

    Changes were made to filedb.cpp to allow usage of length_high (filesize) so that files larger then 2GB-1 can be represented correctly. I changed the code to use stat64 instead of stat. I also make a change to the Makefile so that flags -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES would be set, so that large files will be supported properly. filedb.cpp and Makefile will be send to Eric so he can merge them in with the project.

     

Log in to post a comment.