Index: uspace/lib/c/generic/vfs/vfs.c
===================================================================
--- uspace/lib/c/generic/vfs/vfs.c	(revision 1e371cf2a341440320a92cfc947f054e893b44e3)
+++ uspace/lib/c/generic/vfs/vfs.c	(revision e1ec5a21a2a78bf4912a332ed1c3aadcb30e23fa)
@@ -43,4 +43,5 @@
 #include <stdio.h>
 #include <sys/stat.h>
+#include <sys/statfs.h>
 #include <sys/types.h>
 #include <ipc/services.h>
@@ -892,4 +893,43 @@
 }
 
+int statfs(const char *path, struct statfs *statfs)
+{
+	sysarg_t rc;
+	sysarg_t rc_orig;
+	aid_t req;
+	size_t pa_size;
+	
+	char *pa = absolutize(path, &pa_size);
+	if (!pa)
+		return ENOMEM;
+	async_exch_t *exch = vfs_exchange_begin();
+	
+	req = async_send_0(exch, VFS_IN_STATFS, NULL);
+	rc = async_data_write_start(exch, pa, pa_size);
+	if (rc != EOK) {
+		vfs_exchange_end(exch);
+		free(pa);
+		async_wait_for(req, &rc_orig);
+		if (rc_orig == EOK)
+			return (int) rc;
+		else
+			return (int) rc_orig;
+	}
+	rc = async_data_read_start(exch, (void *) statfs, sizeof(struct statfs));
+	if (rc != EOK) {
+		vfs_exchange_end(exch);
+		free(pa);
+		async_wait_for(req, &rc_orig);
+		if (rc_orig == EOK)
+			return (int) rc;
+		else
+			return (int) rc_orig;
+	}
+	vfs_exchange_end(exch);
+	free(pa);
+	async_wait_for(req, &rc);
+	return rc;
+}
+
 /** @}
  */
Index: uspace/lib/c/include/ipc/vfs.h
===================================================================
--- uspace/lib/c/include/ipc/vfs.h	(revision 1e371cf2a341440320a92cfc947f054e893b44e3)
+++ uspace/lib/c/include/ipc/vfs.h	(revision e1ec5a21a2a78bf4912a332ed1c3aadcb30e23fa)
@@ -82,4 +82,5 @@
 	VFS_IN_WAIT_HANDLE,
 	VFS_IN_MTAB_GET,
+	VFS_IN_STATFS
 } vfs_in_request_t;
 
@@ -98,4 +99,5 @@
 	VFS_OUT_LOOKUP,
 	VFS_OUT_DESTROY,
+	VFS_OUT_STATFS,
 	VFS_OUT_LAST
 } vfs_out_request_t;
Index: uspace/lib/c/include/sys/statfs.h
===================================================================
--- uspace/lib/c/include/sys/statfs.h	(revision e1ec5a21a2a78bf4912a332ed1c3aadcb30e23fa)
+++ uspace/lib/c/include/sys/statfs.h	(revision e1ec5a21a2a78bf4912a332ed1c3aadcb30e23fa)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2013 Manuele Conti
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_SYS_STATFS_H_
+#define LIBC_SYS_STATFS_H_
+
+#include <sys/types.h>
+
+struct statfs { 
+	uint32_t    f_type;     /* type of file system  */
+	uint32_t    f_bsize;    /* fundamental file system block size */
+	uint64_t    f_blocks;   /* total data blocks in file system */
+	uint64_t    f_bfree;    /* free blocks in fs */
+};
+
+extern int statfs(const char *, struct statfs *);
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/vfs/vfs.h
===================================================================
--- uspace/lib/c/include/vfs/vfs.h	(revision 1e371cf2a341440320a92cfc947f054e893b44e3)
+++ uspace/lib/c/include/vfs/vfs.h	(revision e1ec5a21a2a78bf4912a332ed1c3aadcb30e23fa)
@@ -44,7 +44,9 @@
 #include "vfs_mtab.h"
 
+
 enum vfs_change_state_type {
 	VFS_PASS_HANDLE
 };
+
 
 extern char *absolutize(const char *, size_t *);
