summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiffin Tony Thottan <jthottan@redhat.com>2016-06-10 18:23:43 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-06-10 14:09:32 -0700
commit2775dc64101ed37c8d9809bf9852dbf0746ee2b6 (patch)
tree99aa09e79384cd5f8ff8f5a50667f6aa2f9f1f9d
parent3474aa85e399a92d3ee9159a2d066d4bd73611a0 (diff)
libgfapi/upcall : prepend "glfs_" to callback_arg, callback_inode_arg
Change-Id: I371525775db4f6a4d69beb94baaa53d17b16fb41 BUG: 1344714 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/14702 CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Jeff Darcy <jdarcy@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r--api/src/glfs-handleops.c12
-rw-r--r--api/src/glfs-handles.h12
-rw-r--r--api/src/glfs-internal.h2
-rw-r--r--tests/basic/gfapi/bug1283983.c4
-rw-r--r--tests/basic/gfapi/bug1291259.c6
-rw-r--r--tests/basic/gfapi/upcall-cache-invalidate.c4
6 files changed, 20 insertions, 20 deletions
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c
index 9e41fccd28e..b9da2cc0993 100644
--- a/api/src/glfs-handleops.c
+++ b/api/src/glfs-handleops.c
@@ -1866,7 +1866,7 @@ invalid_fs:
int
glfs_h_poll_cache_invalidation (struct glfs *fs,
- struct callback_arg *up_arg,
+ struct glfs_callback_arg *up_arg,
struct gf_upcall *upcall_data)
{
int ret = -1;
@@ -1874,7 +1874,7 @@ glfs_h_poll_cache_invalidation (struct glfs *fs,
struct glfs_object *oldp_object = NULL;
struct glfs_object *object = NULL;
struct gf_upcall_cache_invalidation *ca_data = NULL;
- struct callback_inode_arg *up_inode_arg = NULL;
+ struct glfs_callback_inode_arg *up_inode_arg = NULL;
ca_data = upcall_data->data;
GF_VALIDATE_OR_GOTO ("glfs_h_poll_cache_invalidation",
@@ -1899,7 +1899,7 @@ glfs_h_poll_cache_invalidation (struct glfs *fs,
goto out;
}
- up_inode_arg = GF_CALLOC (1, sizeof (struct callback_inode_arg),
+ up_inode_arg = GF_CALLOC (1, sizeof (struct glfs_callback_inode_arg),
glfs_mt_upcall_entry_t);
GF_VALIDATE_OR_GOTO ("glfs_h_poll_cache_invalidation",
up_inode_arg, out);
@@ -1975,7 +1975,7 @@ out:
* This API is used to poll for upcall events stored in the
* upcall list. Current users of this API is NFS-Ganesha.
* Incase of any event received, it will be mapped appropriately
- * into 'callback_arg' along with the handle object to be passed
+ * into 'glfs_callback_arg' along with the handle object to be passed
* to NFS-Ganesha.
*
* On success, applications need to check for 'reason' to decide
@@ -1983,7 +1983,7 @@ out:
*
* Current supported upcall_events -
* GFAPI_INODE_INVALIDATE -
- * 'arg - callback_inode_arg
+ * 'arg - glfs_callback_inode_arg
*
* After processing the event, applications need to free 'event_arg'.
*
@@ -1995,7 +1995,7 @@ out:
* 'fs' & ctx structures cannot be freed while in this routine.
*/
int
-pub_glfs_h_poll_upcall (struct glfs *fs, struct callback_arg *up_arg)
+pub_glfs_h_poll_upcall (struct glfs *fs, struct glfs_callback_arg *up_arg)
{
upcall_entry *u_list = NULL;
upcall_entry *tmp = NULL;
diff --git a/api/src/glfs-handles.h b/api/src/glfs-handles.h
index 6446cc30c7d..557934503d2 100644
--- a/api/src/glfs-handles.h
+++ b/api/src/glfs-handles.h
@@ -110,7 +110,7 @@ typedef struct glfs_object glfs_object_t;
*
* Currently supported upcall_events -
* GFAPI_INODE_INVALIDATE -
- * 'event_arg' - callback_inode_arg
+ * 'event_arg' - glfs_callback_inode_arg
*
* After processing the event, applications need to free 'event_arg'.
*
@@ -118,7 +118,7 @@ typedef struct glfs_object glfs_object_t;
* before calling glfs_fini(..). Hence making an assumption that
* 'fs' & ctx structures cannot be freed while in this routine.
*/
-struct callback_arg {
+struct glfs_callback_arg {
struct glfs *fs; /* glfs object */
int reason; /* Upcall event type */
void *event_arg; /* changes based in the event type */
@@ -128,7 +128,7 @@ struct callback_arg {
* After processing upcall event, they need to free "object" , "p_object",
* "oldp_object" using glfs_h_close(..).
*/
-struct callback_inode_arg {
+struct glfs_callback_inode_arg {
struct glfs_object *object; /* Object which need to be acted upon */
int flags; /* Cache UPDATE/INVALIDATE flags */
struct stat buf; /* Latest stat of this entry */
@@ -144,7 +144,7 @@ struct callback_inode_arg {
* dir handle */
};
-/* reason list in callback_arg */
+/* reason list in glfs_callback_arg */
enum gfapi_callback_type {
GFAPI_CBK_EVENT_NULL,
GFAPI_INODE_INVALIDATE, /* invalidate cache entry */
@@ -273,7 +273,7 @@ glfs_h_access (struct glfs *fs, struct glfs_object *object, int mask) __THROW
This API is used to poll for upcall events stored in the
upcall list. Current users of this API is NFS-Ganesha.
Incase of any event received, it will be mapped appropriately
- into 'callback_arg' along with the handle('glfs_object') to be
+ into 'glfs_callback_arg' along with the handle('glfs_object') to be
passed to NFS-Ganesha.
In case of success, applications need to check the value of
@@ -297,7 +297,7 @@ glfs_h_access (struct glfs *fs, struct glfs_object *object, int mask) __THROW
*/
int
-glfs_h_poll_upcall (struct glfs *fs, struct callback_arg *cbk) __THROW
+glfs_h_poll_upcall (struct glfs *fs, struct glfs_callback_arg *cbk) __THROW
GFAPI_PUBLIC(glfs_h_poll_upcall, 3.7.0);
int
diff --git a/api/src/glfs-internal.h b/api/src/glfs-internal.h
index c86071e3122..a6c2709961d 100644
--- a/api/src/glfs-internal.h
+++ b/api/src/glfs-internal.h
@@ -414,7 +414,7 @@ int glfs_get_upcall_cache_invalidation (struct gf_upcall *to_up_data,
struct gf_upcall *from_up_data);
int
glfs_h_poll_cache_invalidation (struct glfs *fs,
- struct callback_arg *up_arg,
+ struct glfs_callback_arg *up_arg,
struct gf_upcall *upcall_data);
ssize_t
diff --git a/tests/basic/gfapi/bug1283983.c b/tests/basic/gfapi/bug1283983.c
index 76db8d5ca09..ba0f954cb17 100644
--- a/tests/basic/gfapi/bug1283983.c
+++ b/tests/basic/gfapi/bug1283983.c
@@ -38,11 +38,11 @@ main (int argc, char *argv[])
char *filename = "/a1";
char *filename2 = "/a2";
struct stat sb = {0, };
- struct callback_arg cbk;
+ struct glfs_callback_arg cbk;
char *logfile = NULL;
char *volname = NULL;
int cnt = 1;
- struct callback_inode_arg *in_arg = NULL;
+ struct glfs_callback_inode_arg *in_arg = NULL;
struct glfs_object *root = NULL, *leaf = NULL;
cbk.reason = 0;
diff --git a/tests/basic/gfapi/bug1291259.c b/tests/basic/gfapi/bug1291259.c
index 35f39938cb3..333da20f557 100644
--- a/tests/basic/gfapi/bug1291259.c
+++ b/tests/basic/gfapi/bug1291259.c
@@ -41,12 +41,12 @@ main (int argc, char *argv[])
char *filename = "/a1";
char *filename2 = "/a2";
struct stat sb = {0, };
- struct callback_arg cbk;
+ struct glfs_callback_arg cbk;
char *logfile = NULL;
char *volname = NULL;
int cnt = 1;
int upcall_received = 0;
- struct callback_inode_arg *in_arg = NULL;
+ struct glfs_callback_inode_arg *in_arg = NULL;
struct glfs_object *root = NULL, *leaf = NULL;
unsigned char globjhdl[GFAPI_HANDLE_LENGTH];
unsigned char globjhdl2[GFAPI_HANDLE_LENGTH];
@@ -124,7 +124,7 @@ main (int argc, char *argv[])
if (cbk.reason == GFAPI_INODE_INVALIDATE) {
fprintf (stderr, "Upcall received(%d)\n",
cbk.reason);
- in_arg = (struct callback_inode_arg *)(cbk.event_arg);
+ in_arg = (struct glfs_callback_inode_arg *)(cbk.event_arg);
ret = glfs_h_extract_handle (root,
globjhdl+GLAPI_UUID_LENGTH,
diff --git a/tests/basic/gfapi/upcall-cache-invalidate.c b/tests/basic/gfapi/upcall-cache-invalidate.c
index cc2e6a0fe33..deec691bf8e 100644
--- a/tests/basic/gfapi/upcall-cache-invalidate.c
+++ b/tests/basic/gfapi/upcall-cache-invalidate.c
@@ -38,10 +38,10 @@ main (int argc, char *argv[])
char *writebuf = NULL;
char *vol_id = NULL;
unsigned int cnt = 1;
- struct callback_arg cbk;
+ struct glfs_callback_arg cbk;
char *logfile = NULL;
char *volname = NULL;
- struct callback_inode_arg *in_arg = NULL;
+ struct glfs_callback_inode_arg *in_arg = NULL;
cbk.reason = 0;