[nfs-ganesha] Ceph FSAL enabled with ceph-0.80

Kaleb S. KEITHLEY kkeithle at fedoraproject.org
Mon Jun 2 06:20:54 UTC 2014


commit d762928388abb158eb2d2994890c1cc3de7b6629
Author: Kaleb S. KEITHLEY <kkeithle at redhat.com>
Date:   Mon Jun 2 02:19:34 2014 -0400

    Ceph FSAL enabled with ceph-0.80

 nfs-ganesha-2.0.0-fsal_ceph.patch |   18 ++++++++++++++++++
 nfs-ganesha.spec                  |   25 ++++++++++++++++---------
 2 files changed, 34 insertions(+), 9 deletions(-)
---
diff --git a/nfs-ganesha-2.0.0-fsal_ceph.patch b/nfs-ganesha-2.0.0-fsal_ceph.patch
new file mode 100644
index 0000000..c64fdc3
--- /dev/null
+++ b/nfs-ganesha-2.0.0-fsal_ceph.patch
@@ -0,0 +1,18 @@
+--- nfs-ganesha-2.0.0/src/FSAL/FSAL_CEPH/handle.c.orig	2014-06-02 01:49:21.711983531 -0400
++++ nfs-ganesha-2.0.0/src/FSAL/FSAL_CEPH/handle.c	2014-06-02 01:50:57.119983531 -0400
+@@ -374,12 +374,13 @@
+ 	/* The private 'full' directory handle */
+ 	struct handle *link = container_of(link_pub, struct handle, handle);
+ 	/* Pointer to the Ceph link content */
+-	char *content = NULL;
++	char content[4096] = {0,};
+ 
+ 	/* Content points into a static buffer in the Ceph client's
+ 	   cache, so we don't have to free it. */
+ 
+-	rc = ceph_ll_readlink(export->cmount, link->i, &content, 0, 0);
++	rc = ceph_ll_readlink(export->cmount, link->i,
++                              content, sizeof content, 0, 0);
+ 
+ 	if (rc < 0)
+ 		return ceph2fsal_error(rc);
diff --git a/nfs-ganesha.spec b/nfs-ganesha.spec
index 56477eb..11f0df5 100644
--- a/nfs-ganesha.spec
+++ b/nfs-ganesha.spec
@@ -1,23 +1,25 @@
 
 # %%global prereltag rcfinal
-%global ntirpcname ntirpc
-%global ntirpcvers 1.0.0
+%global            ntirpcname ntirpc
+%global            ntirpcvers 1.0.0
 
-%global _hardened_build 1
+%global            _hardened_build 1
 
 %if ( 0%{?fedora} && 0%{?fedora} > 16 ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
-%global           _with_systemd true
+%global            _with_systemd true
 %endif
 
 # GlusterFS is not available in EPEL
 # RHEL currently 3.4.0 client, but nfs-ganesha needs 3.4.2.
 %if ( ! 0%{?rhel} )
-%global           with_glusterfs true
+%global            with_glusterfs true
 %endif
 
+%global            with_cephfs true
+
 Name:              nfs-ganesha
 Version:           2.0.0
-Release:           8%{?prereltag:.%{prereltag}}%{?dist}
+Release:           9%{?prereltag:.%{prereltag}}%{?dist}
 Summary:           Ganesha NFS Server
 Group:             System Environment/Libraries
 License:           LGPLv3+
@@ -34,6 +36,7 @@ Patch1:            nfs-ganesha-2.0.0rc5.patch
 Patch2:            nfs-ganesha-2.0.0-lustre-strict.patch
 Patch3:            nfs-ganesha-2.0.0-no-strict-aliasing.patch
 Patch4:            nfs-ganesha-2.0.0-dirent.patch
+Patch5:            nfs-ganesha-2.0.0-fsal_ceph.patch
 
 %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
 
@@ -107,7 +110,7 @@ clusters such as CEPH and GLUSTERFS. There is also a PROXY back-end
 which operates as an NFSv4 client.
 %endif
 
-%if ( 0%{?with_cephfs} )
+%if ( 0%{?with_cephfs:1} )
 %package fsal-ceph
 Summary:           Ganesha NFS Server GlusterFS FSAL
 Requires:          ceph >= 0.78
@@ -154,6 +157,7 @@ mv %{ntirpcname}-%{ntirpcvers}/* src/libntirpc/
 %patch3 -p1
 %endif
 %patch4 -p1
+%patch5 -p1
 
 %build
 %if ( 0%{?rhel} && 0%{?rhel} < 7 )
@@ -206,7 +210,7 @@ install -D -p -m 0744 %{SOURCE4} %{buildroot}%{_sbindir}/nfs_ganesha.sh
 %if ( 0%{?with_glusterfs:1} )
 %exclude %{_libdir}/ganesha/libfsalgluster.*
 %endif
-%if ( 0%{?with_cephfs} )
+%if ( 0%{?with_cephfs:1} )
 %exclude %{_libdir}/ganesha/libfsalceph.*
 %endif
 %{_libdir}/*
@@ -223,7 +227,7 @@ install -D -p -m 0744 %{SOURCE4} %{buildroot}%{_sbindir}/nfs_ganesha.sh
 %{_libdir}/ganesha/libfsalgluster.*
 %endif
 
-%if ( 0%{?with_cephfs} )
+%if ( 0%{?with_cephfs:1} )
 %files fsal-ceph
 %{_libdir}/ganesha/libfsalceph.*
 %endif
@@ -234,6 +238,9 @@ install -D -p -m 0744 %{SOURCE4} %{buildroot}%{_sbindir}/nfs_ganesha.sh
 %dir %{_pkgdocdir}
 
 %changelog
+* Mon Jun 2 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-9
+- Ceph FSAL enabled with ceph-0.80
+
 * Wed May 21 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-8
 - getdents()->getdents64(), struct dirent -> struct dirent64
 


More information about the scm-commits mailing list