jigneshvasoya / fuse-zip

Automatically exported from code.google.com/p/fuse-zip
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Wrong behaviour while "live" writing in fuse-zip fs. #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. mount a zip file as usual
2. open new file in the mounted directory
3. write something, close file

So I have simple c program
---- test.c ----

#include <stdio.h>

int main() {
    FILE *inf_h;
    int i;
    inf_h = fopen("/1.log","w");
    for (i=0; i<100000; i++) {
        fprintf(inf_h, "1234567890\n");
    }
    fclose(inf_h);
    return 0;
}

where 'compressed` is a mount point.

# ls compressed/1.log -hs
538M compressed/1.log

This is nonsense, since the real size of the file is only 1.1M.
Well, after fusermount -u, unzip -l shows the correct file size, however
it's always wrong on mouned filesystem.

Also, is there any restriction on a (compressed) file size? I tried to use
fuse-zip to save a huge text file (output from a calculation, up to hundred
Gbs of plane text). However, due to the size issue above, I couldn't save
even a 500Mb file this way, 'cos a (wrong) file size reached 20 GB and
after unmount a got 'fuse-zip[30013]: Error while saving file
01-equilib.cvf in ZIP archive: -12' message.

System: opensuse 11.2, x86_64, linux-2.6.31.5, fuse-2.7.4-3.2,
libzip1-0.9-23.2, zlib-1.2.3-140.2, gcc-4.4.1.

Original issue reported on code.google.com by fedya...@gmail.com on 18 Nov 2009 at 2:43

GoogleCodeExporter commented 9 years ago
Fixed in version 0.2.8.

> Also, is there any restriction on a (compressed) file size?

All files kept in memory until file system is unmounted, so file size is 
limited by
available amount of virtual memory in your system.

Original comment by alexander.galanin on 18 Nov 2009 at 6:10