#50 error on displayed free disk space using a ram disk

closed-wont-fix
nobody
None
5
2006-02-14
2005-10-02
Anonymous
No

I have created a DAV Filesystem on my machine n22 into
the ramdisk, I can access succesfully the DAV
repository via cadaver or via mount.davfs2. My ramdisk
has 660 MB, the DAV is defined in the apache config
file as:
...
Alias /davfs /mnt/ramdisk/dav/fs
<Location /davfs>
...

I am wondering about the displayed free disk space:
n22 ~ # df -m /mnt/ramdisk/dav/ /mnt/dav/
Filesystem 1M-blocks Used Available Use%
Mounted on
tmpfs 660 1 660 1%
/mnt/ramdisk
http://n22/davfs/ 8790 0 8790 0%
/mnt/dav

Why there seems to be ~8,8 GB space free whereas the
whole ramdisk has only 660 MB ?

Discussion

  • Werner Baumann

    Werner Baumann - 2005-10-08
    • labels: 328718 -->
     
  • Werner Baumann

    Werner Baumann - 2005-10-08

    Logged In: YES
    user_id=1260327

    Hello Toralf,

    the free space of 8,8 GB is surely a fake, but not exactly a
    bug:

    Usually it is not possible to get information about "free
    space" from a WebDAV-server. It would be the best to tell
    aplications that this feature is not supported (error
    ENOTSUP). I think df would be happy with this.
    But some will applications assume erroneously a free disk
    space of zero, and consequently will not even attempt to
    write to this device.
    To get this applications to work with davfs we fake an
    arbitrarily high free disk space.

    If you want to get rid of this fake you might chance the
    file davfsd.c from line 1009:
    Replace

    case CODA_STATFS:
    if (!dav_has_permission(&in_buf->ih)) {
    out_buf->oh.result = EPERM;
    break;
    }
    CMD(statfs);
    DBG0(" Faking free disk space to satisfy Nautilus
    and the like.\n");
    out_buf-> coda_statfs.stat.f_blocks=9000000;
    out_buf-> coda_statfs.stat.f_bfree=9000000;
    out_buf-> coda_statfs.stat.f_bavail=9000000;
    out_buf-> coda_statfs.stat.f_files=9000000;
    out_buf-> coda_statfs.stat.f_ffree=9000000;
    break;

    by

    case CODA_STATFS:
    out_buf->oh.result = ENOTSUP;
    break;

    and run make and make install.

    Greetings
    Werner

     
  • Werner Baumann

    Werner Baumann - 2006-02-14
    • status: open --> closed-wont-fix
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks