summaryrefslogtreecommitdiffstats
path: root/xlators/features/snapview-client/src
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2015-07-30 16:37:45 +0530
committerNiels de Vos <ndevos@redhat.com>2015-08-25 11:36:20 -0700
commitddae88755280da5747d8600025159e0257e63abe (patch)
treeac5236a5ced7425ebf12d92cba6e071e3b1c1386 /xlators/features/snapview-client/src
parent8914210f25a976b9a1973fbf8c2ced1b307e807f (diff)
snapshot: Make fops static for correct resolution of symbols
Few of the snapshot fops (like 'svc_lookup') may not get resolved while using dynamic loading as there could be other libraries(like libntirpc) with same routine names. Making them static to resolve the same. This is backport of the below fix - http://review.gluster.org/#/c/11805/ Change-Id: I6577bf3705864f5583425c94427b4e1025a59bcd BUG: 1256485 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/11805 Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/12008 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/features/snapview-client/src')
-rw-r--r--xlators/features/snapview-client/src/snapview-client.c74
1 files changed, 38 insertions, 36 deletions
diff --git a/xlators/features/snapview-client/src/snapview-client.c b/xlators/features/snapview-client/src/snapview-client.c
index f1b3899194a..b3f1a92f34c 100644
--- a/xlators/features/snapview-client/src/snapview-client.c
+++ b/xlators/features/snapview-client/src/snapview-client.c
@@ -263,7 +263,7 @@ out:
}
-int32_t
+static int32_t
svc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, inode_t *inode,
struct iatt *buf, dict_t *xdata, struct iatt *postparent)
@@ -378,7 +378,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc,
dict_t *xdata)
{
@@ -498,7 +498,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc,
dict_t *xdata)
{
@@ -561,7 +561,7 @@ out:
handled? i.e just based on inode type decide where the call should
be sent and in the call back update the contexts.
*/
-int32_t
+static int32_t
svc_stat (call_frame_t *frame, xlator_t *this, loc_t *loc,
dict_t *xdata)
{
@@ -591,7 +591,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
int32_t ret = -1;
@@ -620,7 +620,7 @@ out:
return ret;
}
-int32_t
+static int32_t
svc_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, fd_t *fd, dict_t *xdata)
{
@@ -687,7 +687,7 @@ out:
will not be any corresponding fd opened on svs and
svc has to do things that open-behind is doing.
*/
-int32_t
+static int32_t
svc_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd,
dict_t *xdata)
{
@@ -733,7 +733,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
struct iatt *stbuf, int32_t valid, dict_t *xdata)
{
@@ -777,6 +777,7 @@ out:
return 0;
}
+/* XXX: This function is currently not used. Mark it 'static' when required */
int32_t
svc_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iatt *stbuf,
int32_t valid, dict_t *xdata)
@@ -820,7 +821,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, const char *name,
dict_t *xdata)
{
@@ -900,6 +901,7 @@ out:
return 0;
}
+/* XXX: This function is currently not used. Mark it 'static' when required */
int32_t
svc_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, const char *name,
dict_t *xdata)
@@ -931,7 +933,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_setxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *dict,
int32_t flags, dict_t *xdata)
{
@@ -976,7 +978,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_fsetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *dict,
int32_t flags, dict_t *xdata)
{
@@ -1020,7 +1022,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags,
dict_t *xdata)
{
@@ -1064,7 +1066,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, inode_t *inode,
struct iatt *buf, struct iatt *preparent,
@@ -1089,7 +1091,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_mkdir (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
mode_t umask, dict_t *xdata)
{
@@ -1136,7 +1138,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, inode_t *inode,
struct iatt *buf, struct iatt *preparent,
@@ -1160,7 +1162,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
dev_t rdev, mode_t umask, dict_t *xdata)
{
@@ -1211,7 +1213,7 @@ out:
a virtual inode, then unwind the call back with EROFS. Otherwise simply
STACK_WIND the call to the first child of svc xlator.
*/
-int32_t
+static int32_t
svc_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
fd_t *fd, dict_t *xdata)
{
@@ -1256,7 +1258,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, fd_t *fd, inode_t *inode,
struct iatt *stbuf, struct iatt *preparent,
@@ -1281,7 +1283,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_create (call_frame_t *frame, xlator_t *this,
loc_t *loc, int32_t flags, mode_t mode,
mode_t umask, fd_t *fd, dict_t *xdata)
@@ -1330,7 +1332,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, inode_t *inode,
struct iatt *buf, struct iatt *preparent,
@@ -1355,7 +1357,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_symlink (call_frame_t *frame, xlator_t *this, const char *linkpath,
loc_t *loc, mode_t umask, dict_t *xdata)
{
@@ -1402,7 +1404,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags,
dict_t *xdata)
{
@@ -1445,7 +1447,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
off_t offset, uint32_t flags, dict_t *xdata)
{
@@ -1476,7 +1478,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_readlink (call_frame_t *frame, xlator_t *this,
loc_t *loc, size_t size, dict_t *xdata)
{
@@ -1507,7 +1509,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask,
dict_t *xdata)
{
@@ -1538,7 +1540,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd,
size_t size, off_t off,
dict_t *xdata)
@@ -1614,7 +1616,7 @@ out:
* windows.
*/
-int32_t
+static int32_t
svc_readdirp_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, inode_t *inode,
struct iatt *buf, dict_t *xdata,
@@ -1787,7 +1789,7 @@ out:
return unwind;
}
-int32_t
+static int32_t
svc_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
gf_dirent_t *entries, dict_t *xdata)
@@ -1847,7 +1849,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_readdirp (call_frame_t *frame, xlator_t *this, fd_t *fd,
size_t size, off_t off,
dict_t *xdata)
@@ -1923,7 +1925,7 @@ out:
/* Renaming the entries from or to snapshots is not allowed as the snapshots
are read-only.
*/
-int32_t
+static int32_t
svc_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
loc_t *newloc, dict_t *xdata)
{
@@ -2001,7 +2003,7 @@ out:
will be equivalent of creating hardlinks across different filesystems.
And so is vise versa.
*/
-int32_t
+static int32_t
svc_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc,
dict_t *xdata)
{
@@ -2049,7 +2051,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_removexattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
const char *name, dict_t *xdata)
{
@@ -2094,7 +2096,7 @@ out:
return 0;
}
-int
+static int
svc_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int datasync,
dict_t *xdata)
{
@@ -2138,7 +2140,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_flush (call_frame_t *frame, xlator_t *this,
fd_t *fd, dict_t *xdata)
{
@@ -2168,7 +2170,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_releasedir (xlator_t *this, fd_t *fd)
{
svc_fd_t *sfd = NULL;
@@ -2191,7 +2193,7 @@ out:
return 0;
}
-int32_t
+static int32_t
svc_forget (xlator_t *this, inode_t *inode)
{
int ret = -1;