From b147ebb158c9f516ae2d815aaf1cd270efd5ebcb Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Sun, 28 Jun 2015 10:15:44 +0200 Subject: Revert "Upcall/gfapi: Return ENOTSUP when upcall feature is disabled" This reverts commit b68f671b2b8a0aafef8f98145aee7044edaa907d from http://review.gluster.org/11196 . The change depends on modifications to the cluster xlators, but these are still partially under review. Dropping this change now, it causes regression tests to fail. Change-Id: If5ae4a519c9c6312cdb2e2a31acce4b1901f9442 BUG: 1231132 Signed-off-by: Soumya Koduri Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/11452 --- api/src/glfs.c | 59 +--------------------------------------------------------- 1 file changed, 1 insertion(+), 58 deletions(-) (limited to 'api/src/glfs.c') diff --git a/api/src/glfs.c b/api/src/glfs.c index 7b9f1ed6d01..fc392947e1e 100644 --- a/api/src/glfs.c +++ b/api/src/glfs.c @@ -253,58 +253,6 @@ get_volfp (struct glfs *fs) } -static int -detect_upcall_features (struct glfs *fs) -{ - xlator_t *subvol = NULL; - int ret = -1; - dict_t *dict = NULL; - uint32_t features = 0; - - DECLARE_OLD_THIS; - __GLFS_ENTRY_VALIDATE_FS (fs, invalid_fs); - - subvol = glfs_active_subvol (fs); - if (!subvol) { - ret = -1; - errno = EIO; - goto out; - } - - ret = syncop_ipc (subvol, GF_IPC_UPCALL_FEATURES, NULL, &dict); - DECODE_SYNCOP_ERR (ret); - - if (ret) - /* some real error occured */ - goto out; - - if (!dict) { - /* unavailable upcalls should not be an error */ - ret = 0; - goto out; - } - - ret = dict_get_uint32 (dict, GF_UPCALL_FEATURES, &features); - if (ret) { - /* unavailable upcalls should not be an error */ - ret = 0; - goto out; - } - - fs->upcall_features = features; - -out: - if (dict) - dict_unref (dict); - - glfs_subvol_done (fs, subvol); - __GLFS_EXIT_FS; - -invalid_fs: - return ret; -} - - int glfs_volumes_init (struct glfs *fs) { @@ -319,7 +267,7 @@ glfs_volumes_init (struct glfs *fs) if (cmd_args->volfile_server) { ret = glfs_mgmt_init (fs); - goto finish; + goto out; } fp = get_volfp (fs); @@ -336,11 +284,6 @@ glfs_volumes_init (struct glfs *fs) if (ret) goto out; -finish: - ret = detect_upcall_features (fs); - if (ret) - goto out; - out: return ret; } -- cgit