diff options
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.c')
-rwxr-xr-x | libglusterfsclient/src/libglusterfsclient.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index aab93181f..520735cf9 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -4536,7 +4536,7 @@ out: } int -glusterfs_statfs (glusterfs_handle_t handle, const char *path, +glusterfs_glh_statfs (glusterfs_handle_t handle, const char *path, struct statfs *buf) { struct statvfs stvfs = {0, }; @@ -4595,6 +4595,28 @@ out: } int +glusterfs_statfs (const char *path, struct statfs *buf) +{ + struct vmp_entry *entry = NULL; + char *vpath = NULL; + int op_ret = -1; + + GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, path, out); + GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, buf, out); + + entry = libgf_vmp_search_entry ((char *)path); + if (!entry) { + errno = ENODEV; + goto out; + } + + vpath = libgf_vmp_virtual_path (entry, path); + op_ret = glusterfs_glh_statfs (entry->handle, vpath, buf); +out: + return op_ret; +} + +int glusterfs_statvfs (glusterfs_handle_t handle, const char *path, struct statvfs *buf) { |