lkml.org 
[lkml]   [2006]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: squashfs size in statfs
On 6/15/06, Jan Engelhardt <jengelh@linux01.gwdg.de> wrote:
> >> Hello list,
> >>
> >>
> >> # l /mnt
> >> total 36293
> >> drwxr-xr-x 2 root root 20 Jun 5 11:50 .
> >> drwxr-xr-x 31 root root 4096 Jun 5 2006 ..
> >> -rw-r--r-- 1 root root 37158912 Jun 5 11:06 mem
> >> # df
> >> Filesystem 1K-blocks Used Available Use% Mounted on
> >> /dev/shm/sc.sqfs 26688 26688 0 100% /mnt
> >> # l sc.sqfs
> >> -rwx------ 1 jengelh users 27279360 Jun 5 11:50 sc.sqfs
> >>
> >> I think statfs() should show the uncompressed size, no?
> >
> >No.
> >
> Yes, because CRAM does it that way, and maybe zisofs does it too:

Zisofs doesn't (H. Peter Anvin should know as he wrote it :-) ).

root@pierrot:/# ls -la dir.iso
-rw-r--r-- 1 root root 366592 2006-06-16 22:41 dir.iso
root@pierrot:/# mount -t iso9660 dir.iso /mnt -o loop
root@pierrot:/# df /mnt
Filesystem 1K-blocks Used Available Use% Mounted on
/dir.iso 358 358 0 100% /mnt
root@pierrot:/# ls -la /mnt
total 13
drwxr-xr-x 2 root root 2048 2006-06-16 22:41 .
drwxr-xr-x 32 root root 4096 2006-06-16 22:56 ..
-rw-r--r-- 1 root root 51200000 2006-06-16 22:40 zero
Statfs should return the size of the filesystem, not the amount of
data the filesystem represents. In this respect the behaviour of
Squashfs and Zisofs is correct.

This is analogous to performing stat on a gzipped file. The stat
returns the size of the compressed file, not the uncompressed size.

Phillip
-
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/

\
 
 \ /
  Last update: 2006-06-17 00:13    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site