summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-resolve.c
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2020-07-02 15:52:15 -0400
committerAmar Tumballi <amar@kadalu.io>2020-07-03 17:25:43 +0000
commitbc09af77376c45d28e6c789b0b4e64deed053aad (patch)
treecddec09f1edc1e4082e12b25315c769f943dd831 /api/src/glfs-resolve.c
parentab8308333aaf033e07dbbdf2f69f9313a7e311f3 (diff)
api: libgfapi symbol versions break LTO in Fedora rawhide/f33
The way symbol versions are implemented is incompatible with gcc-10 and LTO. Fedora provenpackager Jeff Law (law [at] redhat.com) writes in the Fedora dist-git glusterfs.spec: This package uses top level ASM constructs which are incompatible with LTO. Top level ASMs are often used to implement symbol versioning. gcc-10 introduces a new mechanism for symbol versioning which works with LTO. Converting packages to use that mechanism instead of toplevel ASMs is recommended. In particular, note that the version of gluster in Fedora rawhide/f33 is glusterfs-8.0RC0. Once this fix is merged it will be necessary to backport it to the release-8 branch. At the time that gfapi symbol versions were first implemented we copied the GNU libc (glibc) symbol version implementation following Uli Drepper's symbol versioning HOWTO. Now gcc-10 has a symver attribute that can be used instead. (Maybe it has been there all along?) Both the original implemenation and this implemenation yield the same symbol versions. This can be seen by running `nm -D --with-symbol-versions libgfapi.so` on the libgfapi.so built before and after applying this fix. Change-Id: I05fda580afacfff1bfc07be810dd1afc08a92fb8 Fixes: #1352 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'api/src/glfs-resolve.c')
-rw-r--r--api/src/glfs-resolve.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c
index 7b60eef0090..8a393ecb464 100644
--- a/api/src/glfs-resolve.c
+++ b/api/src/glfs-resolve.c
@@ -162,6 +162,7 @@ __glfs_refresh_inode(struct glfs *fs, xlator_t *subvol, inode_t *inode,
return newinode;
}
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_loc_touchup, 3.4.0)
int
priv_glfs_loc_touchup(loc_t *loc)
{
@@ -176,8 +177,6 @@ priv_glfs_loc_touchup(loc_t *loc)
return ret;
}
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_loc_touchup, 3.4.0);
-
int
glfs_resolve_symlink(struct glfs *fs, xlator_t *subvol, inode_t *inode,
char **lpath)
@@ -467,6 +466,7 @@ out:
return inode;
}
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_resolve_at, 3.4.0)
int
priv_glfs_resolve_at(struct glfs *fs, xlator_t *subvol, inode_t *at,
const char *origpath, loc_t *loc, struct iatt *iatt,
@@ -617,8 +617,6 @@ invalid_fs:
return ret;
}
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_resolve_at, 3.4.0);
-
int
glfs_resolve_path(struct glfs *fs, xlator_t *subvol, const char *origpath,
loc_t *loc, struct iatt *iatt, int follow, int reval)
@@ -647,6 +645,7 @@ out:
return ret;
}
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_resolve, 3.7.0)
int
priv_glfs_resolve(struct glfs *fs, xlator_t *subvol, const char *origpath,
loc_t *loc, struct iatt *iatt, int reval)
@@ -657,7 +656,6 @@ priv_glfs_resolve(struct glfs *fs, xlator_t *subvol, const char *origpath,
return ret;
}
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_resolve, 3.7.0);
int
glfs_lresolve(struct glfs *fs, xlator_t *subvol, const char *origpath,
@@ -978,6 +976,7 @@ __glfs_active_subvol(struct glfs *fs)
return new_subvol;
}
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_subvol_done, 3.4.0)
void
priv_glfs_subvol_done(struct glfs *fs, xlator_t *subvol)
{
@@ -1005,8 +1004,7 @@ priv_glfs_subvol_done(struct glfs *fs, xlator_t *subvol)
}
}
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_subvol_done, 3.4.0);
-
+GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_active_subvol, 3.4.0)
xlator_t *
priv_glfs_active_subvol(struct glfs *fs)
{
@@ -1034,8 +1032,6 @@ priv_glfs_active_subvol(struct glfs *fs)
return subvol;
}
-GFAPI_SYMVER_PRIVATE_DEFAULT(glfs_active_subvol, 3.4.0);
-
int
__glfs_cwd_set(struct glfs *fs, inode_t *inode)
{