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