summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/src/glfs-fops.c23
-rw-r--r--api/src/glfs.h2
2 files changed, 25 insertions, 0 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index 326530578..37e8d22d8 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -3166,6 +3166,29 @@ out:
}
int
+glfs_ipc (struct glfs *fs, int32_t op)
+{
+ int ret = -1;
+ xlator_t *subvol = NULL;
+
+ __glfs_entry_fs (fs);
+
+ subvol = glfs_active_subvol (fs);
+ if (!subvol) {
+ ret = -1;
+ errno = EIO;
+ goto out;
+ }
+
+ ret = syncop_ipc (subvol, op);
+ DECODE_SYNCOP_ERR (ret);
+
+out:
+ glfs_subvol_done (fs, subvol);
+ return ret;
+}
+
+int
glfs_chdir (struct glfs *fs, const char *path)
{
int ret = -1;
diff --git a/api/src/glfs.h b/api/src/glfs.h
index d79385792..9feaa8015 100644
--- a/api/src/glfs.h
+++ b/api/src/glfs.h
@@ -639,6 +639,8 @@ glfs_setattr (struct glfs *fs, const char *path, struct iatt *iatt,
int
glfs_fsetattr (struct glfs_fd *glfd, struct iatt *iatt, int valid);
+int glfs_ipc (struct glfs *fs, int32_t op) __THROW;
+