From 9f919b8632a82e8343ce3c2a665453f5bdd69350 Mon Sep 17 00:00:00 2001
From: Jiffin Tony Thottan <jthottan@redhat.com>
Date: Mon, 1 Aug 2016 12:11:24 +0530
Subject: [PATCH 66/86] xlators/ganesha : Remove the ganesha xlator code entirely from source
ganesha xlator is dummy xlator which introduced as part of cli options.
But all the ganesha related cli commands are handled from glusterd only.
There is no point in keeping this xlator. Hence removing the same since
it does not have any role in NFS-Ganesha intergration with gluster
Upstream reference :
>Change-Id: Id438d2fabd3afe7e91ae26522df8495c8e9e9308
>BUG: 1361999
>Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
>Reviewed-on: http://review.gluster.org/15055
>Smoke: Gluster Build System <jenkins@build.gluster.org>
>Reviewed-by: soumya k <skoduri@redhat.com>
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
>Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
>Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Change-Id: Id438d2fabd3afe7e91ae26522df8495c8e9e9308
BUG: 1348949
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/84775
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
---
configure.ac | 2 -
glusterfs.spec.in | 4 +-
xlators/features/Makefile.am | 2 +-
xlators/features/ganesha/Makefile.am | 3 -
xlators/features/ganesha/src/Makefile.am | 18 -----
xlators/features/ganesha/src/ganesha-mem-types.h | 21 -----
xlators/features/ganesha/src/ganesha.c | 90 ----------------------
xlators/features/ganesha/src/ganesha.h | 18 -----
8 files changed, 4 insertions(+), 154 deletions(-)
delete mode 100644 xlators/features/ganesha/Makefile.am
delete mode 100644 xlators/features/ganesha/src/Makefile.am
delete mode 100644 xlators/features/ganesha/src/ganesha-mem-types.h
delete mode 100644 xlators/features/ganesha/src/ganesha.c
delete mode 100644 xlators/features/ganesha/src/ganesha.h
diff --git a/configure.ac b/configure.ac
index 75ebcd4..94e195c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -147,8 +147,6 @@ AC_CONFIG_FILES([Makefile
xlators/features/quiesce/src/Makefile
xlators/features/barrier/Makefile
xlators/features/barrier/src/Makefile
- xlators/features/ganesha/Makefile
- xlators/features/ganesha/src/Makefile
xlators/features/index/Makefile
xlators/features/index/src/Makefile
xlators/features/protect/Makefile
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index a60f216..7d3f2da 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -1160,7 +1160,6 @@ exit 0
%files client-xlators
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/cluster/*.so
%exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/cluster/pump.so
-%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/ganesha.so
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/protocol/client.so
%if ( 0%{!?_without_extra_xlators:1} )
@@ -2008,6 +2007,9 @@ end
%endif
%changelog
+* Fri Sep 16 2016 Jiffin Tony Thottan <jthottan@redhat.com>
+- Remove ganesha.so from client xlators
+
* Fri Sep 16 2016 Aravinda VK <avishwan@redhat.com>
- Added Python subpackage "cliutils" under gluster (#1342356)
diff --git a/xlators/features/Makefile.am b/xlators/features/Makefile.am
index c63eb75..68dc38b 100644
--- a/xlators/features/Makefile.am
+++ b/xlators/features/Makefile.am
@@ -1,5 +1,5 @@
SUBDIRS = locks quota read-only mac-compat quiesce marker index barrier \
- arbiter protect compress changelog changetimerecorder ganesha \
+ arbiter protect compress changelog changetimerecorder \
gfid-access $(GLUPY_SUBDIR) upcall snapview-client snapview-server \
trash shard bit-rot leases
diff --git a/xlators/features/ganesha/Makefile.am b/xlators/features/ganesha/Makefile.am
deleted file mode 100644
index a985f42..0000000
--- a/xlators/features/ganesha/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-SUBDIRS = src
-
-CLEANFILES =
diff --git a/xlators/features/ganesha/src/Makefile.am b/xlators/features/ganesha/src/Makefile.am
deleted file mode 100644
index 3bf291b..0000000
--- a/xlators/features/ganesha/src/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-xlator_LTLIBRARIES = ganesha.la
-
-xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
-
-noinst_HEADERS = ganesha.h ganesha-mem-types.h
-
-ganesha_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
-
-ganesha_la_SOURCES = ganesha.c
-
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS)\
- -DGANESHA_DIR=\"$(sysconfdir)/ganesha\" \
- -DGYSNCD_PREFIX=\"$(libexecdir)/glusterfs\"
-
-AM_CFLAGS = -Wall $(GF_CFLAGS)
-
-CLEANFILES =
diff --git a/xlators/features/ganesha/src/ganesha-mem-types.h b/xlators/features/ganesha/src/ganesha-mem-types.h
deleted file mode 100644
index c4976c0..0000000
--- a/xlators/features/ganesha/src/ganesha-mem-types.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Copyright (c) 2015 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-#ifndef __GANESHA_MEM_TYPES_H__
-#define __GANESHA_MEM_TYPES_H__
-
-
-#include "mem-types.h"
-
-enum gf_ganesha_mem_types_ {
- gf_ganesha_mt_priv_t = gf_common_mt_end + 1,
- gf_ganesha_mt_end
-};
-
-#endif
diff --git a/xlators/features/ganesha/src/ganesha.c b/xlators/features/ganesha/src/ganesha.c
deleted file mode 100644
index 8599154..0000000
--- a/xlators/features/ganesha/src/ganesha.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- Copyright (c) 2015 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-
-#include "ganesha.h"
-#include "ganesha-mem-types.h"
-
-
-int32_t
-mem_acct_init (xlator_t *this)
-{
- int ret = -1;
-
- if (!this)
- return ret;
-
- ret = xlator_mem_acct_init (this, gf_ganesha_mt_end + 1);
-
- if (ret != 0)
- gf_log (this->name, GF_LOG_WARNING, "Memory accounting"
- "init failed");
-
- return ret;
-}
-
-int32_t
-init (xlator_t *this)
-{
- int ret = -1;
- ganesha_priv_t *priv = NULL;
-
- if (!this->children || this->children->next) {
- gf_log (this->name, GF_LOG_ERROR,
- "Need subvolume == 1");
- goto err;
- }
-
- if (!this->parents) {
- gf_log (this->name, GF_LOG_WARNING,
- "Dangling volume. Check volfile");
- goto err;
- }
-
- priv = GF_CALLOC (1, sizeof (*priv), gf_ganesha_mt_priv_t);
- if (!priv)
- goto err;
-
- this->private = priv;
- ret = 0;
-
-err:
- return ret;
-}
-
-
-void
-fini (xlator_t *this)
-{
- ganesha_priv_t *priv = this->private;
-
- this->private = NULL;
- if (priv)
- GF_FREE (priv);
-
- return;
-}
-
-struct xlator_fops fops = {
-};
-
-struct xlator_cbks cbks = {
-};
-
-struct volume_options options[] = {
-
- { .key = {"ganesha.enable"},
- .default_value = "off",
- .type = GF_OPTION_TYPE_BOOL,
- .description = "export volume via NFS-Ganesha"
- },
- { .key = {NULL}
- },
-};
diff --git a/xlators/features/ganesha/src/ganesha.h b/xlators/features/ganesha/src/ganesha.h
deleted file mode 100644
index 86320e9..0000000
--- a/xlators/features/ganesha/src/ganesha.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- Copyright (c) 2015 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-#include "xlator.h"
-#include "ganesha-mem-types.h"
-
-typedef struct {
- char *host_name;
-} ganesha_priv_t;
-
-
--
1.7.1