14f8ab
From e0ee7d755bc90c1f829e4ec3b0d5dfd9f9d480b9 Mon Sep 17 00:00:00 2001
14f8ab
From: Tamar Shacked <tshacked@redhat.com>
14f8ab
Date: Mon, 26 Jul 2021 16:59:28 +0300
14f8ab
Subject: rhel-9.0-beta build: fixing gcc-10 and LTO errors
14f8ab
14f8ab
libgfapi symbol versions break LTO in Fedora rawhide/f33
14f8ab
Upstream:
14f8ab
> Reviewed-on: https://review.gluster.org/#/c/glusterfs/+/24666/
14f8ab
> fixes: #1352
14f8ab
> Change-Id: I05fda580afacfff1bfc07be810dd1afc08a92fb8
14f8ab
> Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
14f8ab
14f8ab
Duplicate defns of cli_default_conn_timeout and cli_ten_minutes_timeout
14f8ab
Upstream:
14f8ab
> Reviewed-on: https://review.gluster.org/#/c/glusterfs/+/23956/
14f8ab
> Change-Id: I54ea485736a4910254eeb21222ad263721cdef3c
14f8ab
> Fixes: bz#1193929
14f8ab
> Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
14f8ab
14f8ab
BUG: 1939340
14f8ab
14f8ab
Signed-off-by: Tamar Shacked <tshacked@redhat.com>
14f8ab
Change-Id: If40e4733d12713d2821653cdbce7b6e931f12140
14f8ab
---
14f8ab
 api/src/glfs-fops.c         | 322 ++++++++++++------------------------
14f8ab
 api/src/glfs-handleops.c    |  99 ++++-------
14f8ab
 api/src/glfs-internal.h     |  27 ++-
14f8ab
 api/src/glfs-mgmt.c         |   3 +-
14f8ab
 api/src/glfs-resolve.c      |  14 +-
14f8ab
 api/src/glfs.c              |  99 +++++------
14f8ab
 cli/src/cli-cmd-global.c    |   1 -
14f8ab
 cli/src/cli-cmd-misc.c      |   4 -
14f8ab
 cli/src/cli-cmd-peer.c      |   4 -
14f8ab
 cli/src/cli-cmd-snapshot.c  |   2 -
14f8ab
 cli/src/cli-cmd-system.c    |   4 -
14f8ab
 cli/src/cli-cmd-volume.c    |   4 -
14f8ab
 cli/src/cli-quotad-client.c |   3 -
14f8ab
 cli/src/cli-rpc-ops.c       |   5 +-
14f8ab
 cli/src/cli.c               |   4 +
14f8ab
 cli/src/cli.h               |  10 +-
14f8ab
 16 files changed, 223 insertions(+), 382 deletions(-)
14f8ab
14f8ab
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
14f8ab
index 6dc3b66c8..e772aa77a 100644
14f8ab
--- a/api/src/glfs-fops.c
14f8ab
+++ b/api/src/glfs-fops.c
14f8ab
@@ -292,6 +292,7 @@ glfs_iatt_to_statx(struct glfs *fs, const struct iatt *iatt,
14f8ab
     statx->glfs_st_attributes_mask = 0;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_iatt_from_statx, 6.0)
14f8ab
 void
14f8ab
 priv_glfs_iatt_from_statx(struct iatt *iatt, const struct glfs_stat *statx)
14f8ab
 {
14f8ab
@@ -371,7 +372,6 @@ priv_glfs_iatt_from_statx(struct iatt *iatt, const struct glfs_stat *statx)
14f8ab
     iatt->ia_attributes = statx->glfs_st_attributes;
14f8ab
     iatt->ia_attributes_mask = statx->glfs_st_attributes_mask;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_iatt_from_statx, 6.0);
14f8ab
 
14f8ab
 void
14f8ab
 glfsflags_from_gfapiflags(struct glfs_stat *stat, int *glvalid)
14f8ab
@@ -415,6 +415,7 @@ glfs_loc_unlink(loc_t *loc)
14f8ab
     return 0;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_open, 3.4.0)
14f8ab
 struct glfs_fd *
14f8ab
 pub_glfs_open(struct glfs *fs, const char *path, int flags)