@@ -61,5 +63,4 @@
 extern async_exch_t *vfs_exchange_begin(void);
 extern void vfs_exchange_end(async_exch_t *);
-
 #endif
 
Index: uspace/lib/fs/libfs.c
===================================================================
--- uspace/lib/fs/libfs.c	(revision 1e371cf2a341440320a92cfc947f054e893b44e3)
+++ uspace/lib/fs/libfs.c	(revision e1ec5a21a2a78bf4912a332ed1c3aadcb30e23fa)
@@ -45,4 +45,5 @@
 #include <mem.h>
 #include <sys/stat.h>
+#include <sys/statfs.h>
 #include <stdlib.h>
 
@@ -74,4 +75,5 @@
 static void libfs_open_node(libfs_ops_t *, fs_handle_t, ipc_callid_t,
     ipc_call_t *);
+static void libfs_statfs(libfs_ops_t *, fs_handle_t, ipc_callid_t, ipc_call_t *);
 
 static void vfs_out_mounted(ipc_callid_t rid, ipc_call_t *req)
@@ -219,4 +221,8 @@
 }
 
+static void vfs_out_statfs(ipc_callid_t rid, ipc_call_t *req)
+{
+	libfs_statfs(libfs_ops, reg.fs_handle, rid, req);
+}
 static void vfs_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg)
 {
@@ -276,4 +282,7 @@
 		case VFS_OUT_SYNC:
 			vfs_out_sync(callid, &call);
+			break;
+		case VFS_OUT_STATFS:
+			vfs_out_statfs(callid, &call);
 			break;
 		default:
@@ -825,8 +834,59 @@
 	
 	ops->node_put(fn);
-	
+
+
 	async_data_read_finalize(callid, &stat, sizeof(struct stat));
 	async_answer_0(rid, EOK);
 }
+
+void libfs_statfs(libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid,
+    ipc_call_t *request)
+{
+	service_id_t service_id = (service_id_t) IPC_GET_ARG1(*request);
+	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
+	
+	fs_node_t *fn;
+	int rc = ops->node_get(&fn, service_id, index);
+	on_error(rc, answer_and_return(rid, rc));
+	
+	ipc_callid_t callid;
+	size_t size;
+	if ((!async_data_read_receive(&callid, &size)) ||
+	    (size != sizeof(struct statfs))) {
+		ops->node_put(fn);
+		async_answer_0(callid, EINVAL);
+		async_answer_0(rid, EINVAL);
+		return;
+	}
+	
+	struct statfs statfs;
+	memset(&statfs, 0, sizeof(struct statfs));
+
+	if (NULL != ops->size_block) {	
+		rc = ops->size_block(service_id, &statfs.f_bsize);
+		if (rc != EOK) goto error;
+	}
+
+	if (NULL != ops->total_block_count) {
+		rc = ops->total_block_count(service_id, &statfs.f_blocks);
+		if (rc != EOK) goto error;
+	}
+
+	if (NULL != ops->free_block_count) {
+		rc = ops->free_block_count(service_id, &statfs.f_bfree);
+		if (rc != EOK) goto error;
+	}
+
+	ops->node_put(fn);
+	async_data_read_finalize(callid, &statfs, sizeof(struct statfs));
+	async_answer_0(rid, EOK);
+	return;
+
+error:
+	ops->node_put(fn);
+	async_answer_0(callid, EINVAL);
+	async_answer_0(rid, EINVAL);
+}
+
 
 /** Open VFS triplet.
Index: uspace/lib/fs/libfs.h
===================================================================
--- uspace/lib/fs/libfs.h	(revision 1e371cf2a341440320a92cfc947f054e893b44e3)
+++ uspace/lib/fs/libfs.h	(revision e1ec5a21a2a78bf4912a332ed1c3aadcb30e23fa)
@@ -93,4 +93,7 @@
 	bool (* is_file)(fs_node_t *);
 	service_id_t (* service_get)(fs_node_t *);
+	int (* size_block)(service_id_t, uint32_t *);
+	int (* total_block_count)(service_id_t, uint64_t *);
+	int (* free_block_count)(service_id_t, uint64_t *);
 } libfs_ops_t;
 
