GNOME Bugzilla – Bug 655401
fuse: Bring back real statfs()
Last modified: 2011-08-15 16:22:38 UTC
Despite of the following comment in the sources, vfs_statfs() is properly called with a path from inside the mount. This is with 2.6.38 kernel and fuse-2.8.5. /* A stat -f <path> on a FUSE mount always results in this function being called with a path of '/'. This means we can't return valid info for the various mounts. Hopefully we can fix this in the future. */ Looking at fuse changelog, this should be supported since 2.6.0-rc1 and kernel 2.6.19: 2006-08-18 Miklos Szeredi <miklos@szeredi.hu> * For linux kernels >=2.6.18 (2.6.19 if using the fuse module from the kernel tree) the statfs method will receive the path within the filesystem on which the stat(v)fs syscall was called Looking at gvfs configure.ac, we require fuse >= 2.8.0 anyway. So I think we can peacefully bring real statfs support back.
Created attachment 192744 [details] [review] proposed patch Patch that implements full statvfs() functionality. We fall back to zero values just like we did before, for fuse mount root and for filesystems that don't provide necessary info. For non-existent paths we return proper error. Please test, especially with LibreOffice on SMB.
I went ahead and committed the patch. It got some testing in Fedora for a little time with no reported bugs so far. commit 314b991948fd4d6e9ea84a889e4c84fa79f0965d Author: Tomas Bzatek <tbzatek@redhat.com> Date: Mon Aug 15 18:19:42 2011 +0200 fuse: Bring back real statfs() https://bugzilla.gnome.org/show_bug.cgi?id=655401