14f8ab
 {
14f8ab
@@ -509,8 +510,7 @@ invalid_fs:
14f8ab
     return glfd;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_open, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_close, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_close(struct glfs_fd *glfd)
14f8ab
 {
14f8ab
@@ -565,8 +565,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_close, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lstat, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_lstat(struct glfs *fs, const char *path, struct stat *stat)
14f8ab
 {
14f8ab
@@ -607,8 +606,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lstat, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_stat, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_stat(struct glfs *fs, const char *path, struct stat *stat)
14f8ab
 {
14f8ab
@@ -649,8 +647,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_stat, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_statx, 6.0)
14f8ab
 int
14f8ab
 priv_glfs_statx(struct glfs *fs, const char *path, const unsigned int mask,
14f8ab
                 struct glfs_stat *statxbuf)
14f8ab
@@ -704,8 +701,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_statx, 6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fstat, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_fstat(struct glfs_fd *glfd, struct stat *stat)
14f8ab
 {
14f8ab
@@ -754,8 +750,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fstat, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_creat, 3.4.0)
14f8ab
 struct glfs_fd *
14f8ab
 pub_glfs_creat(struct glfs *fs, const char *path, int flags, mode_t mode)
14f8ab
 {
14f8ab
@@ -902,8 +897,6 @@ invalid_fs:
14f8ab
     return glfd;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_creat, 3.4.0);
14f8ab
-
14f8ab
 #ifdef HAVE_SEEK_HOLE
14f8ab
 static int
14f8ab
 glfs_seek(struct glfs_fd *glfd, off_t offset, int whence)
14f8ab
@@ -957,6 +950,7 @@ out:
14f8ab
 }
14f8ab
 #endif
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lseek, 3.4.0)
14f8ab
 off_t
14f8ab
 pub_glfs_lseek(struct glfs_fd *glfd, off_t offset, int whence)
14f8ab
 {
14f8ab
@@ -1012,8 +1006,6 @@ invalid_fs:
14f8ab
     return -1;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lseek, 3.4.0);
14f8ab
-
14f8ab
 static ssize_t
14f8ab
 glfs_preadv_common(struct glfs_fd *glfd, const struct iovec *iovec, int iovcnt,
14f8ab
                    off_t offset, int flags, struct glfs_stat *poststat)
14f8ab
@@ -1091,6 +1083,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_preadv, 3.4.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_preadv(struct glfs_fd *glfd, const struct iovec *iovec, int iovcnt,
14f8ab
                 off_t offset, int flags)
14f8ab
@@ -1098,8 +1091,7 @@ pub_glfs_preadv(struct glfs_fd *glfd, const struct iovec *iovec, int iovcnt,
14f8ab
     return glfs_preadv_common(glfd, iovec, iovcnt, offset, flags, NULL);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_preadv, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_read, 3.4.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_read(struct glfs_fd *glfd, void *buf, size_t count, int flags)
14f8ab
 {
14f8ab
@@ -1116,8 +1108,7 @@ pub_glfs_read(struct glfs_fd *glfd, void *buf, size_t count, int flags)
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_read, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_pread34, glfs_pread, 3.4.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_pread34(struct glfs_fd *glfd, void *buf, size_t count, off_t offset,
14f8ab
                  int flags)
14f8ab
@@ -1135,8 +1126,7 @@ pub_glfs_pread34(struct glfs_fd *glfd, void *buf, size_t count, off_t offset,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_pread34, glfs_pread, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_pread, 6.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_pread(struct glfs_fd *glfd, void *buf, size_t count, off_t offset,
14f8ab
                int flags, struct glfs_stat *poststat)
14f8ab
@@ -1154,8 +1144,7 @@ pub_glfs_pread(struct glfs_fd *glfd, void *buf, size_t count, off_t offset,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_pread, 6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_readv, 3.4.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_readv(struct glfs_fd *glfd, const struct iovec *iov, int count,
14f8ab
                int flags)
14f8ab
@@ -1167,8 +1156,6 @@ pub_glfs_readv(struct glfs_fd *glfd, const struct iovec *iov, int count,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_readv, 3.4.0);
14f8ab
-
14f8ab
 struct glfs_io {
14f8ab
     struct glfs_fd *glfd;
14f8ab
     int op;
14f8ab
@@ -1370,6 +1357,7 @@ invalid_fs:
14f8ab
     return -1;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_preadv_async34, glfs_preadv_async, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_preadv_async34(struct glfs_fd *glfd, const struct iovec *iovec,
14f8ab
                         int count, off_t offset, int flags, glfs_io_cbk34 fn,
14f8ab
@@ -1379,8 +1367,7 @@ pub_glfs_preadv_async34(struct glfs_fd *glfd, const struct iovec *iovec,
14f8ab
                                     (void *)fn, data);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_preadv_async34, glfs_preadv_async, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_preadv_async, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_preadv_async(struct glfs_fd *glfd, const struct iovec *iovec,
14f8ab
                       int count, off_t offset, int flags, glfs_io_cbk fn,
14f8ab
@@ -1390,8 +1377,7 @@ pub_glfs_preadv_async(struct glfs_fd *glfd, const struct iovec *iovec,
14f8ab
                                     _gf_false, fn, data);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_preadv_async, 6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_read_async34, glfs_read_async, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_read_async34(struct glfs_fd *glfd, void *buf, size_t count, int flags,
14f8ab
                       glfs_io_cbk34 fn, void *data)
14f8ab
@@ -1410,8 +1396,7 @@ pub_glfs_read_async34(struct glfs_fd *glfd, void *buf, size_t count, int flags,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_read_async34, glfs_read_async, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_read_async, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_read_async(struct glfs_fd *glfd, void *buf, size_t count, int flags,
14f8ab
                     glfs_io_cbk fn, void *data)
14f8ab
@@ -1430,8 +1415,7 @@ pub_glfs_read_async(struct glfs_fd *glfd, void *buf, size_t count, int flags,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_read_async, 6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_pread_async34, glfs_pread_async, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_pread_async34(struct glfs_fd *glfd, void *buf, size_t count,
14f8ab
                        off_t offset, int flags, glfs_io_cbk34 fn, void *data)
14f8ab
@@ -1450,8 +1434,7 @@ pub_glfs_pread_async34(struct glfs_fd *glfd, void *buf, size_t count,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_pread_async34, glfs_pread_async, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_pread_async, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_pread_async(struct glfs_fd *glfd, void *buf, size_t count,
14f8ab
                      off_t offset, int flags, glfs_io_cbk fn, void *data)
14f8ab
@@ -1470,8 +1453,7 @@ pub_glfs_pread_async(struct glfs_fd *glfd, void *buf, size_t count,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_pread_async, 6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_readv_async34, glfs_readv_async, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_readv_async34(struct glfs_fd *glfd, const struct iovec *iov, int count,
14f8ab
                        int flags, glfs_io_cbk34 fn, void *data)
14f8ab
@@ -1483,8 +1465,7 @@ pub_glfs_readv_async34(struct glfs_fd *glfd, const struct iovec *iov, int count,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_readv_async34, glfs_readv_async, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_readv_async, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_readv_async(struct glfs_fd *glfd, const struct iovec *iov, int count,
14f8ab
                      int flags, glfs_io_cbk fn, void *data)
14f8ab
@@ -1496,8 +1477,6 @@ pub_glfs_readv_async(struct glfs_fd *glfd, const struct iovec *iov, int count,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_readv_async, 6.0);
14f8ab
-
14f8ab
 static ssize_t
14f8ab
 glfs_pwritev_common(struct glfs_fd *glfd, const struct iovec *iovec, int iovcnt,
14f8ab
                     off_t offset, int flags, struct glfs_stat *prestat,
14f8ab
@@ -1591,6 +1570,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_copy_file_range, 6.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_copy_file_range(struct glfs_fd *glfd_in, off64_t *off_in,
14f8ab
                          struct glfs_fd *glfd_out, off64_t *off_out, size_t len,
14f8ab
@@ -1744,8 +1724,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_copy_file_range, 6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_pwritev, 3.4.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_pwritev(struct glfs_fd *glfd, const struct iovec *iovec, int iovcnt,
14f8ab
                  off_t offset, int flags)
14f8ab
@@ -1753,8 +1732,7 @@ pub_glfs_pwritev(struct glfs_fd *glfd, const struct iovec *iovec, int iovcnt,
14f8ab
     return glfs_pwritev_common(glfd, iovec, iovcnt, offset, flags, NULL, NULL);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_pwritev, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_write, 3.4.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_write(struct glfs_fd *glfd, const void *buf, size_t count, int flags)
14f8ab
 {
14f8ab
@@ -1771,8 +1749,7 @@ pub_glfs_write(struct glfs_fd *glfd, const void *buf, size_t count, int flags)
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_write, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_writev, 3.4.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_writev(struct glfs_fd *glfd, const struct iovec *iov, int count,
14f8ab
                 int flags)
14f8ab
@@ -1784,8 +1761,7 @@ pub_glfs_writev(struct glfs_fd *glfd, const struct iovec *iov, int count,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_writev, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_pwrite34, glfs_pwrite, 3.4.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_pwrite34(struct glfs_fd *glfd, const void *buf, size_t count,
14f8ab
                   off_t offset, int flags)
14f8ab
@@ -1803,8 +1779,7 @@ pub_glfs_pwrite34(struct glfs_fd *glfd, const void *buf, size_t count,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_pwrite34, glfs_pwrite, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_pwrite, 6.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_pwrite(struct glfs_fd *glfd, const void *buf, size_t count,
14f8ab
                 off_t offset, int flags, struct glfs_stat *prestat,
14f8ab
@@ -1823,8 +1798,6 @@ pub_glfs_pwrite(struct glfs_fd *glfd, const void *buf, size_t count,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_pwrite, 6.0);
14f8ab
-
14f8ab
 extern glfs_t *
14f8ab
 pub_glfs_from_glfd(glfs_fd_t *);
14f8ab
 
14f8ab
@@ -1943,6 +1916,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_pwritev_async34, glfs_pwritev_async, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_pwritev_async34(struct glfs_fd *glfd, const struct iovec *iovec,
14f8ab
                          int count, off_t offset, int flags, glfs_io_cbk34 fn,
14f8ab
@@ -1952,8 +1926,7 @@ pub_glfs_pwritev_async34(struct glfs_fd *glfd, const struct iovec *iovec,
14f8ab
                                      _gf_true, (void *)fn, data);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_pwritev_async34, glfs_pwritev_async, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_pwritev_async, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_pwritev_async(struct glfs_fd *glfd, const struct iovec *iovec,
14f8ab
                        int count, off_t offset, int flags, glfs_io_cbk fn,
14f8ab
@@ -1963,8 +1936,7 @@ pub_glfs_pwritev_async(struct glfs_fd *glfd, const struct iovec *iovec,
14f8ab
                                      _gf_false, fn, data);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_pwritev_async, 6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_write_async34, glfs_write_async, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_write_async34(struct glfs_fd *glfd, const void *buf, size_t count,
14f8ab
                        int flags, glfs_io_cbk34 fn, void *data)
14f8ab
@@ -1983,8 +1955,7 @@ pub_glfs_write_async34(struct glfs_fd *glfd, const void *buf, size_t count,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_write_async34, glfs_write_async, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_write_async, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_write_async(struct glfs_fd *glfd, const void *buf, size_t count,
14f8ab
                      int flags, glfs_io_cbk fn, void *data)
14f8ab
@@ -2003,8 +1974,7 @@ pub_glfs_write_async(struct glfs_fd *glfd, const void *buf, size_t count,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_write_async, 6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_pwrite_async34, glfs_pwrite_async, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_pwrite_async34(struct glfs_fd *glfd, const void *buf, int count,
14f8ab
                         off_t offset, int flags, glfs_io_cbk34 fn, void *data)
14f8ab
@@ -2023,8 +1993,7 @@ pub_glfs_pwrite_async34(struct glfs_fd *glfd, const void *buf, int count,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_pwrite_async34, glfs_pwrite_async, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_pwrite_async, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_pwrite_async(struct glfs_fd *glfd, const void *buf, int count,
14f8ab
                       off_t offset, int flags, glfs_io_cbk fn, void *data)
14f8ab
@@ -2043,8 +2012,7 @@ pub_glfs_pwrite_async(struct glfs_fd *glfd, const void *buf, int count,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_pwrite_async, 6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_writev_async34, glfs_writev_async, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_writev_async34(struct glfs_fd *glfd, const struct iovec *iov,
14f8ab
                         int count, int flags, glfs_io_cbk34 fn, void *data)
14f8ab
@@ -2056,8 +2024,7 @@ pub_glfs_writev_async34(struct glfs_fd *glfd, const struct iovec *iov,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_writev_async34, glfs_writev_async, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_writev_async, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_writev_async(struct glfs_fd *glfd, const struct iovec *iov, int count,
14f8ab
                       int flags, glfs_io_cbk fn, void *data)
14f8ab
@@ -2069,8 +2036,6 @@ pub_glfs_writev_async(struct glfs_fd *glfd, const struct iovec *iov, int count,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_writev_async, 6.0);
14f8ab
-
14f8ab
 static int
14f8ab
 glfs_fsync_common(struct glfs_fd *glfd, struct glfs_stat *prestat,
14f8ab
                   struct glfs_stat *poststat)
14f8ab
@@ -2135,14 +2100,14 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_fsync34, glfs_fsync, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_fsync34(struct glfs_fd *glfd)
14f8ab
 {
14f8ab
     return glfs_fsync_common(glfd, NULL, NULL);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_fsync34, glfs_fsync, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fsync, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_fsync(struct glfs_fd *glfd, struct glfs_stat *prestat,
14f8ab
                struct glfs_stat *poststat)
14f8ab
@@ -2150,8 +2115,6 @@ pub_glfs_fsync(struct glfs_fd *glfd, struct glfs_stat *prestat,
14f8ab
     return glfs_fsync_common(glfd, prestat, poststat);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fsync, 6.0);
14f8ab
-
14f8ab
 static int
14f8ab
 glfs_fsync_async_cbk(call_frame_t *frame, void *cookie, xlator_t *this,
14f8ab
                      int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
14f8ab
@@ -2232,6 +2195,7 @@ out:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_fsync_async34, glfs_fsync_async, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_fsync_async34(struct glfs_fd *glfd, glfs_io_cbk34 fn, void *data)
14f8ab
 {
14f8ab
@@ -2248,8 +2212,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_fsync_async34, glfs_fsync_async, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fsync_async, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_fsync_async(struct glfs_fd *glfd, glfs_io_cbk fn, void *data)
14f8ab
 {
14f8ab
@@ -2266,8 +2229,6 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fsync_async, 6.0);
14f8ab
-
14f8ab
 static int
14f8ab
 glfs_fdatasync_common(struct glfs_fd *glfd, struct glfs_stat *prestat,
14f8ab
                       struct glfs_stat *poststat)
14f8ab
@@ -2332,14 +2293,14 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_fdatasync34, glfs_fdatasync, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_fdatasync34(struct glfs_fd *glfd)
14f8ab
 {
14f8ab
     return glfs_fdatasync_common(glfd, NULL, NULL);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_fdatasync34, glfs_fdatasync, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fdatasync, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_fdatasync(struct glfs_fd *glfd, struct glfs_stat *prestat,
14f8ab
                    struct glfs_stat *poststat)
14f8ab
@@ -2347,8 +2308,7 @@ pub_glfs_fdatasync(struct glfs_fd *glfd, struct glfs_stat *prestat,
14f8ab
     return glfs_fdatasync_common(glfd, prestat, poststat);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fdatasync, 6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_fdatasync_async34, glfs_fdatasync_async, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_fdatasync_async34(struct glfs_fd *glfd, glfs_io_cbk34 fn, void *data)
14f8ab
 {
14f8ab
@@ -2365,8 +2325,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_fdatasync_async34, glfs_fdatasync_async, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fdatasync_async, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_fdatasync_async(struct glfs_fd *glfd, glfs_io_cbk fn, void *data)
14f8ab
 {
14f8ab
@@ -2383,8 +2342,6 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fdatasync_async, 6.0);
14f8ab
-
14f8ab
 static int
14f8ab
 glfs_ftruncate_common(struct glfs_fd *glfd, off_t offset,
14f8ab
                       struct glfs_stat *prestat, struct glfs_stat *poststat)
14f8ab
@@ -2450,14 +2407,14 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_ftruncate34, glfs_ftruncate, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_ftruncate34(struct glfs_fd *glfd, off_t offset)
14f8ab
 {
14f8ab
     return glfs_ftruncate_common(glfd, offset, NULL, NULL);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_ftruncate34, glfs_ftruncate, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_ftruncate, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_ftruncate(struct glfs_fd *glfd, off_t offset,
14f8ab
                    struct glfs_stat *prestat, struct glfs_stat *poststat)
14f8ab
@@ -2465,8 +2422,7 @@ pub_glfs_ftruncate(struct glfs_fd *glfd, off_t offset,
14f8ab
     return glfs_ftruncate_common(glfd, offset, prestat, poststat);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_ftruncate, 6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_truncate, 3.7.15)
14f8ab
 int
14f8ab
 pub_glfs_truncate(struct glfs *fs, const char *path, off_t length)
14f8ab
 {
14f8ab
@@ -2512,8 +2468,6 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_truncate, 3.7.15);
14f8ab
-
14f8ab
 static int
14f8ab
 glfs_ftruncate_async_cbk(call_frame_t *frame, void *cookie, xlator_t *this,
14f8ab
                          int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
14f8ab
@@ -2606,6 +2560,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_ftruncate_async34, glfs_ftruncate_async, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_ftruncate_async34(struct glfs_fd *glfd, off_t offset, glfs_io_cbk34 fn,
14f8ab
                            void *data)
14f8ab
@@ -2614,8 +2569,7 @@ pub_glfs_ftruncate_async34(struct glfs_fd *glfd, off_t offset, glfs_io_cbk34 fn,
14f8ab
                                        data);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_ftruncate_async34, glfs_ftruncate_async, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_ftruncate_async, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_ftruncate_async(struct glfs_fd *glfd, off_t offset, glfs_io_cbk fn,
14f8ab
                          void *data)
14f8ab
@@ -2623,8 +2577,7 @@ pub_glfs_ftruncate_async(struct glfs_fd *glfd, off_t offset, glfs_io_cbk fn,
14f8ab
     return glfs_ftruncate_async_common(glfd, offset, _gf_false, fn, data);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_ftruncate_async, 6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_access, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_access(struct glfs *fs, const char *path, int mode)
14f8ab
 {
14f8ab
@@ -2670,8 +2623,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_access, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_symlink, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_symlink(struct glfs *fs, const char *data, const char *path)
14f8ab
 {
14f8ab
@@ -2761,8 +2713,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_symlink, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_readlink, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_readlink(struct glfs *fs, const char *path, char *buf, size_t bufsiz)
14f8ab
 {
14f8ab
@@ -2819,8 +2770,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_readlink, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_mknod, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_mknod(struct glfs *fs, const char *path, mode_t mode, dev_t dev)
14f8ab
 {
14f8ab
@@ -2910,8 +2860,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_mknod, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_mkdir, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_mkdir(struct glfs *fs, const char *path, mode_t mode)
14f8ab
 {
14f8ab
@@ -3001,8 +2950,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_mkdir, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_unlink, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_unlink(struct glfs *fs, const char *path)
14f8ab
 {
14f8ab
@@ -3058,8 +3006,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_unlink, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_rmdir, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_rmdir(struct glfs *fs, const char *path)
14f8ab
 {
14f8ab
@@ -3114,8 +3061,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_rmdir, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_rename, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_rename(struct glfs *fs, const char *oldpath, const char *newpath)
14f8ab
 {
14f8ab
@@ -3204,8 +3150,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_rename, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_link, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_link(struct glfs *fs, const char *oldpath, const char *newpath)
14f8ab
 {
14f8ab
@@ -3291,8 +3236,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_link, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_opendir, 3.4.0)
14f8ab
 struct glfs_fd *
14f8ab
 pub_glfs_opendir(struct glfs *fs, const char *path)
14f8ab
 {
14f8ab
@@ -3373,8 +3317,7 @@ invalid_fs:
14f8ab
     return glfd;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_opendir, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_closedir, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_closedir(struct glfs_fd *glfd)
14f8ab
 {
14f8ab
@@ -3395,16 +3338,14 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_closedir, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_telldir, 3.4.0)
14f8ab
 long
14f8ab
 pub_glfs_telldir(struct glfs_fd *fd)
14f8ab
 {
14f8ab
     return fd->offset;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_telldir, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_seekdir, 3.4.0)
14f8ab
 void
14f8ab
 pub_glfs_seekdir(struct glfs_fd *fd, long offset)
14f8ab
 {
14f8ab
@@ -3433,8 +3374,6 @@ pub_glfs_seekdir(struct glfs_fd *fd, long offset)
14f8ab
     */
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_seekdir, 3.4.0);
14f8ab
-
14f8ab
 static int
14f8ab
 glfs_discard_async_cbk(call_frame_t *frame, void *cookie, xlator_t *this,
14f8ab
                        int32_t op_ret, int32_t op_errno,
14f8ab
@@ -3525,6 +3464,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_discard_async35, glfs_discard_async, 3.5.0)
14f8ab
 int
14f8ab
 pub_glfs_discard_async35(struct glfs_fd *glfd, off_t offset, size_t len,
14f8ab
                          glfs_io_cbk34 fn, void *data)
14f8ab
@@ -3533,8 +3473,7 @@ pub_glfs_discard_async35(struct glfs_fd *glfd, off_t offset, size_t len,
14f8ab
                                      data);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_discard_async35, glfs_discard_async, 3.5.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_discard_async, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_discard_async(struct glfs_fd *glfd, off_t offset, size_t len,
14f8ab
                        glfs_io_cbk fn, void *data)
14f8ab
@@ -3542,8 +3481,6 @@ pub_glfs_discard_async(struct glfs_fd *glfd, off_t offset, size_t len,
14f8ab
     return glfs_discard_async_common(glfd, offset, len, _gf_false, fn, data);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_discard_async, 6.0);
14f8ab
-
14f8ab
 static int
14f8ab
 glfs_zerofill_async_cbk(call_frame_t *frame, void *cookie, xlator_t *this,
14f8ab
                         int32_t op_ret, int32_t op_errno,
14f8ab
@@ -3636,6 +3573,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_zerofill_async35, glfs_zerofill_async, 3.5.0)
14f8ab
 int
14f8ab
 pub_glfs_zerofill_async35(struct glfs_fd *glfd, off_t offset, off_t len,
14f8ab
                           glfs_io_cbk34 fn, void *data)
14f8ab
@@ -3644,8 +3582,7 @@ pub_glfs_zerofill_async35(struct glfs_fd *glfd, off_t offset, off_t len,
14f8ab
                                       data);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_zerofill_async35, glfs_zerofill_async, 3.5.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_zerofill_async, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_zerofill_async(struct glfs_fd *glfd, off_t offset, off_t len,
14f8ab
                         glfs_io_cbk fn, void *data)
14f8ab
@@ -3653,8 +3590,6 @@ pub_glfs_zerofill_async(struct glfs_fd *glfd, off_t offset, off_t len,
14f8ab
     return glfs_zerofill_async_common(glfd, offset, len, _gf_false, fn, data);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_zerofill_async, 6.0);
14f8ab
-
14f8ab
 void
14f8ab
 gf_dirent_to_dirent(gf_dirent_t *gf_dirent, struct dirent *dirent)
14f8ab
 {
14f8ab
@@ -3814,6 +3749,7 @@ unlock:
14f8ab
     return buf;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_readdirplus_r, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_readdirplus_r(struct glfs_fd *glfd, struct stat *stat,
14f8ab
                        struct dirent *ext, struct dirent **res)
14f8ab
@@ -3869,8 +3805,7 @@ invalid_fs:
14f8ab
     return -1;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_readdirplus_r, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_readdir_r, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_readdir_r(struct glfs_fd *glfd, struct dirent *buf,
14f8ab
                    struct dirent **res)
14f8ab
@@ -3878,8 +3813,7 @@ pub_glfs_readdir_r(struct glfs_fd *glfd, struct dirent *buf,
14f8ab
     return pub_glfs_readdirplus_r(glfd, 0, buf, res);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_readdir_r, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_readdirplus, 3.5.0)
14f8ab
 struct dirent *
14f8ab
 pub_glfs_readdirplus(struct glfs_fd *glfd, struct stat *stat)
14f8ab
 {
14f8ab
@@ -3893,16 +3827,14 @@ pub_glfs_readdirplus(struct glfs_fd *glfd, struct stat *stat)
14f8ab
     return res;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_readdirplus, 3.5.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_readdir, 3.5.0)
14f8ab
 struct dirent *
14f8ab
 pub_glfs_readdir(struct glfs_fd *glfd)
14f8ab
 {
14f8ab
     return pub_glfs_readdirplus(glfd, NULL);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_readdir, 3.5.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_statvfs, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_statvfs(struct glfs *fs, const char *path, struct statvfs *buf)
14f8ab
 {
14f8ab
@@ -3948,8 +3880,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_statvfs, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_setattr, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_setattr(struct glfs *fs, const char *path, struct glfs_stat *stat,
14f8ab
                  int follow)
14f8ab
@@ -4009,8 +3940,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_setattr, 6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fsetattr, 6.0)
14f8ab
 int
14f8ab
 pub_glfs_fsetattr(struct glfs_fd *glfd, struct glfs_stat *stat)
14f8ab
 {
14f8ab
@@ -4063,8 +3993,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fsetattr, 6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_chmod, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_chmod(struct glfs *fs, const char *path, mode_t mode)
14f8ab
 {
14f8ab
@@ -4081,8 +4010,7 @@ pub_glfs_chmod(struct glfs *fs, const char *path, mode_t mode)
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_chmod, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fchmod, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_fchmod(struct glfs_fd *glfd, mode_t mode)
14f8ab
 {
14f8ab
@@ -4099,8 +4027,7 @@ pub_glfs_fchmod(struct glfs_fd *glfd, mode_t mode)
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fchmod, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_chown, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_chown(struct glfs *fs, const char *path, uid_t uid, gid_t gid)
14f8ab
 {
14f8ab
@@ -4125,8 +4052,7 @@ pub_glfs_chown(struct glfs *fs, const char *path, uid_t uid, gid_t gid)
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_chown, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lchown, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_lchown(struct glfs *fs, const char *path, uid_t uid, gid_t gid)
14f8ab
 {
14f8ab
@@ -4151,8 +4077,7 @@ pub_glfs_lchown(struct glfs *fs, const char *path, uid_t uid, gid_t gid)
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lchown, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fchown, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_fchown(struct glfs_fd *glfd, uid_t uid, gid_t gid)
14f8ab
 {
14f8ab
@@ -4177,8 +4102,7 @@ pub_glfs_fchown(struct glfs_fd *glfd, uid_t uid, gid_t gid)
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fchown, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_utimens, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_utimens(struct glfs *fs, const char *path,
14f8ab
                  const struct timespec times[2])
14f8ab
@@ -4198,8 +4122,7 @@ pub_glfs_utimens(struct glfs *fs, const char *path,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_utimens, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lutimens, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_lutimens(struct glfs *fs, const char *path,
14f8ab
                   const struct timespec times[2])
14f8ab
@@ -4219,8 +4142,7 @@ pub_glfs_lutimens(struct glfs *fs, const char *path,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lutimens, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_futimens, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_futimens(struct glfs_fd *glfd, const struct timespec times[2])
14f8ab
 {
14f8ab
@@ -4239,8 +4161,6 @@ pub_glfs_futimens(struct glfs_fd *glfd, const struct timespec times[2])
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_futimens, 3.4.0);
14f8ab
-
14f8ab
 int
14f8ab
 glfs_getxattr_process(void *value, size_t size, dict_t *xattr, const char *name)
14f8ab
 {
14f8ab
@@ -4340,6 +4260,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_getxattr, 3.4.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_getxattr(struct glfs *fs, const char *path, const char *name,
14f8ab
                   void *value, size_t size)
14f8ab
@@ -4347,8 +4268,7 @@ pub_glfs_getxattr(struct glfs *fs, const char *path, const char *name,
14f8ab
     return glfs_getxattr_common(fs, path, name, value, size, 1);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_getxattr, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lgetxattr, 3.4.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_lgetxattr(struct glfs *fs, const char *path, const char *name,
14f8ab
                    void *value, size_t size)
14f8ab
@@ -4356,8 +4276,7 @@ pub_glfs_lgetxattr(struct glfs *fs, const char *path, const char *name,
14f8ab
     return glfs_getxattr_common(fs, path, name, value, size, 0);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lgetxattr, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fgetxattr, 3.4.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_fgetxattr(struct glfs_fd *glfd, const char *name, void *value,
14f8ab
                    size_t size)
14f8ab
@@ -4420,8 +4339,6 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fgetxattr, 3.4.0);
14f8ab
-
14f8ab
 int
14f8ab
 glfs_listxattr_process(void *value, size_t size, dict_t *xattr)
14f8ab
 {
14f8ab
@@ -4505,22 +4422,21 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_listxattr, 3.4.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_listxattr(struct glfs *fs, const char *path, void *value, size_t size)
14f8ab
 {
14f8ab
     return glfs_listxattr_common(fs, path, value, size, 1);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_listxattr, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_llistxattr, 3.4.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_llistxattr(struct glfs *fs, const char *path, void *value, size_t size)
14f8ab
 {
14f8ab
     return glfs_listxattr_common(fs, path, value, size, 0);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_llistxattr, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_flistxattr, 3.4.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_flistxattr(struct glfs_fd *glfd, void *value, size_t size)
14f8ab
 {
14f8ab
@@ -4570,8 +4486,6 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_flistxattr, 3.4.0);
14f8ab
-
14f8ab
 int
14f8ab
 glfs_setxattr_common(struct glfs *fs, const char *path, const char *name,
14f8ab
                      const void *value, size_t size, int flags, int follow)
14f8ab
@@ -4651,6 +4565,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_setxattr, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_setxattr(struct glfs *fs, const char *path, const char *name,
14f8ab
                   const void *value, size_t size, int flags)
14f8ab
@@ -4658,8 +4573,7 @@ pub_glfs_setxattr(struct glfs *fs, const char *path, const char *name,
14f8ab
     return glfs_setxattr_common(fs, path, name, value, size, flags, 1);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_setxattr, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lsetxattr, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_lsetxattr(struct glfs *fs, const char *path, const char *name,
14f8ab
                    const void *value, size_t size, int flags)
14f8ab
@@ -4667,8 +4581,7 @@ pub_glfs_lsetxattr(struct glfs *fs, const char *path, const char *name,
14f8ab
     return glfs_setxattr_common(fs, path, name, value, size, flags, 0);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lsetxattr, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fsetxattr, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_fsetxattr(struct glfs_fd *glfd, const char *name, const void *value,
14f8ab
                    size_t size, int flags)
14f8ab
@@ -4743,8 +4656,6 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fsetxattr, 3.4.0);
14f8ab
-
14f8ab
 int
14f8ab
 glfs_removexattr_common(struct glfs *fs, const char *path, const char *name,
14f8ab
                         int follow)
14f8ab
@@ -4795,22 +4706,21 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_removexattr, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_removexattr(struct glfs *fs, const char *path, const char *name)
14f8ab
 {
14f8ab
     return glfs_removexattr_common(fs, path, name, 1);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_removexattr, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lremovexattr, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_lremovexattr(struct glfs *fs, const char *path, const char *name)
14f8ab
 {
14f8ab
     return glfs_removexattr_common(fs, path, name, 0);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lremovexattr, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fremovexattr, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_fremovexattr(struct glfs_fd *glfd, const char *name)
14f8ab
 {
14f8ab
@@ -4853,8 +4763,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fremovexattr, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fallocate, 3.5.0)
14f8ab
 int
14f8ab
 pub_glfs_fallocate(struct glfs_fd *glfd, int keep_size, off_t offset,
14f8ab
                    size_t len)
14f8ab
@@ -4905,8 +4814,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fallocate, 3.5.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_discard, 3.5.0)
14f8ab
 int
14f8ab
 pub_glfs_discard(struct glfs_fd *glfd, off_t offset, size_t len)
14f8ab
 {
14f8ab
@@ -4956,8 +4864,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_discard, 3.5.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_zerofill, 3.5.0)
14f8ab
 int
14f8ab
 pub_glfs_zerofill(struct glfs_fd *glfd, off_t offset, off_t len)
14f8ab
 {
14f8ab
@@ -5005,8 +4912,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_zerofill, 3.5.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_chdir, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_chdir(struct glfs *fs, const char *path)
14f8ab
 {
14f8ab
@@ -5056,8 +4962,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_chdir, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fchdir, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_fchdir(struct glfs_fd *glfd)
14f8ab
 {
14f8ab
@@ -5109,8 +5014,6 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fchdir, 3.4.0);
14f8ab
-
14f8ab
 static gf_boolean_t warn_realpath = _gf_true; /* log once */
14f8ab
 
14f8ab
 static char *
14f8ab
@@ -5193,22 +5096,21 @@ invalid_fs:
14f8ab
     return retpath;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_realpath34, glfs_realpath, 3.4.0)
14f8ab
 char *
14f8ab
 pub_glfs_realpath34(struct glfs *fs, const char *path, char *resolved_path)
14f8ab
 {
14f8ab
     return glfs_realpath_common(fs, path, resolved_path, _gf_true);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_realpath34, glfs_realpath, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_realpath, 3.7.17)
14f8ab
 char *
14f8ab
 pub_glfs_realpath(struct glfs *fs, const char *path, char *resolved_path)
14f8ab
 {
14f8ab
     return glfs_realpath_common(fs, path, resolved_path, _gf_false);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_realpath, 3.7.17);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_getcwd, 3.4.0)
14f8ab
 char *
14f8ab
 pub_glfs_getcwd(struct glfs *fs, char *buf, size_t n)
14f8ab
 {
14f8ab
@@ -5257,8 +5159,6 @@ invalid_fs:
14f8ab
     return buf;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_getcwd, 3.4.0);
14f8ab
-
14f8ab
 static void
14f8ab
 gf_flock_to_flock(struct gf_flock *gf_flock, struct flock *flock)
14f8ab
 {
14f8ab
@@ -5367,6 +5267,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_file_lock, 4.0.0)
14f8ab
 int
14f8ab
 pub_glfs_file_lock(struct glfs_fd *glfd, int cmd, struct flock *flock,
14f8ab
                    glfs_lock_mode_t lk_mode)
14f8ab
@@ -5404,16 +5305,14 @@ out:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_file_lock, 4.0.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_posix_lock, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_posix_lock(struct glfs_fd *glfd, int cmd, struct flock *flock)
14f8ab
 {
14f8ab
     return glfs_lock_common(glfd, cmd, flock, NULL);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_posix_lock, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fd_set_lkowner, 3.10.7)
14f8ab
 int
14f8ab
 pub_glfs_fd_set_lkowner(struct glfs_fd *glfd, void *data, int len)
14f8ab
 {
14f8ab
@@ -5449,8 +5348,8 @@ out:
14f8ab
 invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fd_set_lkowner, 3.10.7);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_dup, 3.4.0)
14f8ab
 struct glfs_fd *
14f8ab
 pub_glfs_dup(struct glfs_fd *glfd)
14f8ab
 {
14f8ab
@@ -5501,8 +5400,6 @@ invalid_fs:
14f8ab
     return dupfd;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_dup, 3.4.0);
14f8ab
-
14f8ab
 static void
14f8ab
 glfs_enqueue_upcall_data(struct glfs *fs, struct gf_upcall *upcall_data)
14f8ab
 {
14f8ab
@@ -5986,6 +5883,7 @@ out:
14f8ab
  * Otherwise all the upcall events are queued up in a list
14f8ab
  * to be read/polled by the applications.
14f8ab
  */
14f8ab
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_process_upcall_event, 3.7.0)
14f8ab
 void
14f8ab
 priv_glfs_process_upcall_event(struct glfs *fs, void *data)
14f8ab
 {
14f8ab
@@ -6053,7 +5951,6 @@ out:
14f8ab
 err:
14f8ab
     return;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_process_upcall_event, 3.7.0);
14f8ab
 
14f8ab
 ssize_t
14f8ab
 glfs_anonymous_pwritev(struct glfs *fs, struct glfs_object *object,
14f8ab
@@ -6241,6 +6138,7 @@ glfs_release_xreaddirp_stat(void *ptr)
14f8ab
  * Given glfd of a directory, this function does readdirp and returns
14f8ab
  * xstat along with dirents.
14f8ab
  */
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_xreaddirplus_r, 3.11.0)
14f8ab
 int
14f8ab
 pub_glfs_xreaddirplus_r(struct glfs_fd *glfd, uint32_t flags,
14f8ab
                         struct glfs_xreaddirp_stat **xstat_p,
14f8ab
@@ -6349,8 +6247,8 @@ out:
14f8ab
 invalid_fs:
14f8ab
     return -1;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_xreaddirplus_r, 3.11.0);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_xreaddirplus_get_stat, 3.11.0)
14f8ab
 struct stat *
14f8ab
 pub_glfs_xreaddirplus_get_stat(struct glfs_xreaddirp_stat *xstat)
14f8ab
 {
14f8ab
@@ -6366,7 +6264,6 @@ pub_glfs_xreaddirplus_get_stat(struct glfs_xreaddirp_stat *xstat)
14f8ab
 out:
14f8ab
     return NULL;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_xreaddirplus_get_stat, 3.11.0);
14f8ab
 
14f8ab
 void
14f8ab
 gf_lease_to_glfs_lease(struct gf_lease *gf_lease, struct glfs_lease *lease)
14f8ab
@@ -6386,6 +6283,7 @@ glfs_lease_to_gf_lease(struct glfs_lease *lease, struct gf_lease *gf_lease)
14f8ab
     memcpy(gf_lease->lease_id, lease->lease_id, LEASE_ID_SIZE);
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lease, 4.0.0)
14f8ab
 int
14f8ab
 pub_glfs_lease(struct glfs_fd *glfd, struct glfs_lease *lease,
14f8ab
                glfs_recall_cbk fn, void *data)
14f8ab
@@ -6487,5 +6385,3 @@ out:
14f8ab
 invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
-
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lease, 4.0.0);
14f8ab
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c
14f8ab
index 7b8ff1468..4315a34d2 100644
14f8ab
--- a/api/src/glfs-handleops.c
14f8ab
+++ b/api/src/glfs-handleops.c
14f8ab
@@ -60,6 +60,7 @@ glfs_iatt_from_stat(struct stat *stat, int valid, struct iatt *iatt,
14f8ab
     return;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_lookupat, 3.7.4)
14f8ab
 struct glfs_object *
14f8ab
 pub_glfs_h_lookupat(struct glfs *fs, struct glfs_object *parent,
14f8ab
                     const char *path, struct stat *stat, int follow)
14f8ab
@@ -126,8 +127,7 @@ invalid_fs:
14f8ab
     return object;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_lookupat, 3.7.4);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_h_lookupat34, glfs_h_lookupat, 3.4.2)
14f8ab
 struct glfs_object *
14f8ab
 pub_glfs_h_lookupat34(struct glfs *fs, struct glfs_object *parent,
14f8ab
                       const char *path, struct stat *stat)
14f8ab
@@ -135,8 +135,7 @@ pub_glfs_h_lookupat34(struct glfs *fs, struct glfs_object *parent,
14f8ab
     return pub_glfs_h_lookupat(fs, parent, path, stat, 0);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_h_lookupat34, glfs_h_lookupat, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_statfs, 3.7.0)
14f8ab
 int
14f8ab
 pub_glfs_h_statfs(struct glfs *fs, struct glfs_object *object,
14f8ab
                   struct statvfs *statvfs)
14f8ab
@@ -194,8 +193,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_statfs, 3.7.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_stat, 3.4.2)
14f8ab
 int
14f8ab
 pub_glfs_h_stat(struct glfs *fs, struct glfs_object *object, struct stat *stat)
14f8ab
 {
14f8ab
@@ -259,8 +257,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_stat, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_getattrs, 3.4.2)
14f8ab
 int
14f8ab
 pub_glfs_h_getattrs(struct glfs *fs, struct glfs_object *object,
14f8ab
                     struct stat *stat)
14f8ab
@@ -317,8 +314,6 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_getattrs, 3.4.2);
14f8ab
-
14f8ab
 int
14f8ab
 glfs_h_getxattrs_common(struct glfs *fs, struct glfs_object *object,
14f8ab
                         dict_t **xattr, const char *name,
14f8ab
@@ -380,6 +375,7 @@ out:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_getxattrs, 3.5.1)
14f8ab
 int
14f8ab
 pub_glfs_h_getxattrs(struct glfs *fs, struct glfs_object *object,
14f8ab
                      const char *name, void *value, size_t size)
14f8ab
@@ -416,8 +412,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_getxattrs, 3.5.1);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_setattrs, 3.4.2)
14f8ab
 int
14f8ab
 pub_glfs_h_setattrs(struct glfs *fs, struct glfs_object *object,
14f8ab
                     struct stat *stat, int valid)
14f8ab
@@ -480,8 +475,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_setattrs, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_setxattrs, 3.5.0)
14f8ab
 int
14f8ab
 pub_glfs_h_setxattrs(struct glfs *fs, struct glfs_object *object,
14f8ab
                      const char *name, const void *value, size_t size,
14f8ab
@@ -568,8 +562,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_setxattrs, 3.5.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_removexattrs, 3.5.1)
14f8ab
 int
14f8ab
 pub_glfs_h_removexattrs(struct glfs *fs, struct glfs_object *object,
14f8ab
                         const char *name)
14f8ab
@@ -626,8 +619,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_removexattrs, 3.5.1);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_open, 3.4.2)
14f8ab
 struct glfs_fd *
14f8ab
 pub_glfs_h_open(struct glfs *fs, struct glfs_object *object, int flags)
14f8ab
 {
14f8ab
@@ -727,8 +719,7 @@ invalid_fs:
14f8ab
     return glfd;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_open, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_creat, 3.4.2)
14f8ab
 struct glfs_object *
14f8ab
 pub_glfs_h_creat(struct glfs *fs, struct glfs_object *parent, const char *path,
14f8ab
                  int flags, mode_t mode, struct stat *stat)
14f8ab
@@ -840,7 +831,7 @@ invalid_fs:
14f8ab
     return object;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_creat, 3.4.2);
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_creat_open, 3.4.2);
14f8ab
 
14f8ab
 struct glfs_object *
14f8ab
 pub_glfs_h_creat_open(struct glfs *fs, struct glfs_object *parent,
14f8ab
@@ -975,8 +966,7 @@ invalid_fs:
14f8ab
     return object;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_creat_open, 6.6);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_mkdir, 3.4.2)
14f8ab
 struct glfs_object *
14f8ab
 pub_glfs_h_mkdir(struct glfs *fs, struct glfs_object *parent, const char *path,
14f8ab
                  mode_t mode, struct stat *stat)
14f8ab
@@ -1074,8 +1064,7 @@ invalid_fs:
14f8ab
     return object;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_mkdir, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_mknod, 3.4.2)
14f8ab
 struct glfs_object *
14f8ab
 pub_glfs_h_mknod(struct glfs *fs, struct glfs_object *parent, const char *path,
14f8ab
                  mode_t mode, dev_t dev, struct stat *stat)
14f8ab
@@ -1172,8 +1161,7 @@ invalid_fs:
14f8ab
     return object;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_mknod, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_unlink, 3.4.2)
14f8ab
 int
14f8ab
 pub_glfs_h_unlink(struct glfs *fs, struct glfs_object *parent, const char *path)
14f8ab
 {
14f8ab
@@ -1244,8 +1232,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_unlink, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_opendir, 3.4.2)
14f8ab
 struct glfs_fd *
14f8ab
 pub_glfs_h_opendir(struct glfs *fs, struct glfs_object *object)
14f8ab
 {
14f8ab
@@ -1327,8 +1314,7 @@ invalid_fs:
14f8ab
     return glfd;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_opendir, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_access, 3.6.0)
14f8ab
 int
14f8ab
 pub_glfs_h_access(struct glfs *fs, struct glfs_object *object, int mask)
14f8ab
 {
14f8ab
@@ -1385,8 +1371,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_access, 3.6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_extract_handle, 3.4.2)
14f8ab
 ssize_t
14f8ab
 pub_glfs_h_extract_handle(struct glfs_object *object, unsigned char *handle,
14f8ab
                           int len)
14f8ab
@@ -1417,8 +1402,7 @@ out:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_extract_handle, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_create_from_handle, 3.4.2)
14f8ab
 struct glfs_object *
14f8ab
 pub_glfs_h_create_from_handle(struct glfs *fs, unsigned char *handle, int len,
14f8ab
                               struct stat *stat)
14f8ab
@@ -1541,8 +1525,7 @@ invalid_fs:
14f8ab
     return object;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_create_from_handle, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_close, 3.4.2)
14f8ab
 int
14f8ab
 pub_glfs_h_close(struct glfs_object *object)
14f8ab
 {
14f8ab
@@ -1555,8 +1538,7 @@ pub_glfs_h_close(struct glfs_object *object)
14f8ab
     return 0;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_close, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_truncate, 3.4.2)
14f8ab
 int
14f8ab
 pub_glfs_h_truncate(struct glfs *fs, struct glfs_object *object, off_t offset)
14f8ab
 {
14f8ab
@@ -1616,8 +1598,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_truncate, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_symlink, 3.4.2)
14f8ab
 struct glfs_object *
14f8ab
 pub_glfs_h_symlink(struct glfs *fs, struct glfs_object *parent,
14f8ab
                    const char *name, const char *data, struct stat *stat)
14f8ab
@@ -1716,8 +1697,7 @@ invalid_fs:
14f8ab
     return object;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_symlink, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_readlink, 3.4.2)
14f8ab
 int
14f8ab
 pub_glfs_h_readlink(struct glfs *fs, struct glfs_object *object, char *buf,
14f8ab
                     size_t bufsiz)
14f8ab
@@ -1782,8 +1762,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_readlink, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_link, 3.4.2)
14f8ab
 int
14f8ab
 pub_glfs_h_link(struct glfs *fs, struct glfs_object *linksrc,
14f8ab
                 struct glfs_object *parent, const char *name)
14f8ab
@@ -1880,8 +1859,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_link, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_rename, 3.4.2)
14f8ab
 int
14f8ab
 pub_glfs_h_rename(struct glfs *fs, struct glfs_object *olddir,
14f8ab
                   const char *oldname, struct glfs_object *newdir,
14f8ab
@@ -1991,8 +1969,6 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_rename, 3.4.2);
14f8ab
-
14f8ab
 /*
14f8ab
  * Given a handle/gfid, find if the corresponding inode is present in
14f8ab
  * the inode table. If yes create and return the corresponding glfs_object.
14f8ab
@@ -2200,6 +2176,7 @@ glfs_release_upcall(void *ptr)
14f8ab
  * calling glfs_fini(..). Hence making an assumption that 'fs' & ctx structures
14f8ab
  * cannot be freed while in this routine.
14f8ab
  */
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_poll_upcall, 3.7.16)
14f8ab
 int
14f8ab
 pub_glfs_h_poll_upcall(struct glfs *fs, struct glfs_upcall **up_arg)
14f8ab
 {
14f8ab
@@ -2317,8 +2294,6 @@ err:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_poll_upcall, 3.7.16);
14f8ab
-
14f8ab
 static gf_boolean_t log_upcall370 = _gf_true; /* log once */
14f8ab
 
14f8ab
 /* The old glfs_h_poll_upcall interface requires intimate knowledge of the
14f8ab
@@ -2332,6 +2307,7 @@ static gf_boolean_t log_upcall370 = _gf_true; /* log once */
14f8ab
  *
14f8ab
  * WARNING: this function will be removed in the future.
14f8ab
  */
14f8ab
+GFAPI_SYMVER_PUBLIC(glfs_h_poll_upcall370, glfs_h_poll_upcall, 3.7.0)
14f8ab
 int
14f8ab
 pub_glfs_h_poll_upcall370(struct glfs *fs, struct glfs_callback_arg *up_arg)
14f8ab
 {
14f8ab
@@ -2399,12 +2375,11 @@ out:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC(glfs_h_poll_upcall370, glfs_h_poll_upcall, 3.7.0);
14f8ab
-
14f8ab
 #ifdef HAVE_ACL_LIBACL_H
14f8ab
 #include <glusterfs/glusterfs-acl.h>
14f8ab
 #include <acl/libacl.h>
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_acl_set, 3.7.0)
14f8ab
 int
14f8ab
 pub_glfs_h_acl_set(struct glfs *fs, struct glfs_object *object,
14f8ab
                    const acl_type_t type, const acl_t acl)
14f8ab
@@ -2453,6 +2428,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_acl_get, 3.7.0)
14f8ab
 acl_t
14f8ab
 pub_glfs_h_acl_get(struct glfs *fs, struct glfs_object *object,
14f8ab
                    const acl_type_t type)
14f8ab
@@ -2507,6 +2483,7 @@ invalid_fs:
14f8ab
     return acl;
14f8ab
 }
14f8ab
 #else /* !HAVE_ACL_LIBACL_H */
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_acl_get, 3.7.0)
14f8ab
 acl_t
14f8ab
 pub_glfs_h_acl_get(struct glfs *fs, struct glfs_object *object,
14f8ab
                    const acl_type_t type)
14f8ab
@@ -2515,6 +2492,7 @@ pub_glfs_h_acl_get(struct glfs *fs, struct glfs_object *object,
14f8ab
     return NULL;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_acl_set, 3.7.0)
14f8ab
 int
14f8ab
 pub_glfs_h_acl_set(struct glfs *fs, struct glfs_object *object,
14f8ab
                    const acl_type_t type, const acl_t acl)
14f8ab
@@ -2523,10 +2501,9 @@ pub_glfs_h_acl_set(struct glfs *fs, struct glfs_object *object,
14f8ab
     return -1;
14f8ab
 }
14f8ab
 #endif
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_acl_set, 3.7.0);
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_acl_get, 3.7.0);
14f8ab
 
14f8ab
 /* The API to perform read using anonymous fd */
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_anonymous_read, 3.7.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_h_anonymous_read(struct glfs *fs, struct glfs_object *object,
14f8ab
                           const void *buf, size_t count, off_t offset)
14f8ab
@@ -2550,9 +2527,8 @@ pub_glfs_h_anonymous_read(struct glfs *fs, struct glfs_object *object,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_anonymous_read, 3.7.0);
14f8ab
-
14f8ab
 /* The API to perform write using anonymous fd */
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_anonymous_write, 3.7.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_h_anonymous_write(struct glfs *fs, struct glfs_object *object,
14f8ab
                            const void *buf, size_t count, off_t offset)
14f8ab
@@ -2576,8 +2552,7 @@ pub_glfs_h_anonymous_write(struct glfs *fs, struct glfs_object *object,
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_anonymous_write, 3.7.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_object_copy, 3.11.0)
14f8ab
 struct glfs_object *
14f8ab
 pub_glfs_object_copy(struct glfs_object *src)
14f8ab
 {
14f8ab
@@ -2600,8 +2575,8 @@ pub_glfs_object_copy(struct glfs_object *src)
14f8ab
 out:
14f8ab
     return object;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_object_copy, 3.11.0);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_xreaddirplus_get_object, 3.11.0)
14f8ab
 struct glfs_object *
14f8ab
 pub_glfs_xreaddirplus_get_object(struct glfs_xreaddirp_stat *xstat)
14f8ab
 {
14f8ab
@@ -2618,8 +2593,8 @@ pub_glfs_xreaddirplus_get_object(struct glfs_xreaddirp_stat *xstat)
14f8ab
 out:
14f8ab
     return NULL;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_xreaddirplus_get_object, 3.11.0);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_lease, 4.0.0)
14f8ab
 int
14f8ab
 pub_glfs_h_lease(struct glfs *fs, struct glfs_object *object,
14f8ab
                  struct glfs_lease *lease)
14f8ab
@@ -2681,5 +2656,3 @@ out:
14f8ab
 invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
-
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_lease, 4.0.0);
14f8ab
diff --git a/api/src/glfs-internal.h b/api/src/glfs-internal.h
14f8ab
index 15cf0ee00..a6cd1ff20 100644
14f8ab
--- a/api/src/glfs-internal.h
14f8ab
+++ b/api/src/glfs-internal.h
14f8ab
@@ -81,25 +81,40 @@
14f8ab
 #ifndef GFAPI_PRIVATE
14f8ab
 #define GFAPI_PRIVATE(sym, ver) /**/
14f8ab
 #endif
14f8ab
+#if __GNUC__ >= 10
14f8ab
 #define GFAPI_SYMVER_PUBLIC_DEFAULT(fn, ver)                                   \
14f8ab
-    asm(".symver pub_" STR(fn) ", " STR(fn) "@@GFAPI_" STR(ver))
14f8ab
+    __attribute__((__symver__(STR(fn) "@@GFAPI_" STR(ver))))
14f8ab
 
14f8ab
 #define GFAPI_SYMVER_PRIVATE_DEFAULT(fn, ver)                                  \
14f8ab
-    asm(".symver priv_" STR(fn) ", " STR(fn) "@@GFAPI_PRIVATE_" STR(ver))
14f8ab
+    __attribute__((__symver__(STR(fn) "@@GFAPI_PRIVATE_" STR(ver))))
14f8ab
 
14f8ab
 #define GFAPI_SYMVER_PUBLIC(fn1, fn2, ver)                                     \
14f8ab
-    asm(".symver pub_" STR(fn1) ", " STR(fn2) "@GFAPI_" STR(ver))
14f8ab
+    __attribute__((__symver__(STR(fn2) "@GFAPI_" STR(ver))))
14f8ab
 
14f8ab
 #define GFAPI_SYMVER_PRIVATE(fn1, fn2, ver)                                    \
14f8ab
-    asm(".symver priv_" STR(fn1) ", " STR(fn2) "@GFAPI_PRIVATE_" STR(ver))
14f8ab
+    __attribute__((__symver__(STR(fn2) "@GFAPI_PRIVATE_" STR(ver))))
14f8ab
+
14f8ab
+#else
14f8ab
+#define GFAPI_SYMVER_PUBLIC_DEFAULT(fn, ver)                                   \
14f8ab
+    asm(".symver pub_" STR(fn) ", " STR(fn) "@@GFAPI_" STR(ver));
14f8ab
+
14f8ab
+#define GFAPI_SYMVER_PRIVATE_DEFAULT(fn, ver)                                  \
14f8ab
+    asm(".symver priv_" STR(fn) ", " STR(fn) "@@GFAPI_PRIVATE_" STR(ver));
14f8ab
+
14f8ab
+#define GFAPI_SYMVER_PUBLIC(fn1, fn2, ver)                                     \
14f8ab
+    asm(".symver pub_" STR(fn1) ", " STR(fn2) "@GFAPI_" STR(ver));
14f8ab
+
14f8ab
+#define GFAPI_SYMVER_PRIVATE(fn1, fn2, ver)                                    \
14f8ab
+    asm(".symver priv_" STR(fn1) ", " STR(fn2) "@GFAPI_PRIVATE_" STR(ver));
14f8ab
+#endif
14f8ab
 #define STR(str) #str
14f8ab
 #else
14f8ab
 #ifndef GFAPI_PUBLIC
14f8ab
-#define GFAPI_PUBLIC(sym, ver) __asm("_" __STRING(sym) "$GFAPI_" __STRING(ver))
14f8ab
+#define GFAPI_PUBLIC(sym, ver) __asm("_" __STRING(sym) "$GFAPI_" __STRING(ver));
14f8ab
 #endif
14f8ab
 #ifndef GFAPI_PRIVATE
14f8ab
 #define GFAPI_PRIVATE(sym, ver)                                                \
14f8ab
-    __asm("_" __STRING(sym) "$GFAPI_PRIVATE_" __STRING(ver))
14f8ab
+    __asm("_" __STRING(sym) "$GFAPI_PRIVATE_" __STRING(ver));
14f8ab
 #endif
14f8ab
 #define GFAPI_SYMVER_PUBLIC_DEFAULT(fn, dotver)  /**/
14f8ab
 #define GFAPI_SYMVER_PRIVATE_DEFAULT(fn, dotver) /**/
14f8ab
diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c
14f8ab
index 7476d5b64..07be8a403 100644
14f8ab
--- a/api/src/glfs-mgmt.c
14f8ab
+++ b/api/src/glfs-mgmt.c
14f8ab
@@ -383,6 +383,7 @@ out:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_get_volumeid, 3.5.0)
14f8ab
 int
14f8ab
 pub_glfs_get_volumeid(struct glfs *fs, char *volid, size_t size)
14f8ab
 {
14f8ab
@@ -439,8 +440,6 @@ invalid_fs:
14f8ab
     return -1;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_get_volumeid, 3.5.0);
14f8ab
-
14f8ab
 int
14f8ab
 glfs_get_volume_info(struct glfs *fs)
14f8ab
 {
14f8ab
diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c
14f8ab
index 58b6ace58..c3e114a39 100644
14f8ab
--- a/api/src/glfs-resolve.c
14f8ab
+++ b/api/src/glfs-resolve.c
14f8ab
@@ -163,6 +163,7 @@ __glfs_refresh_inode(struct glfs *fs, xlator_t *subvol, inode_t *inode,
14f8ab
     return newinode;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_loc_touchup, 3.4.0)
14f8ab
 int
14f8ab
 priv_glfs_loc_touchup(loc_t *loc)
14f8ab
 {
14f8ab
@@ -177,8 +178,6 @@ priv_glfs_loc_touchup(loc_t *loc)
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_loc_touchup, 3.4.0);
14f8ab
-
14f8ab
 int
14f8ab
 glfs_resolve_symlink(struct glfs *fs, xlator_t *subvol, inode_t *inode,
14f8ab
                      char **lpath)
14f8ab
@@ -466,6 +465,7 @@ out:
14f8ab
     return inode;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_resolve_at, 3.4.0)
14f8ab
 int
14f8ab
 priv_glfs_resolve_at(struct glfs *fs, xlator_t *subvol, inode_t *at,
14f8ab
                      const char *origpath, loc_t *loc, struct iatt *iatt,
14f8ab
@@ -616,8 +616,6 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_resolve_at, 3.4.0);
14f8ab
-
14f8ab
 int
14f8ab
 glfs_resolve_path(struct glfs *fs, xlator_t *subvol, const char *origpath,
14f8ab
                   loc_t *loc, struct iatt *iatt, int follow, int reval)
14f8ab
@@ -646,6 +644,7 @@ out:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_resolve, 3.7.0)
14f8ab
 int
14f8ab
 priv_glfs_resolve(struct glfs *fs, xlator_t *subvol, const char *origpath,
14f8ab
                   loc_t *loc, struct iatt *iatt, int reval)
14f8ab
@@ -656,7 +655,6 @@ priv_glfs_resolve(struct glfs *fs, xlator_t *subvol, const char *origpath,
14f8ab
 
14f8ab
     return ret;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_resolve, 3.7.0);
14f8ab
 
14f8ab
 int
14f8ab
 glfs_lresolve(struct glfs *fs, xlator_t *subvol, const char *origpath,
14f8ab
@@ -977,6 +975,7 @@ __glfs_active_subvol(struct glfs *fs)
14f8ab
     return new_subvol;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_subvol_done, 3.4.0)
14f8ab
 void
14f8ab
 priv_glfs_subvol_done(struct glfs *fs, xlator_t *subvol)
14f8ab
 {
14f8ab
@@ -1004,8 +1003,7 @@ priv_glfs_subvol_done(struct glfs *fs, xlator_t *subvol)
14f8ab
     }
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_subvol_done, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_active_subvol, 3.4.0)
14f8ab
 xlator_t *
14f8ab
 priv_glfs_active_subvol(struct glfs *fs)
14f8ab
 {
14f8ab
@@ -1033,8 +1031,6 @@ priv_glfs_active_subvol(struct glfs *fs)
14f8ab
     return subvol;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_active_subvol, 3.4.0);
14f8ab
-
14f8ab
 int
14f8ab
 __glfs_cwd_set(struct glfs *fs, inode_t *inode)
14f8ab
 {
14f8ab
diff --git a/api/src/glfs.c b/api/src/glfs.c
14f8ab
index ae994faaf..b85b1c4be 100644
14f8ab
--- a/api/src/glfs.c
14f8ab
+++ b/api/src/glfs.c
14f8ab
@@ -277,6 +277,7 @@ out:
14f8ab
 
14f8ab
 ///////////////////////////////////////////////////////////////////////////////
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_set_xlator_option, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_set_xlator_option(struct glfs *fs, const char *xlator, const char *key,
14f8ab
                            const char *value)
14f8ab
@@ -326,8 +327,7 @@ invalid_fs:
14f8ab
     return -1;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_set_xlator_option, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_unset_volfile_server, 3.5.1)
14f8ab
 int
14f8ab
 pub_glfs_unset_volfile_server(struct glfs *fs, const char *transport,
14f8ab
                               const char *host, const int port)
14f8ab
@@ -385,8 +385,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_unset_volfile_server, 3.5.1);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_set_volfile_server, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_set_volfile_server(struct glfs *fs, const char *transport,
14f8ab
                             const char *host, int port)
14f8ab
@@ -468,8 +467,6 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_set_volfile_server, 3.4.0);
14f8ab
-
14f8ab
 /* *
14f8ab
  * Used to free the arguments allocated by glfs_set_volfile_server()
14f8ab
  */
14f8ab
@@ -512,6 +509,7 @@ glfs_free_xlator_options(cmd_args_t *cmd_args)
14f8ab
     }
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_setfsuid, 3.4.2)
14f8ab
 int
14f8ab
 pub_glfs_setfsuid(uid_t fsuid)
14f8ab
 {
14f8ab
@@ -521,8 +519,7 @@ pub_glfs_setfsuid(uid_t fsuid)
14f8ab
     return syncopctx_setfsuid(&fsuid);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_setfsuid, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_setfsgid, 3.4.2)
14f8ab
 int
14f8ab
 pub_glfs_setfsgid(gid_t fsgid)
14f8ab
 {
14f8ab
@@ -532,8 +529,7 @@ pub_glfs_setfsgid(gid_t fsgid)
14f8ab
     return syncopctx_setfsgid(&fsgid);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_setfsgid, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_setfsgroups, 3.4.2)
14f8ab
 int
14f8ab
 pub_glfs_setfsgroups(size_t size, const gid_t *list)
14f8ab
 {
14f8ab
@@ -543,8 +539,7 @@ pub_glfs_setfsgroups(size_t size, const gid_t *list)
14f8ab
     return syncopctx_setfsgroups(size, list);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_setfsgroups, 3.4.2);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_setfsleaseid, 4.0.0)
14f8ab
 int
14f8ab
 pub_glfs_setfsleaseid(glfs_leaseid_t leaseid)
14f8ab
 {
14f8ab
@@ -566,8 +561,6 @@ pub_glfs_setfsleaseid(glfs_leaseid_t leaseid)
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_setfsleaseid, 4.0.0);
14f8ab
-
14f8ab
 int
14f8ab
 get_fop_attr_glfd(dict_t **fop_attr, struct glfs_fd *glfd)
14f8ab
 {
14f8ab
@@ -655,14 +648,14 @@ unset_fop_attr(dict_t **fop_attr)
14f8ab
         *fop_attr = NULL;
14f8ab
     }
14f8ab
 }
14f8ab
+
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_from_glfd, 3.4.0)
14f8ab
 struct glfs *
14f8ab
 pub_glfs_from_glfd(struct glfs_fd *glfd)
14f8ab
 {
14f8ab
     return glfd->fs;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_from_glfd, 3.4.0);
14f8ab
-
14f8ab
 static void
14f8ab
 glfs_fd_destroy(struct glfs_fd *glfd)
14f8ab
 {
14f8ab
@@ -811,6 +804,7 @@ unlock:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_new, 3.4.0)
14f8ab
 struct glfs *
14f8ab
 pub_glfs_new(const char *volname)
14f8ab
 {
14f8ab
@@ -899,8 +893,7 @@ out:
14f8ab
     return fs;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_new, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_new_from_ctx, 3.7.0)
14f8ab
 struct glfs *
14f8ab
 priv_glfs_new_from_ctx(glusterfs_ctx_t *ctx)
14f8ab
 {
14f8ab
@@ -919,8 +912,7 @@ out:
14f8ab
     return fs;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_new_from_ctx, 3.7.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_free_from_ctx, 3.7.0)
14f8ab
 void
14f8ab
 priv_glfs_free_from_ctx(struct glfs *fs)
14f8ab
 {
14f8ab
@@ -956,8 +948,7 @@ priv_glfs_free_from_ctx(struct glfs *fs)
14f8ab
     FREE(fs);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_free_from_ctx, 3.7.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_set_volfile, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_set_volfile(struct glfs *fs, const char *volfile)
14f8ab
 {
14f8ab
@@ -974,8 +965,7 @@ pub_glfs_set_volfile(struct glfs *fs, const char *volfile)
14f8ab
     return 0;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_set_volfile, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_set_logging, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_set_logging(struct glfs *fs, const char *logfile, int loglevel)
14f8ab
 {
14f8ab
@@ -1013,8 +1003,6 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_set_logging, 3.4.0);
14f8ab
-
14f8ab
 int
14f8ab
 glfs_init_wait(struct glfs *fs)
14f8ab
 {
14f8ab
@@ -1033,6 +1021,7 @@ glfs_init_wait(struct glfs *fs)
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_init_done, 3.4.0)
14f8ab
 void
14f8ab
 priv_glfs_init_done(struct glfs *fs, int ret)
14f8ab
 {
14f8ab
@@ -1064,8 +1053,6 @@ out:
14f8ab
     return;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_init_done, 3.4.0);
14f8ab
-
14f8ab
 int
14f8ab
 glfs_init_common(struct glfs *fs)
14f8ab
 {
14f8ab
@@ -1106,6 +1093,7 @@ glfs_init_async(struct glfs *fs, glfs_init_cbk cbk)
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_init, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_init(struct glfs *fs)
14f8ab
 {
14f8ab
@@ -1139,8 +1127,6 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_init, 3.4.0);
14f8ab
-
14f8ab
 static int
14f8ab
 glusterfs_ctx_destroy(glusterfs_ctx_t *ctx)
14f8ab
 {
14f8ab
@@ -1218,6 +1204,7 @@ glusterfs_ctx_destroy(glusterfs_ctx_t *ctx)
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fini, 3.4.0)
14f8ab
 int
14f8ab
 pub_glfs_fini(struct glfs *fs)
14f8ab
 {
14f8ab
@@ -1412,8 +1399,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fini, 3.4.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_get_volfile, 3.6.0)
14f8ab
 ssize_t
14f8ab
 pub_glfs_get_volfile(struct glfs *fs, void *buf, size_t len)
14f8ab
 {
14f8ab
@@ -1439,8 +1425,7 @@ invalid_fs:
14f8ab
     return res;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_get_volfile, 3.6.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_ipc, 3.12.0)
14f8ab
 int
14f8ab
 priv_glfs_ipc(struct glfs *fs, int opcode, void *xd_in, void **xd_out)
14f8ab
 {
14f8ab
@@ -1468,8 +1453,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_ipc, 3.12.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_setfspid, 6.1)
14f8ab
 int
14f8ab
 priv_glfs_setfspid(struct glfs *fs, pid_t pid)
14f8ab
 {
14f8ab
@@ -1483,107 +1467,104 @@ priv_glfs_setfspid(struct glfs *fs, pid_t pid)
14f8ab
 
14f8ab
     return ret;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_setfspid, 6.1);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_free, 3.7.16)
14f8ab
 void
14f8ab
 pub_glfs_free(void *ptr)
14f8ab
 {
14f8ab
     GLFS_FREE(ptr);
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_free, 3.7.16);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_get_fs, 3.7.16)
14f8ab
 struct glfs *
14f8ab
 pub_glfs_upcall_get_fs(struct glfs_upcall *arg)
14f8ab
 {
14f8ab
     return arg->fs;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_get_fs, 3.7.16);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_get_reason, 3.7.16)
14f8ab
 enum glfs_upcall_reason
14f8ab
 pub_glfs_upcall_get_reason(struct glfs_upcall *arg)
14f8ab
 {
14f8ab
     return arg->reason;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_get_reason, 3.7.16);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_get_event, 3.7.16)
14f8ab
 void *
14f8ab
 pub_glfs_upcall_get_event(struct glfs_upcall *arg)
14f8ab
 {
14f8ab
     return arg->event;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_get_event, 3.7.16);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_object, 3.7.16)
14f8ab
 struct glfs_object *
14f8ab
 pub_glfs_upcall_inode_get_object(struct glfs_upcall_inode *arg)
14f8ab
 {
14f8ab
     return arg->object;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_object, 3.7.16);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_flags, 3.7.16)
14f8ab
 uint64_t
14f8ab
 pub_glfs_upcall_inode_get_flags(struct glfs_upcall_inode *arg)
14f8ab
 {
14f8ab
     return arg->flags;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_flags, 3.7.16);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_stat, 3.7.16)
14f8ab
 struct stat *
14f8ab
 pub_glfs_upcall_inode_get_stat(struct glfs_upcall_inode *arg)
14f8ab
 {
14f8ab
     return &arg->buf;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_stat, 3.7.16);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_expire, 3.7.16)
14f8ab
 uint64_t
14f8ab
 pub_glfs_upcall_inode_get_expire(struct glfs_upcall_inode *arg)
14f8ab
 {
14f8ab
     return arg->expire_time_attr;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_expire, 3.7.16);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_pobject, 3.7.16)
14f8ab
 struct glfs_object *
14f8ab
 pub_glfs_upcall_inode_get_pobject(struct glfs_upcall_inode *arg)
14f8ab
 {
14f8ab
     return arg->p_object;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_pobject, 3.7.16);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_pstat, 3.7.16)
14f8ab
 struct stat *
14f8ab
 pub_glfs_upcall_inode_get_pstat(struct glfs_upcall_inode *arg)
14f8ab
 {
14f8ab
     return &arg->p_buf;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_pstat, 3.7.16);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_oldpobject, 3.7.16)
14f8ab
 struct glfs_object *
14f8ab
 pub_glfs_upcall_inode_get_oldpobject(struct glfs_upcall_inode *arg)
14f8ab
 {
14f8ab
     return arg->oldp_object;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_oldpobject, 3.7.16);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_oldpstat, 3.7.16)
14f8ab
 struct stat *
14f8ab
 pub_glfs_upcall_inode_get_oldpstat(struct glfs_upcall_inode *arg)
14f8ab
 {
14f8ab
     return &arg->oldp_buf;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_inode_get_oldpstat, 3.7.16);
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_lease_get_object, 4.1.6)
14f8ab
 struct glfs_object *
14f8ab
 pub_glfs_upcall_lease_get_object(struct glfs_upcall_lease *arg)
14f8ab
 {
14f8ab
     return arg->object;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_lease_get_object, 4.1.6);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_lease_get_lease_type, 4.1.6)
14f8ab
 uint32_t
14f8ab
 pub_glfs_upcall_lease_get_lease_type(struct glfs_upcall_lease *arg)
14f8ab
 {
14f8ab
     return arg->lease_type;
14f8ab
 }
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_lease_get_lease_type, 4.1.6);
14f8ab
 
14f8ab
 /* definitions of the GLFS_SYSRQ_* chars are in glfs.h */
14f8ab
 static struct glfs_sysrq_help {
14f8ab
@@ -1593,6 +1574,7 @@ static struct glfs_sysrq_help {
14f8ab
                        {GLFS_SYSRQ_STATEDUMP, "(S)tatedump"},
14f8ab
                        {0, NULL}};
14f8ab
 
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_sysrq, 3.10.0)
14f8ab
 int
14f8ab
 pub_glfs_sysrq(struct glfs *fs, char sysrq)
14f8ab
 {
14f8ab
@@ -1641,8 +1623,7 @@ out:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_sysrq, 3.10.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_register, 3.13.0)
14f8ab
 int
14f8ab
 pub_glfs_upcall_register(struct glfs *fs, uint32_t event_list,
14f8ab
                          glfs_upcall_cbk cbk, void *data)
14f8ab
@@ -1698,8 +1679,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_register, 3.13.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_unregister, 3.13.0)
14f8ab
 int
14f8ab
 pub_glfs_upcall_unregister(struct glfs *fs, uint32_t event_list)
14f8ab
 {
14f8ab
@@ -1746,8 +1726,7 @@ invalid_fs:
14f8ab
     return ret;
14f8ab
 }
14f8ab
 
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_unregister, 3.13.0);
14f8ab
-
14f8ab
+GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_set_statedump_path, 6.4)
14f8ab
 int
14f8ab
 pub_glfs_set_statedump_path(struct glfs *fs, const char *path)
14f8ab
 {
14f8ab
@@ -1807,5 +1786,3 @@ err:
14f8ab
 invalid_fs:
14f8ab
     return -1;
14f8ab
 }
14f8ab
-
14f8ab
-GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_set_statedump_path, 6.4);
14f8ab
diff --git a/cli/src/cli-cmd-global.c b/cli/src/cli-cmd-global.c
14f8ab
index 270b76f44..c44ef1087 100644
14f8ab
--- a/cli/src/cli-cmd-global.c
14f8ab
+++ b/cli/src/cli-cmd-global.c
14f8ab
@@ -27,7 +27,6 @@
14f8ab
 #include <glusterfs/syscall.h>
14f8ab
 #include <glusterfs/common-utils.h>
14f8ab
 
14f8ab
-extern rpc_clnt_prog_t *cli_rpc_prog;
14f8ab
 
14f8ab
 int
14f8ab
 cli_cmd_global_help_cbk(struct cli_state *state, struct cli_cmd_word *in_word,
14f8ab
diff --git a/cli/src/cli-cmd-misc.c b/cli/src/cli-cmd-misc.c
14f8ab
index 04dd2efc2..6eaac8b92 100644
14f8ab
--- a/cli/src/cli-cmd-misc.c
14f8ab
+++ b/cli/src/cli-cmd-misc.c
14f8ab
@@ -18,10 +18,6 @@
14f8ab
 #include "cli-mem-types.h"
14f8ab
 #include "protocol-common.h"
14f8ab
 
14f8ab
-extern struct rpc_clnt *global_rpc;
14f8ab
-
14f8ab
-extern rpc_clnt_prog_t *cli_rpc_prog;
14f8ab
-
14f8ab
 extern struct cli_cmd volume_cmds[];
14f8ab
 extern struct cli_cmd bitrot_cmds[];
14f8ab
 extern struct cli_cmd quota_cmds[];
14f8ab
diff --git a/cli/src/cli-cmd-peer.c b/cli/src/cli-cmd-peer.c
14f8ab
index e42a1139b..55deb4369 100644
14f8ab
--- a/cli/src/cli-cmd-peer.c
14f8ab
+++ b/cli/src/cli-cmd-peer.c
14f8ab
@@ -20,10 +20,6 @@
14f8ab
 #include "protocol-common.h"
14f8ab
 #include <glusterfs/events.h>
14f8ab
 
14f8ab
-extern struct rpc_clnt *global_rpc;
14f8ab
-
14f8ab
-extern rpc_clnt_prog_t *cli_rpc_prog;
14f8ab
-
14f8ab
 int
14f8ab
 cli_cmd_peer_help_cbk(struct cli_state *state, struct cli_cmd_word *in_word,
14f8ab
                       const char **words, int wordcount);
14f8ab
diff --git a/cli/src/cli-cmd-snapshot.c b/cli/src/cli-cmd-snapshot.c
14f8ab
index 814ab82f6..3c523ad17 100644
14f8ab
--- a/cli/src/cli-cmd-snapshot.c
14f8ab
+++ b/cli/src/cli-cmd-snapshot.c
14f8ab
@@ -17,8 +17,6 @@
14f8ab
 #include "cli-cmd.h"
14f8ab
 #include "cli-mem-types.h"
14f8ab
 
14f8ab
-extern rpc_clnt_prog_t *cli_rpc_prog;
14f8ab
-
14f8ab
 int
14f8ab
 cli_cmd_snapshot_help_cbk(struct cli_state *state, struct cli_cmd_word *in_word,
14f8ab
                           const char **words, int wordcount);
14f8ab
diff --git a/cli/src/cli-cmd-system.c b/cli/src/cli-cmd-system.c
14f8ab
index cb3a9ea74..ca802187a 100644
14f8ab
--- a/cli/src/cli-cmd-system.c
14f8ab
+++ b/cli/src/cli-cmd-system.c
14f8ab
@@ -18,10 +18,6 @@
14f8ab
 #include "cli-mem-types.h"
14f8ab
 #include "protocol-common.h"
14f8ab
 
14f8ab
-extern struct rpc_clnt *global_rpc;
14f8ab
-
14f8ab
-extern rpc_clnt_prog_t *cli_rpc_prog;
14f8ab
-
14f8ab
 int
14f8ab
 cli_cmd_system_help_cbk(struct cli_state *state, struct cli_cmd_word *in_word,
14f8ab
                         const char **words, int wordcount);
14f8ab
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
14f8ab
index b6bef80f1..8186ed7bc 100644
14f8ab
--- a/cli/src/cli-cmd-volume.c
14f8ab
+++ b/cli/src/cli-cmd-volume.c
14f8ab
@@ -28,10 +28,6 @@
14f8ab
 #include <glusterfs/common-utils.h>
14f8ab
 #include <glusterfs/events.h>
14f8ab
 
14f8ab
-extern struct rpc_clnt *global_rpc;
14f8ab
-extern struct rpc_clnt *global_quotad_rpc;
14f8ab
-
14f8ab
-extern rpc_clnt_prog_t *cli_rpc_prog;
14f8ab
 extern rpc_clnt_prog_t cli_quotad_clnt;
14f8ab
 
14f8ab
 int
14f8ab
diff --git a/cli/src/cli-quotad-client.c b/cli/src/cli-quotad-client.c
14f8ab
index 52ab97ee8..1da7b3f0a 100644
14f8ab
--- a/cli/src/cli-quotad-client.c
14f8ab
+++ b/cli/src/cli-quotad-client.c
14f8ab
@@ -10,9 +10,6 @@
14f8ab
 
14f8ab
 #include "cli-quotad-client.h"
14f8ab
 
14f8ab
-extern struct rpc_clnt global_quotad_rpc;
14f8ab
-extern struct rpc_clnt_program cli_quotad_clnt;
14f8ab
-
14f8ab
 int
14f8ab
 cli_quotad_submit_request(void *req, call_frame_t *frame, rpc_clnt_prog_t *prog,
14f8ab
                           int procnum, struct iobref *iobref, xlator_t *this,
14f8ab
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
14f8ab
index 51b544786..ef320b019 100644
14f8ab
--- a/cli/src/cli-rpc-ops.c
14f8ab
+++ b/cli/src/cli-rpc-ops.c
14f8ab
@@ -48,10 +48,7 @@
14f8ab
 
14f8ab
 enum gf_task_types { GF_TASK_TYPE_REBALANCE, GF_TASK_TYPE_REMOVE_BRICK };
14f8ab
 
14f8ab
-extern struct rpc_clnt *global_quotad_rpc;
14f8ab
-extern rpc_clnt_prog_t cli_quotad_clnt;
14f8ab
-extern rpc_clnt_prog_t *cli_rpc_prog;
14f8ab
-extern int cli_op_ret;
14f8ab
+rpc_clnt_prog_t cli_quotad_clnt;
14f8ab
 extern int connected;
14f8ab
 
14f8ab
 int32_t
14f8ab
diff --git a/cli/src/cli.c b/cli/src/cli.c
14f8ab
index a76c5a263..74e055222 100644
14f8ab
--- a/cli/src/cli.c
14f8ab
+++ b/cli/src/cli.c
14f8ab
@@ -74,6 +74,10 @@ rpc_clnt_prog_t *cli_rpc_prog;
14f8ab
 
14f8ab
 extern struct rpc_clnt_program cli_prog;
14f8ab
 
14f8ab
+int cli_default_conn_timeout = 120;
14f8ab
+int cli_ten_minutes_timeout = 600;
14f8ab
+
14f8ab
+
14f8ab
 static int
14f8ab
 glusterfs_ctx_defaults_init(glusterfs_ctx_t *ctx)
14f8ab
 {
14f8ab
diff --git a/cli/src/cli.h b/cli/src/cli.h
14f8ab
index b5b69ea48..21982594e 100644
14f8ab
--- a/cli/src/cli.h
14f8ab
+++ b/cli/src/cli.h
14f8ab
@@ -42,8 +42,8 @@ enum argp_option_keys {
14f8ab
     ARGP_PORT_KEY = 'p',
14f8ab
 };
14f8ab
 
14f8ab
-int cli_default_conn_timeout;
14f8ab
-int cli_ten_minutes_timeout;
14f8ab
+extern int cli_default_conn_timeout;
14f8ab
+extern int cli_ten_minutes_timeout;
14f8ab
 
14f8ab
 typedef enum {
14f8ab
     COLD_BRICK_COUNT,
14f8ab
@@ -191,6 +191,12 @@ typedef ssize_t (*cli_serialize_t)(struct iovec outmsg, void *args);
14f8ab
 
14f8ab
 extern struct cli_state *global_state; /* use only in readline callback */
14f8ab
 
14f8ab
+extern struct rpc_clnt *global_quotad_rpc;
14f8ab
+
14f8ab
+extern struct rpc_clnt *global_rpc;
14f8ab
+
14f8ab
+extern rpc_clnt_prog_t *cli_rpc_prog;
14f8ab
+
14f8ab
 typedef const char *(*cli_selector_t)(void *wcon);
14f8ab
 
14f8ab
 char *
14f8ab
-- 
14f8ab
2.27.0
14f8ab