summaryrefslogtreecommitdiffstats
path: root/api/src
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2015-01-01 15:55:22 +0000
committerShyamsundar Ranganathan <srangana@redhat.com>2015-01-06 09:14:16 -0800
commitcd338784d39b9a4a55cc3c6a1613b90a2a63a8e3 (patch)
tree4868e6dd77b375bf6d0fdcb830decefb02de31b0 /api/src
parent6e2318f0821d7c58eddc837b2d218247243a5c8d (diff)
api: export glfs_resolve()
glfs_resolve() is an internal function in libgfapi. Export it so that it can be used by glfs-heal.c. The change is done in line with the approach followed in commit 7e497871d11a3a527e2ce192e4274322631f27d0 (http://review.gluster.org/9036) This patch [2/3] is required as a part of afr automated split-brain resolution implementation. Change-Id: If9057f2a037fd25a0dfa231683bfbaa72d3cb1b2 BUG: 1136769 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/9376 Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'api/src')
-rw-r--r--api/src/gfapi.map.in1
-rw-r--r--api/src/glfs-fops.c26
-rw-r--r--api/src/glfs-internal.h4
-rw-r--r--api/src/glfs-resolve.c4
4 files changed, 18 insertions, 17 deletions
diff --git a/api/src/gfapi.map.in b/api/src/gfapi.map.in
index 7fc95971f1b..a29f392dc53 100644
--- a/api/src/gfapi.map.in
+++ b/api/src/gfapi.map.in
@@ -149,5 +149,6 @@ GFAPI_PRIVATE_3.7.0 {
global:
glfs_free_from_ctx;
glfs_new_from_ctx;
+ glfs_resolve;
} GFAPI_3.6.0;
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index a0315e305b1..d35508e6f38 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -91,7 +91,7 @@ pub_glfs_open (struct glfs *fs, const char *path, int flags)
goto out;
retry:
- ret = glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
+ ret = priv_glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
ESTALE_RETRY (ret, errno, reval, &loc, retry);
@@ -243,7 +243,7 @@ pub_glfs_stat (struct glfs *fs, const char *path, struct stat *stat)
goto out;
}
retry:
- ret = glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
+ ret = priv_glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
ESTALE_RETRY (ret, errno, reval, &loc, retry);
@@ -347,7 +347,7 @@ pub_glfs_creat (struct glfs *fs, const char *path, int flags, mode_t mode)
destinataion.
*/
retry:
- ret = glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
+ ret = priv_glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
ESTALE_RETRY (ret, errno, reval, &loc, retry);
@@ -1267,7 +1267,7 @@ pub_glfs_access (struct glfs *fs, const char *path, int mode)
goto out;
}
retry:
- ret = glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
+ ret = priv_glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
ESTALE_RETRY (ret, errno, reval, &loc, retry);
@@ -1867,7 +1867,7 @@ pub_glfs_opendir (struct glfs *fs, const char *path)
INIT_LIST_HEAD (&glfd->entries);
retry:
- ret = glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
+ ret = priv_glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
ESTALE_RETRY (ret, errno, reval, &loc, retry);
@@ -2280,7 +2280,7 @@ pub_glfs_statvfs (struct glfs *fs, const char *path, struct statvfs *buf)
goto out;
}
retry:
- ret = glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
+ ret = priv_glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
ESTALE_RETRY (ret, errno, reval, &loc, retry);
@@ -2322,7 +2322,7 @@ glfs_setattr (struct glfs *fs, const char *path, struct iatt *iatt,
}
retry:
if (follow)
- ret = glfs_resolve (fs, subvol, path, &loc, &riatt, reval);
+ ret = priv_glfs_resolve (fs, subvol, path, &loc, &riatt, reval);
else
ret = glfs_lresolve (fs, subvol, path, &loc, &riatt, reval);
@@ -2612,7 +2612,7 @@ glfs_getxattr_common (struct glfs *fs, const char *path, const char *name,
}
retry:
if (follow)
- ret = glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
+ ret = priv_glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
else
ret = glfs_lresolve (fs, subvol, path, &loc, &iatt, reval);
@@ -2752,7 +2752,7 @@ glfs_listxattr_common (struct glfs *fs, const char *path, void *value,
retry:
if (follow)
- ret = glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
+ ret = priv_glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
else
ret = glfs_lresolve (fs, subvol, path, &loc, &iatt, reval);
@@ -2880,7 +2880,7 @@ glfs_setxattr_common (struct glfs *fs, const char *path, const char *name,
}
retry:
if (follow)
- ret = glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
+ ret = priv_glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
else
ret = glfs_lresolve (fs, subvol, path, &loc, &iatt, reval);
@@ -3001,7 +3001,7 @@ glfs_removexattr_common (struct glfs *fs, const char *path, const char *name,
}
retry:
if (follow)
- ret = glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
+ ret = priv_glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
else
ret = glfs_lresolve (fs, subvol, path, &loc, &iatt, reval);
@@ -3206,7 +3206,7 @@ pub_glfs_chdir (struct glfs *fs, const char *path)
goto out;
}
retry:
- ret = glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
+ ret = priv_glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
ESTALE_RETRY (ret, errno, reval, &loc, retry);
@@ -3309,7 +3309,7 @@ pub_glfs_realpath (struct glfs *fs, const char *path, char *resolved_path)
goto out;
}
retry:
- ret = glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
+ ret = priv_glfs_resolve (fs, subvol, path, &loc, &iatt, reval);
ESTALE_RETRY (ret, errno, reval, &loc, retry);
diff --git a/api/src/glfs-internal.h b/api/src/glfs-internal.h
index cb17669fd82..25571f7f11c 100644
--- a/api/src/glfs-internal.h
+++ b/api/src/glfs-internal.h
@@ -138,8 +138,8 @@ struct glfs_object {
int glfs_mgmt_init (struct glfs *fs);
void priv_glfs_init_done (struct glfs *fs, int ret);
int glfs_process_volfp (struct glfs *fs, FILE *fp);
-int glfs_resolve (struct glfs *fs, xlator_t *subvol, const char *path, loc_t *loc,
- struct iatt *iatt, int reval);
+int priv_glfs_resolve (struct glfs *fs, xlator_t *subvol, const char *path,
+ loc_t *loc, struct iatt *iatt, int reval);
int glfs_lresolve (struct glfs *fs, xlator_t *subvol, const char *path, loc_t *loc,
struct iatt *iatt, int reval);
fd_t *glfs_resolve_fd (struct glfs *fs, xlator_t *subvol, struct glfs_fd *glfd);
diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c
index 3b76487cd25..efc08cde741 100644
--- a/api/src/glfs-resolve.c
+++ b/api/src/glfs-resolve.c
@@ -520,7 +520,7 @@ glfs_resolve_path (struct glfs *fs, xlator_t *subvol, const char *origpath,
int
-glfs_resolve (struct glfs *fs, xlator_t *subvol, const char *origpath,
+priv_glfs_resolve (struct glfs *fs, xlator_t *subvol, const char *origpath,
loc_t *loc, struct iatt *iatt, int reval)
{
int ret = -1;
@@ -529,7 +529,7 @@ glfs_resolve (struct glfs *fs, xlator_t *subvol, const char *origpath,
return ret;
}
-
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_resolve, 3.7.0);
int
glfs_lresolve (struct glfs *fs, xlator_t *subvol, const char *origpath,