17b94a
From a65982755b31fb548ff7a997ee754360a516da94 Mon Sep 17 00:00:00 2001
17b94a
From: Amar Tumballi <amarts@redhat.com>
17b94a
Date: Fri, 14 Jun 2019 13:58:25 +0530
17b94a
Subject: [PATCH 187/192] gfapi: statedump_path() add proper version number
17b94a
17b94a
An API should have the proper version number, and 'future' version
17b94a
number is just a place holder. One shouldn't be using it in the
17b94a
release versions.
17b94a
17b94a
With the previous backport of the patch, the version remained same
17b94a
as that of 'master' branch, which is future, but as it is an API,
17b94a
it needed a fixed version number. With this patch, corrected the same.
17b94a
17b94a
Label: DOWNSTREAM_ONLY
17b94a
17b94a
> In upstream, this is corrected by a backport to the stable version, 6.4
17b94a
> URL: https://review.gluster.org/22864
17b94a
17b94a
BUG: 1720461
17b94a
Change-Id: I939850689d47d4f240c9d43f6be1a11de29c4760
17b94a
Signed-off-by: Amar Tumballi <amarts@redhat.com>
17b94a
Reviewed-on: https://code.engineering.redhat.com/gerrit/173475
17b94a
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
17b94a
Tested-by: RHGS Build Bot <nigelb@redhat.com>
17b94a
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
17b94a
---
17b94a
 api/examples/glfsxmp.c | 5 +++++
17b94a
 api/src/gfapi.aliases  | 2 +-
17b94a
 api/src/gfapi.map      | 2 +-
17b94a
 api/src/glfs.c         | 2 +-
17b94a
 api/src/glfs.h         | 2 +-
17b94a
 5 files changed, 9 insertions(+), 4 deletions(-)
17b94a
17b94a
diff --git a/api/examples/glfsxmp.c b/api/examples/glfsxmp.c
17b94a
index 9d96eea..33f44df 100644
17b94a
--- a/api/examples/glfsxmp.c
17b94a
+++ b/api/examples/glfsxmp.c
17b94a
@@ -1573,6 +1573,11 @@ main(int argc, char *argv[])
17b94a
 
17b94a
     ret = glfs_set_logging(fs2, "/dev/stderr", 7);
17b94a
 
17b94a
+    ret = glfs_set_statedump_path(fs2, "/tmp");
17b94a
+    if (ret) {
17b94a
+        fprintf(stderr, "glfs_set_statedump_path: %s\n", strerror(errno));
17b94a
+    }
17b94a
+
17b94a
     ret = glfs_init(fs2);
17b94a
 
17b94a
     fprintf(stderr, "glfs_init: returned %d\n", ret);
17b94a
diff --git a/api/src/gfapi.aliases b/api/src/gfapi.aliases
17b94a
index 8fdf734..692ae13 100644
17b94a
--- a/api/src/gfapi.aliases
17b94a
+++ b/api/src/gfapi.aliases
17b94a
@@ -196,4 +196,4 @@ _pub_glfs_copy_file_range _glfs_copy_file_range$GFAPI_6.0
17b94a
 _pub_glfs_fsetattr _glfs_fsetattr$GFAPI_6.0
17b94a
 _pub_glfs_setattr _glfs_setattr$GFAPI_6.0
17b94a
 
17b94a
-_pub_glfs_set_statedump_path _glfs_set_statedump_path@GFAPI_future
17b94a
+_pub_glfs_set_statedump_path _glfs_set_statedump_path@GFAPI_6.4
17b94a
diff --git a/api/src/gfapi.map b/api/src/gfapi.map
17b94a
index cf118e8..df65837 100644
17b94a
--- a/api/src/gfapi.map
17b94a
+++ b/api/src/gfapi.map
17b94a
@@ -272,7 +272,7 @@ GFAPI_PRIVATE_6.1 {
17b94a
 		glfs_setfspid;
17b94a
 } GFAPI_6.0;
17b94a
 
17b94a
-GFAPI_future {
17b94a
+GFAPI_6.4 {
17b94a
 	global:
17b94a
 		glfs_set_statedump_path;
17b94a
 } GFAPI_PRIVATE_6.1;
17b94a
diff --git a/api/src/glfs.c b/api/src/glfs.c
17b94a
index ba513e6..6bbb620 100644
17b94a
--- a/api/src/glfs.c
17b94a
+++ b/api/src/glfs.c
17b94a
@@ -1800,4 +1800,4 @@ invalid_fs:
17b94a
     return -1;
17b94a
 }
17b94a
 
17b94a
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_set_statedump_path, future);
17b94a
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_set_statedump_path, 6.4);
17b94a
diff --git a/api/src/glfs.h b/api/src/glfs.h
17b94a
index a6c12e1..08b6ca0 100644
17b94a
--- a/api/src/glfs.h
17b94a
+++ b/api/src/glfs.h
17b94a
@@ -1479,7 +1479,7 @@ glfs_setattr(struct glfs *fs, const char *path, struct glfs_stat *stat,
17b94a
 
17b94a
 int
17b94a
 glfs_set_statedump_path(struct glfs *fs, const char *path) __THROW
17b94a
-    GFAPI_PUBLIC(glfs_set_statedump_path, future);
17b94a
+    GFAPI_PUBLIC(glfs_set_statedump_path, 6.4);
17b94a
 
17b94a
 __END_DECLS
17b94a
 #endif /* !_GLFS_H */
17b94a
-- 
17b94a
1.8.3.1
17b94a