nfs-ganesha 2.4.1 GA
This commit is contained in:
parent
b5dcaa6095
commit
087f4be955
156
nfs-ganesha-2.4.1-FSAL-FSAL_GLUSTERFS-upcall.patch
Normal file
156
nfs-ganesha-2.4.1-FSAL-FSAL_GLUSTERFS-upcall.patch
Normal file
@ -0,0 +1,156 @@
|
||||
From ac1899fd37a04e9d2ec366a7dd27d579ebc0b318 Mon Sep 17 00:00:00 2001
|
||||
From: Soumya Koduri <skoduri@redhat.com>
|
||||
Date: Tue, 18 Oct 2016 00:18:29 +0530
|
||||
Subject: [PATCH] FSAL_GLUSTER: Use the new APIs to fetch & free upcall args
|
||||
|
||||
GlusterFS Upcall handling APIs have been remodelled to do
|
||||
all the memory handling needed in gfapi and make the upcall
|
||||
structure opaque so that in case if there are any changes
|
||||
to it in future, it shall not break existing applications.
|
||||
|
||||
http://review.gluster.org/#/c/14701/ (merged into Gluster 3.7.16)
|
||||
http://review.gluster.org/#/c/15653/ (hopefully will get into 3.7.17)
|
||||
|
||||
This change is to consume those APIs in FSAL_GLUSTER.
|
||||
|
||||
Change-Id: Iad6c97a09aed801e7abd979cb452076bfef68b62
|
||||
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
|
||||
---
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 2cf5fdf..d329e8b 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -511,7 +511,7 @@
|
||||
IF(GLUSTER_PREFIX)
|
||||
set(ENV{PKG_CONFIG_PATH} "${PKG_CONFIG_PATH}:${GLUSTER_PREFIX}/lib/pkgconfig")
|
||||
ENDIF(GLUSTER_PREFIX)
|
||||
- pkg_check_modules(GFAPI glusterfs-api>=7.3.8)
|
||||
+ pkg_check_modules(GFAPI glusterfs-api)
|
||||
if(NOT GFAPI_FOUND)
|
||||
if(STRICT_PACKAGE)
|
||||
message(FATAL_ERROR "STRICT PACKAGE: Cannot find GLUSTER GFAPI runtime. Disabling GLUSTER fsal build")
|
||||
diff --git a/src/FSAL/FSAL_GLUSTER/fsal_up.c b/src/FSAL/FSAL_GLUSTER/fsal_up.c
|
||||
index 070a8f5..e213319 100644
|
||||
--- a/src/FSAL/FSAL_GLUSTER/fsal_up.c
|
||||
+++ b/src/FSAL/FSAL_GLUSTER/fsal_up.c
|
||||
@@ -96,21 +96,23 @@
|
||||
}
|
||||
|
||||
out:
|
||||
- glfs_h_close(object);
|
||||
return rc;
|
||||
}
|
||||
|
||||
void *GLUSTERFSAL_UP_Thread(void *Arg)
|
||||
{
|
||||
- struct glusterfs_export *glfsexport = Arg;
|
||||
+ struct glusterfs_export *glfsexport = Arg;
|
||||
const struct fsal_up_vector *event_func;
|
||||
char thr_name[16];
|
||||
- int rc = 0;
|
||||
- struct callback_arg callback;
|
||||
- struct callback_inode_arg *cbk_inode_arg = NULL;
|
||||
- int reason = 0;
|
||||
- int retry = 0;
|
||||
- int errsv = 0;
|
||||
+ int rc = 0;
|
||||
+ struct glfs_upcall *cbk = NULL;
|
||||
+ struct glfs_upcall_inode *in_arg = NULL;
|
||||
+ enum glfs_upcall_reason reason = 0;
|
||||
+ int retry = 0;
|
||||
+ int errsv = 0;
|
||||
+ struct glfs_object *object = NULL;
|
||||
+ struct glfs_object *p_object = NULL;
|
||||
+ struct glfs_object *oldp_object = NULL;
|
||||
|
||||
|
||||
snprintf(thr_name, sizeof(thr_name),
|
||||
@@ -138,8 +140,6 @@
|
||||
goto out;
|
||||
}
|
||||
|
||||
- callback.fs = glfsexport->gl_fs;
|
||||
-
|
||||
/* Start querying for events and processing. */
|
||||
/** @todo : Do batch processing instead */
|
||||
while (!atomic_fetch_int8_t(&glfsexport->destroy_mode)) {
|
||||
@@ -147,11 +147,10 @@
|
||||
"Requesting event from FSAL Callback interface for %p.",
|
||||
glfsexport->gl_fs);
|
||||
|
||||
- callback.reason = 0;
|
||||
+ reason = 0;
|
||||
|
||||
- rc = glfs_h_poll_upcall(glfsexport->gl_fs, &callback);
|
||||
+ rc = glfs_h_poll_upcall(glfsexport->gl_fs, &cbk);
|
||||
errsv = errno;
|
||||
- reason = callback.reason;
|
||||
|
||||
if (rc != 0) {
|
||||
/* if ENOMEM retry for couple of times
|
||||
@@ -190,42 +189,49 @@
|
||||
"Received upcall event: reason(%d)",
|
||||
reason);
|
||||
|
||||
+ if (!cbk) {
|
||||
+ usleep(10);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ reason = glfs_upcall_get_reason(cbk);
|
||||
/* Decide what type of event this is
|
||||
* inode update / invalidate? */
|
||||
switch (reason) {
|
||||
- case GFAPI_CBK_EVENT_NULL:
|
||||
+ case GLFS_UPCALL_EVENT_NULL:
|
||||
usleep(10);
|
||||
continue;
|
||||
- case GFAPI_INODE_INVALIDATE:
|
||||
- cbk_inode_arg =
|
||||
- (struct callback_inode_arg *)callback.event_arg;
|
||||
+ case GLFS_UPCALL_INODE_INVALIDATE:
|
||||
+ in_arg = glfs_upcall_get_event(cbk);
|
||||
|
||||
- if (!cbk_inode_arg) {
|
||||
+ if (!in_arg) {
|
||||
/* Could be ENOMEM issues. continue */
|
||||
LogWarn(COMPONENT_FSAL_UP,
|
||||
"Received NULL upcall event arg");
|
||||
break;
|
||||
}
|
||||
|
||||
- if (cbk_inode_arg->object)
|
||||
+ object = glfs_upcall_inode_get_object(in_arg);
|
||||
+ if (object)
|
||||
upcall_inode_invalidate(glfsexport,
|
||||
- cbk_inode_arg->object);
|
||||
- if (cbk_inode_arg->p_object)
|
||||
+ object);
|
||||
+ p_object = glfs_upcall_inode_get_pobject(in_arg);
|
||||
+ if (p_object)
|
||||
upcall_inode_invalidate(glfsexport,
|
||||
- cbk_inode_arg->p_object);
|
||||
- if (cbk_inode_arg->oldp_object)
|
||||
+ p_object);
|
||||
+ oldp_object = glfs_upcall_inode_get_object(in_arg);
|
||||
+ if (oldp_object)
|
||||
upcall_inode_invalidate(glfsexport,
|
||||
- cbk_inode_arg->oldp_object);
|
||||
+ oldp_object);
|
||||
break;
|
||||
default:
|
||||
LogWarn(COMPONENT_FSAL_UP, "Unknown event: %d", reason);
|
||||
continue;
|
||||
}
|
||||
- if (cbk_inode_arg) {
|
||||
- free(cbk_inode_arg);
|
||||
- cbk_inode_arg = NULL;
|
||||
+ if (cbk) {
|
||||
+ glfs_free(cbk);
|
||||
+ cbk = NULL;
|
||||
}
|
||||
- callback.event_arg = NULL;
|
||||
}
|
||||
|
||||
out:
|
@ -73,14 +73,15 @@ Requires: sles-release >= 12
|
||||
%global use_system_ntirpc %{on_off_switch system_ntirpc}
|
||||
|
||||
Name: nfs-ganesha
|
||||
Version: 2.4.0
|
||||
Release: 2%{?dev:%{dev}}%{?dist}
|
||||
Version: 2.4.1
|
||||
Release: 1%{?dev:%{dev}}%{?dist}
|
||||
Summary: NFS-Ganesha is a NFS Server running in user space
|
||||
Group: Applications/System
|
||||
License: LGPLv3+
|
||||
Url: https://github.com/nfs-ganesha/nfs-ganesha/wiki
|
||||
|
||||
Source0: https://github.com/%{name}/%{name}/archive/V%{version}/%{name}-%{version}.tar.gz
|
||||
Patch0: nfs-ganesha-2.4.1-FSAL-FSAL_GLUSTERFS-upcall.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: bison
|
||||
@ -100,6 +101,7 @@ BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: libcap-devel
|
||||
BuildRequires: libblkid-devel
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: gcc-c++
|
||||
%if %{with system_ntirpc}
|
||||
BuildRequires: libntirpc-devel >= 1.4.1
|
||||
%endif
|
||||
@ -289,7 +291,7 @@ be used with NFS-Ganesha to support PANFS
|
||||
Summary: The NFS-GANESHA's GLUSTER FSAL
|
||||
Group: Applications/System
|
||||
Requires: nfs-ganesha = %{version}-%{release}
|
||||
BuildRequires: glusterfs-api-devel >= 3.8.0
|
||||
BuildRequires: glusterfs-api-devel >= 3.8.5
|
||||
BuildRequires: libattr-devel, libacl-devel
|
||||
|
||||
%description gluster
|
||||
@ -300,6 +302,7 @@ be used with NFS-Ganesha to support Gluster
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
rm -rf contrib/libzfswrapper
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
cd src && %cmake . -DCMAKE_BUILD_TYPE=Debug \
|
||||
@ -544,7 +547,10 @@ killall -SIGHUP dbus-daemon 2>&1 > /dev/null
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Sep 22 2016 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.4.0-2
|
||||
* Mon Oct 31 2016 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.4.1-1
|
||||
- nfs-ganesha 2.4.1 GA
|
||||
|
||||
* Fri Oct 28 2016 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.4.0-2
|
||||
- rebuild with libntirpc-1.4.3
|
||||
|
||||
* Thu Sep 22 2016 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.4.0-1
|
||||
|
Loading…
x
Reference in New Issue
Block a user