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