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