statfs() / statvfs() syscall ballsup...
From: Trond Myklebust
Date: Thu Oct 09 2003 - 17:17:53 EST
Hi,
We appear to have a problem with the new statfs interface
in 2.6.0...
The problem is that as far as userland is concerned, 'struct statfs'
reports f_blocks, f_bfree,... in units of the "optimal transfer size":
f_bsize (backwards compatibility).
OTOH 'struct statvfs' reports the same values in units of the fragment
size (the blocksize of the underlying filesyste): f_frsize. (says
Single User Spec v2)
Both are apparently supposed to syscall down via sys_statfs()...
Question: how we're supposed to reconcile the two cases for something
like NFS, where these 2 values are supposed to differ?
Note that f_bsize is usually larger than f_frsize, hence conversions
from the former to the latter are subject to rounding errors...
Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/